Edge Redirector API V1

The Edge Redirector API enables you to manage your Edge Redirector rules.

NOTE: If you are new to Edge Redirector, please use the Cloudlets OPEN API instead. The Cloudlets OPEN API supports all Cloudlets. The Edge Redirector API is deprecated.

API Summary

Operation Method Endpoint
Policies
List Policies POST /config-edgeredirector-data/api/v1/policymanager?command=getAllPolicyInfoMaps
Create a New Policy POST /config-edgeredirector-data/api/v1/policymanager?command=create
Get a Policy POST /config-edgeredirector-data/api/v1/policymanager?command=read
Modify a Policy POST /config-edgeredirector-data/api/v1/policymanager?command=update
List Policy Information POST /config-edgeredirector-data/api/v1/policymanager?command=getPolicyInfoList
Clone a Policy POST /config-edgeredirector-data/api/v1/policymanager?command=clone
Policy Activations
Activate a Policy POST /config-edgeredirector-data/api/v1/policymanager
List Policy Activations GET /config-edgeredirector-data/api/v1/common/activation{?historyOnly}
Data Members

List Policies

Gets useful information about all policies.

POST /config-edgeredirector-data/api/v1/policymanager?command=getAllPolicyInfoMaps

Content-Type: application/x-www-form-urlencoded

Request:

query=%7B%22policyManagerRequest%22%3A%7B%22command%22%3A%22getPolicyInfoMapUsingACGIDs%22%2C%22getPolicyInfoMapUsingACGIDs%22%3A%7B%7D%7D%7D

Parameter Type Sample Description
Required
command Enumeration getAllPolicyInfoMaps Command that enables this API operation. Possible values: clone, create, getAllPolicyInfoMaps, getPolicyInfoList, read, update.

Status 200 application/json

Response:

{
    "responseCode": 0,
    "response": [
        {
            "id": 102,
            "policyId": 101,
            "createdBy": "username",
            "createDate": 1399880615407,
            "acgId": "3-10TQKCS",
            "version": 1,
            "immutable": false,
            "activatedProduction": 0,
            "activatedStaging": 0,
            "activatedTest": 0,
            "description": null,
            "policyName": "username_test",
            "assetId": 0,
            "cloudletId": 0,
            "cloudletConfig": {
                "id": 0,
                "key": "ER",
                "name": "EDGEREDIRECTOR",
                "featureKey": "edge_redirector",
                "engProduct": "Cloudlets::Edge_Redirector",
                "policyFileNamePrefix": "nimbus_",
                "openAPIContextRoot": "/configure-edgeredirector-data",
                "isInternal": true,
                "stagingLocation": "tapioca_staging_ump_files",
                "productionLocation": "tapioca_ump_files",
                "logsLocation": null
            },
            "policyDescription": "THStark - to get familiar for RBMH",
            "policyCreatedBy": "username",
            "policyLastModifiedBy": "username",
            "policyCreateDate": 1399880598512,
            "policyLastModifiedDate": 1399880615407,
            "matchRules": null
        }
    ],
    "i18nCode": 0,
    "englishMessage": null
}

Create a New Policy

Create a new Edge Redirector policy.

POST /config-edgeredirector-data/api/v1/policymanager?command=create

Content-Type: application/x-www-form-urlencoded

Request:

query=%7B%22policyManagerRequest%22%3A%7B%22command%22%3A%22create%22%2C%22create%22%3A%7B%22cloudletId%22%3A%220%22%2C%22policyName%22%3A%22TestPolicy3%22%2C%22policyDescription%22%3A%22TestPolicy3+notes.%22%7D%7D%7D

Parameter Type Sample Description
Required
command Enumeration create Command that enables this API operation. Possible values: clone, create, getAllPolicyInfoMaps, getPolicyInfoList, read, update.

Status 200

Get a Policy

Read, or list, the configuration of a policy version.

The rule configuration information is listed in the matchRules field of the response JSON.

POST /config-edgeredirector-data/api/v1/policymanager?command=read

Content-Type: application/x-www-form-urlencoded

Request:

