younifyd
Menu

Get Page Shield Scripts

Get Page Shield Scripts

GET/organizations/{organizationId}/zones/{zoneId}/page-shield/scripts

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Get Page Shield Scripts action (under Zones (Data API)).
  3. Fill in the fields below, then reference the result from later steps as {{getPageShieldScripts.response.data}}.

Request

Path parameters

zoneIdstringrequired
organizationIdstringrequired

An identifier for the organization the request is being made by

Query parameters

directionstring

The direction used to sort returned scripts.

One ofascdesc

excludeCdnCgiboolean

When true, excludes scripts existing in a /cdn-cgi path from the returned scripts. Default is true.

excludeDuplicatesboolean

When true, excludes duplicate scripts. Default is false.

excludeUrlsstring

Excludes scripts with a URL that contains one of the URL-encoded URLs separated by commas.

hostsstring

Includes scripts that match one or more URL-encoded hostnames separated by commas. Wildcards are supported at the beginning and end of each hostname.

orderBystring

The field used to sort returned scripts.

One offirst_seen_atlast_seen_at

pageUrlstring

Includes scripts that match one or more page URLs (separated by commas) where they were last detected. Wildcards are supported at the beginning and end of each page URL.

prioritizeMaliciousboolean

When true, lists malicious scripts first in the returned scripts.

statusstring

Filters the returned scripts using a comma-separated list of script statuses. Accepted values are 'active', 'infrequent', and 'inactive'. Default is 'active'.

urlsstring

Includes scripts with a URL that contains one or more URL-encoded URLs separated by commas.

pagestring

When set to 'all', retrieves all scripts without pagination, disregarding offset and limit parameters.

One ofall

limitinteger (int32)

Maximum records to retrieve per request, not to exceed 200. Defaults to 200.

Default 200

offsetinteger (int32)

Used to retrieve the results based on a particular resource offset.

Default 0

Response

Returns 200 with an object. Read it in later steps with {{getPageShieldScripts.response.data.<field>}}.

dataarray<object>
idstring

Page Shield script ID.

urlstring

Page Shield script URL.

hoststring

Hostname where the script was detected by Page Shield.

addedAtstring (date-time)

Date the script was added to Page Shield.

firstSeenAtstring (date-time)

Date the script was detected by Page Shield.

lastSeenAtstring (date-time)

Date the script was recently detected by Page Shield.

fetchedAtstring (date-time)

The timestamp when the script was last fetched.

domainReportedMaliciousboolean

Reported domain is malicious.

hashstring

The computed hash of the analyzed script.

cryptoMiningScoreinteger

The crypto mining score of the JavaScript content.

dataflowScoreinteger

The dataflow score of the JavaScript content.

jsIntegrityScoreinteger

The integrity score of the JavaScript content.

mageCartScoreinteger

The Magecart score of the JavaScript content.

malwareScoreinteger

The malware score of the JavaScript content.

obfuscationScoreinteger

The obfuscation score of the JavaScript content.

maliciousDomainCategoriesarray<string>

Malicious domain category.

maliciousUrlCategoriesarray<string>

Malicious URL category.

urlContainsCdnCgiPathboolean

URL contains CDN CGI path.

urlReportedMaliciousboolean

Reported URL is malicious.

pageUrlsarray<string>

Page URLs

firstPageUrlstring

First page URL for the JavaScript.

statusstring

The current status of the script. Possible values are active, inactive, or infrequent.

versionsarray<object>9 fields

List of script versions.

json
{
  "data": [
    {
      "id": "12345678901234asdfasfasdf",
      "url": "https://sfdc-test.net/on/demandware.static/Sites-SiteNemesis-Site/-/en_US//lib/jquery/ui/jquery-ui.min.js",
      "host": "sfdc-test.net",
      "addedAt": "2022-01-01T05:20:00Z",
      "firstSeenAt": "2022-01-01T05:20:00Z",
      "lastSeenAt": "2022-01-01T05:20:00Z",
      "fetchedAt": "2022-01-01T05:20:00Z",
      "domainReportedMalicious": false,
      "hash": "1243453456abc",
      "cryptoMiningScore": 1,
      "dataflowScore": 1,
      "jsIntegrityScore": 1,
      "mageCartScore": 2,
      "malwareScore": 1,
      "obfuscationScore": 2,
      "maliciousDomainCategories": [
        "Malware"
      ],
      "maliciousUrlCategories": [
        "Malware"
      ],
      "urlContainsCdnCgiPath": false,
      "urlReportedMalicious": false,
      "pageUrls": [
        "blog.test.salesforce.com/page1",
        "blog.test.salesforce.com/page2"
      ],
      "firstPageUrl": "blog.test.salesforce.com",
      "status": "active",
      "versions": []
    }
  ]
}

Need more? See the Salesforce Commerce Cloud guide for connection setup and behaviour shared by every action.