GuideReference
TrainingSupportCommunity
Guide

Match targets

Use the available options to build out your match target object.

{
  "type": "website",
  "isNegativePathMatch": false,
  "isNegativeFileExtensionMatch": false,
   "hostnames": [
    "my-hostname-example.com",
    "learn.my-hostname-example.com",
    "developer.my-hostname-example.com"
  ],
  "fileExtensions": ["sfx", "py", "js", "jar", "html", "exe", "dll", "bat"],
  "securityPolicy": {
    "policyId": "abc_123456"
  }
}
{
  "type": "api",
  "apis": [
    {
      "id": 11111,
      "name": "GET all my things"
    },
    {
      "id": 22222,
      "name": "PATCH my thing"
    }
  ],
  "securityPolicy": {
    "policyId": "abc_123456"
  },
  "bypassNetworkLists": [
    {
      "id": "123456_MYNETWORKLIST",
      "name": "My Network List 1"
    },
    {
      "id": "987654_MYNETWORKLIST"
      "name": "My Network List 2"
    }
  ]
}

Required arguments

The match target type argument must be included in all your match target JSON files. Allowed values are website or api.

Optional arguments

While optional, these arguments might be required depending on the other arguments you include in your match target.

ArgumentDescription
configIdThe security configuration ID associated with the match target.
configVersionThe security configuration version associated with the match target.
defaultFileHow to match paths. Value is one of:
  • NO_MATCH. Excludes the default file from path matching.
  • BASE_MATCH
  • . Matches top-level hostnames that end in a trailing slash.
  • RECURSIVE_MATCH. Matches all paths that end in a trailing slash.

Do not use if you use fileExtensions or filePaths.
fileExtensionsFile extensions for which the match target scans.
filePathsFile paths for which the match target scans.
hostnamesHostnames for which the match target scans.
isNegativeFileExtensionMatchWhether the match target triggers on files not included in the file extension list.
  • true triggers the the match target when a match isn't found in the list of file extensions.
  • false won't match outside the list of file extensions.
isNegativePathMatchWhether the match target triggers on paths not included in the file path list.
  • true triggers the the match target when a match isn't found in the list of file paths.
  • false won't match outside the list of file extensions.

securityPolicy

An object that associates your security policy to your match target by policy ID.

{
  "securityPolicy": {
    "policyId": "abc_123456"
  }
}

apis

The API endpoints on which to match.

ArgumentRequiredDescription
id✔️An API endpoint ID.
nameThe API endpoint's name.
{
  "apis": [
    {
      "id": 11111,
      "name": "GET all my things"
    },
    {
      "id": 22222,
      "name": "PATCH my thing"
    }
  ]
}

byPassNetworkLists

The bypass network list provides a way for you to exempt one or more network lists from the Web Application Firewall.

ArgumentRequiredDescription
id✔️A network list ID.
nameThe network list's name.
{
  "bypassNetworkLists": [
    {
      "id": "123456_MYNETWORKLIST",
      "name": "My Network List 1"
    },
    {
      "id": "987654_MYNETWORKLIST"
      "name": "My Network List 2"
    }
  ]
}

Sequence properties

The order in which to match your targets.

ArgumentRequiredDescription
type✔️Whether the sequencing is for website matches or api matches.
targetSequence✔️An object that contains the targetId and sequence value for each of your match targets. Contains two required properties:
  • targetId. The Akamai generated ID for your match target.
  • sequence. The order in which to match the target. The count starts at one.
{
  "type": "website"
  "targetSequence": [
    {
     "targetId": 1234567,
     "sequence": 1
    },
    {
     "targetId": 9876543,
     "sequence": 2
    },
    {
     "targetId": 4567890,
     "sequence": 3
    }
  ]
}