query=%7B%22policyManagerRequest%22%3A+%7B%22command%22%3A+%22read%22%2C%22read%22%3A+%7B%22id%22%3A+%221133%22%7D%7D%7D

Parameter Type Sample Description
Required
command Enumeration read Command that enables this API operation. Possible values: clone, create, getAllPolicyInfoMaps, getPolicyInfoList, read, update.

Status 200 application/json

Response:

{
    "responseCode": 0,
    "response": {
        "id": 1133,
        "policyId": 686,
        "createdBy": "cloudlets",
        "createDate": 1407339219183,
        "acgId": "3-10TQKCS",
        "version": 1,
        "immutable": false,
        "activatedProduction": 0,
        "activatedStaging": 0,
        "activatedTest": 0,
        "description": "Default description for all versions",
        "policyName": "1ERPolicy",
        "assetId": 0,
        "cloudletId": 0,
        "cloudletConfig": {
            "id": 0,
            "key": "ER",
            "name": "EDGEREDIRECTOR",
            "featureKey": "edge_redirector",
            "engProduct": "Cloudlets::Edge_Redirector",
            "policyFileNamePrefix": "nimbus_",
            "openAPIContextRoot": "/configure-edgeredirector-data",
            "isInternal": true,
            "stagingLocation": "tapioca_staging_ump_files",
            "productionLocation": "tapioca_ump_files",
            "logsLocation": null
        },
        "policyDescription": "Sample Description",
        "policyCreatedBy": "cloudlets",
        "policyLastModifiedBy": "cloudlets",
        "policyCreateDate": 1407160924865,
        "policyLastModifiedDate": 1407339219183,
        "matchRules": [
            {
                "type": "erMatchRule",
                "end": 0,
                "id": 0,
                "matchURL": null,
                "matches": [
                    {
                        "caseSensitive": false,
                        "matchOperator": "contains",
                        "matchType": "protocol",
                        "matchValue": "http",
                        "negate": false
                    },
                    {
                        "caseSensitive": false,
                        "matchOperator": "contains",
                        "matchType": "hostname",
                        "matchValue": "source.com",
                        "negate": false
                    },
                    {
                        "caseSensitive": false,
                        "matchOperator": "contains",
                        "matchType": "query",
                        "matchValue": "test=null",
                        "negate": false
                    }
                ],
                "name": "rule 1",
                "redirectURL": "HTTP://testredirect.akamai.com/test.html",
                "start": 0,
                "statusCode": 302,
                "useIncomingQueryString": false
            }
        ]
    },
    "i18nCode": 0,
    "englishMessage": null
}

Modify a Policy

Make updates to an Edge Redirector policy.

NOTE: The response contains a new ID and other fields that were updated by the server.

POST /config-edgeredirector-data/api/v1/policymanager?command=update

Content-Type: application/x-www-form-urlencoded

Request:

query=%7B%22policyManagerRequest%22%3A%7B%22command%22%3A%22update%22%2C%22update%22%3A%22overwriteRules%22%3Atrue%2C%22id%22%3A435%2C%22policyId%22%3A122%2C%22createdBy%22%3A%22cloudlets%22%2C%22createDate%22%3A1400782263395%2C%22version%22%3A10%2C%22immutable%22%3Afalse%2C%22activatedProduction%22%3A0%2C%22activatedStaging%22%3A0%2C%22activatedTest%22%3A0%2C%22description%22%3A%22Save+a+new+version%22%2C%22policyName%22%3A%2214_3ER_Policy%22%2C%22assetId%22%3A0%2C%22cloudletId%22%3A0%2C%22cloudletConfig%22%3A%7B%7D%2C%22policyDescription%22%3A%22specific+version+description%22%2C%22policyCreatedBy%22%3A%22username%22%2C%22policyLastModifiedBy%22%3A%22cloudlets%22%2C%22policyCreateDate%22%3A1399997852450%2C%22policyLastModifiedDate%22%3A1400782263395%2C%22matchRules%22%3A%5B%7B%22type%22%3A%22erMatchRule%22%2C%22end%22%3A0%2C%22id%22%3A0%2C%22matchURL%22%3A%22HTTP%3A%2F%2Ftest.akamai.com%2FsourceURL%2Fupdate%22%2C%22name%22%3A%22rule+1%22%2C%22redirectURL%22%3A%22HTTP%3A%2F%2Fredirect.com%2FredirectURL%2Fupdate%22%2C%22start%22%3A0%2C%22statusCode%22%3A%22301%22%2C%22useIncomingQueryString%22%3Atrue%7D%5D%7D%7D%7D

Parameter Type Sample Description
Required
command Enumeration update Command that enables this API operation. Possible values: clone, create, getAllPolicyInfoMaps, getPolicyInfoList, read, update.

Status 200 application/json

Response:

{
    "responseCode": 0,
    "response": {
        "id": 436,
        "policyId": 1001,
        "createdBy": "cloudlets",
        "createDate": 1400782263395,
        "acgId": "3-10TQKCS",
        "version": 10,
        "immutable": false,
        "activatedProduction": 0,
        "activatedStaging": 0,
        "activatedTest": 0,
        "description": "Save a new version",
        "policyName": "14_3ER_Policy",
        "assetId": 0,
        "cloudletId": 0,
        "cloudletConfig": {},
        "policyDescription": "specific version description",
        "policyCreatedBy": "username",
        "policyLastModifiedBy": "username2",
        "policyCreateDate": 1399997852450,
        "policyLastModifiedDate": 1400782263395,
        "matchRules": [
            {
                "type": "erMatchRule",
                "end": 0,
                "id": 0,
                "matchURL": null,
                "matches": [
                    {
                        "caseSensitive": false,
                        "matchOperator": "contains",
                        "matchType": "protocol",
                        "matchValue": "HTTP",
                        "negate": false
                    },
                    {
                        "caseSensitive": false,
                        "matchOperator": "contains",
                        "matchType": "hostname",
                        "matchValue": "test.akamai.com",
                        "negate": false
                    },
                    {
                        "caseSensitive": false,
                        "matchOperator": "contains",
                        "matchType": "path",
                        "matchValue": "/sourceURL/update",
                        "negate": false
                    }
                ],
                "name": "rule 1",
                "redirectURL": "HTTP://redirect.com/redirectURL/update",
                "start": 0,
                "statusCode": 301,
                "useIncomingQueryString": true
            }
        ]
    },
    "i18nCode": 0,
    "englishMessage": null
}

List Policy Information

List all information about each policy version, except for the matchRules.

POST /config-edgeredirector-data/api/v1/policymanager?command=getPolicyInfoList

Content-Type: application/x-www-form-urlencoded

Request:

query=%7B%22policyManagerRequest%22%3A%7B%22command%22%3A%22getPolicyInfoList%22%2C%22getPolicyInfoList%22%3A%7B%22policyId%22%3A%22243%22%7D%7D%7D

Parameter Type Sample Description
Required
command Enumeration getPolicyInfoList Command that enables this API operation. Possible values: clone, create, getAllPolicyInfoMaps, getPolicyInfoList, read, update.

Status 200 application/json

Response:

{
    "responseCode": 0,
    "response": [
        {
            "id": 351,
            "policyId": 243,
            "createdBy": "ccare2",
            "createDate": 1403050992316,
            "acgId": "3-10TQKCS",
            "version": 1,
            "immutable": false,
            "activatedProduction": 0,
            "activatedStaging": 0,
            "activatedTest": 0,
            "description": null,
            "policyName": "Test_ER_Policy",
            "assetId": 0,
            "cloudletId": 0,
            "cloudletConfig": {
                "id": 0,
                "key": "ER",
                "name": "EDGEREDIRECTOR",
                "featureKey": "edge_redirector",
                "engProduct": "Cloudlets::Edge_Redirector",
                "policyFileNamePrefix": "nimbus_",
                "openAPIContextRoot": "/configure-edgeredirector-data",
                "isInternal": true,
                "stagingLocation": "tapioca_staging_ump_files",
                "productionLocation": "tapioca_ump_files",
                "logsLocation": null
            },
            "policyDescription": null,
            "policyCreatedBy": "cloudletsuser",
            "policyLastModifiedBy": "testuser2",
            "policyCreateDate": 1403036738153,
            "policyLastModifiedDate": 1405438191162,
            "matchRules": null
        }
    ],
    "i18nCode": 0,
    "englishMessage": null
}

Clone a Policy

Make a copy of, or clone, an existing policy version.

NOTE: The new policy version will receive the next available version number.

POST /config-edgeredirector-data/api/v1/policymanager?command=clone

Content-Type: application/x-www-form-urlencoded

Request:

query=%7B%22policyManagerRequest%22%3A%7B%22command%22%3A%22clone%22%2C%22clone%22%3A%7B%22id%22%3A%221149%22%7D%7D%7D

Parameter Type Sample Description
Required
command Enumeration clone Command that enables this API operation. Possible values: clone, create, getAllPolicyInfoMaps, getPolicyInfoList, read, update.

Status 200 application/json

Response:

{
    "responseCode": 0,
    "response": {
        "id": 1178,
        "policyId": 764,
        "createdBy": "cloudlets",
        "createDate": 1407352490414,
        "acgId": "3-10TQKCS",
        "version": 5,
        "immutable": false,
        "activatedProduction": 0,
        "activatedStaging": 0,
        "activatedTest": 0,
        "description": null,
        "policyName": "TestPolicy3",
        "assetId": 0,
        "cloudletId": 0,
        "cloudletConfig": null,
        "policyDescription": "TestPolicy3 notes.",
        "policyCreatedBy": "cloudlets",
        "policyLastModifiedBy": "cloudlets",
        "policyCreateDate": 1407348215182,
        "policyLastModifiedDate": 1407348215182,
        "matchRules": null
    },
    "i18nCode": 0,
    "englishMessage": null
}

Activate a Policy

Activate a specified Cloudlet policy.

Note the following before using this command:

  • You must first run the List Policy Activation Info command in order to get the correct arlId (fileId).

  • The policyVersionId corresponds to the tapiocaIDs. When issuing this command, make sure you are activating the correct version. The sample request uses tapiocaIDs (policyVersionId) 3668, which is version 1.

  • The generated policy file will be propagated to the selected environment. After activation completes, the policy will be available for use.

POST /config-edgeredirector-data/api/v1/policymanager

Content-Type: application/x-www-form-urlencoded

Request:

query=%7B%22policyManagerRequest%22%3A%7B%22command%22%3A%22activate%22%2C%22activate%22%3A%7B%22tapiocaIDs%22%3A%5B3668%5D%2C%22arlId%22%3A%224456%22%2C%22assetId%22%3A%220%22%2C%22network%22%3A%22staging%22%7D%7D%7D

Status 200 application/json

Response:

{
    "responseCode": 0,
    "response": null,
    "i18nCode": 0,
    "englishMessage": null
}

List Policy Activations

List policies and provide policy-specific activation information.

NOTE: During activation you will need the fileId, which corresponds to the arlId.

GET /config-edgeredirector-data/api/v1/common/activation{?historyOnly}

Example: /config-edgeredirector-data/api/v1/common/activation?historyOnly=false

Parameter Type Sample Description
Optional
historyOnly String false When enabled, include only the history, otherwise also provide policies available for activation.

Status 200 application/x-www-form-urlencoded

Response:

[
{
    "version": "2",
    "activatedPolicyVersions": [
        {
            "stageStatus": "3000",
            "productionLastUpdated": null,
            "stageLastUpdated": 1415297386000,
            "policies": [
                {
                    "policyName": "TestPolicyv1",
                    "cloudletId": 0,
                    "versions": [
                        {
                            "version": "1",
                            "policyVersionId": 3668,
                            "acgId": "3-10TAKCB"
                        }
                    ],
                    "id": 2501
                }
            ],
            "productionStatus": null,
            "fileId": 217315,
            "createdBy": "tester",
            "assetId": 0,
            "propertyName": "tester.akamai.com",
            "id": 1421,
            "type": "ump"
        }
    ],
...


Last modified: 12/12/2016