Cloudlets API Resources

The Cloudlets v2 API allows you to create and view Cloudlet policies and policy versions. Use this API to activate a Cloudlet policy version on either the staging or production network, delete a Cloudlet policy or a policy version, or view group-level information about a particular Cloudlet.

Operations listed under Load Balancing Configurations only apply to the Application Load Balancer Cloudlet. The /cloudlets/api/v2/conditional-origins?{policyId} endpoint that was previously used for Cloudlets Origins has been deprecated. The Property Associations operations return information about Cloudlets Origins.

API Summary

Operation Method Endpoint
Cloudlets
List Cloudlets GET /cloudlets/api/v2/cloudlet-info{?gid}
Get a Cloudlet GET /cloudlets/api/v2/cloudlet-info/{cloudletId}
Group-Level Cloudlets
List Groups GET /cloudlets/api/v2/group-info
Get a Group GET /cloudlets/api/v2/group-info/{groupId}
Policies
List Policies GET /cloudlets/api/v2/policies{?gid,includeDeleted,cloudletId,clonePolicyId,version}
Create a Policy POST /cloudlets/api/v2/policies{?gid,includeDeleted,cloudletId,clonePolicyId,version}
Get a Policy GET /cloudlets/api/v2/policies/{policyId}
Update a Policy PUT /cloudlets/api/v2/policies/{policyId}
Remove a Policy DELETE /cloudlets/api/v2/policies/{policyId}
Policy Versions
List Policy Versions GET /cloudlets/api/v2/policies/{policyId}/versions{?includeRules,matchRuleFormat,cloneVersion}
Create a New Policy Version POST /cloudlets/api/v2/policies/{policyId}/versions{?includeRules,matchRuleFormat,cloneVersion}
Get a Policy Version GET /cloudlets/api/v2/policies/{policyId}/versions/{version}{?omitRules,matchRuleFormat}
Update a Policy Version PUT /cloudlets/api/v2/policies/{policyId}/versions/{version}{?omitRules,matchRuleFormat}
Remove a Policy Version DELETE /cloudlets/api/v2/policies/{policyId}/versions/{version}{?omitRules,matchRuleFormat}
Add a Version Rule POST /cloudlets/api/v2/policies/{policyId}/versions/{version}/rules{?index}
Get a Version Rule GET /cloudlets/api/v2/policies/{policyId}/versions/{version}/rules/{akaRuleId}
Update a Version Rule PUT /cloudlets/api/v2/policies/{policyId}/versions/{version}/rules/{akaRuleId}
Property Associations
List Associated Properties GET /cloudlets/api/v2/properties
Get Associated Properties for a Policy GET /cloudlets/api/v2/policies/{policyId}/properties
Load Balancing Configurations for Application Load Balancer
List Cloudlets Origins GET /cloudlets/api/v2/origins{?type}
Get a Cloudlets Origin GET /cloudlets/api/v2/origins/{originId}
Create a Load Balancing Configuration POST /cloudlets/api/v2/origins/{originId}
Update a Load Balancing Configuration PUT /cloudlets/api/v2/origins/{originId}
List Load Balancing Versions GET /cloudlets/api/v2/origins/{originId}/versions
Create a Load Balancing Version POST /cloudlets/api/v2/origins/{originId}/versions
Get a Load Balancing Version GET /cloudlets/api/v2/origins/{originId}/versions/{version}{?validate}
Update a Load Balancing Version PUT /cloudlets/api/v2/origins/{originId}/versions/{version}{?validate}
Load Balancing Version Activations
List Current Load Balancing Activations GET /cloudlets/api/v2/origins/currentActivations
List Activations for a Load Balancing Configuration GET /cloudlets/api/v2/origins/{originId}/activations
Activate a Load Balancing Version POST /cloudlets/api/v2/origins/{originId}/activations
Policy Activations
List Policy Activations GET /cloudlets/api/v2/policies/{policyId}/activations{?network,propertyName}
Activate a Policy Version POST /cloudlets/api/v2/policies/{policyId}/versions/{version}/activations
Schemas
Get a Schema GET /cloudlets/api/v2/schemas/{schemaName}
List Schemas per Cloudlet GET /cloudlets/api/v2/schemas{?cloudletType}

List Cloudlets

Returns name, code, and ID (cloudletId) information for all available Cloudlets. You need the cloudletId when creating a new Policy.

GET /cloudlets/api/v2/cloudlet-info{?gid}

Example: /cloudlets/api/v2/cloudlet-info?gid=11754

Parameter Type Sample Description
Required
gid Number 11754 For GET operations, returns data about the available types of Cloudlets the user can access for the specified group ID.

Status 200 application/json

Response:

[
    {
        "serviceVersion": null,
        "apiVersion": "2.0",
        "location": "/cloudlets/api/v2/cloudlet-info/3",
        "cloudletId": 3,
        "cloudletCode": "FR",
        "cloudletName": "FORWARDREWRITE"
    },
    {
        "serviceVersion": null,
        "apiVersion": "2.0",
        "location": "/cloudlets/api/v2/cloudlet-info/0",
        "cloudletId": 0,
        "cloudletCode": "ER",
        "cloudletName": "EDGEREDIRECTOR"
    }
]

Get a Cloudlet

Returns name, code, and ID information for a specific type of Cloudlet. You need the cloudletId when creating a new Policy.

GET /cloudlets/api/v2/cloudlet-info/{cloudletId}

Example: /cloudlets/api/v2/cloudlet-info/1001

Parameter Type Sample Description
Optional
cloudletId Number 1001 For GET operations, returns only policies for this particular cloudletId.

Status 200 application/json

Response:

{
    "serviceVersion": null,
    "apiVersion": "2.0",
    "location": "/cloudlets/api/v2/cloudlet-info/0",
    "cloudletId": 0,
    "cloudletCode": "ER",
    "cloudletName": "EDGEREDIRECTOR"
}

  1. Run the List Cloudlets operation.

  2. Store the cloudletId from the appropriate object within the listing.

  3. Make a GET request to /cloudlets/api/v2/cloudlet-info{?gid}.

List Groups

Returns information about the Cloudlet types associated with the groups you have edit privileges for.

GET /cloudlets/api/v2/group-info

Status 200 application/json

Response:

[
    {
        "location": "/cloudlets/api/v2/group-info/1234",
        "serviceVersion": null,
        "apiVersion": "2.0",
        "groupId": 1234,
        "groupName": "Master Group Name",
        "parentId": 0,
        "capabilities": [
            {
                "cloudletId": 3,
                "cloudletCode": "FR",
                "capabilities": [
                    "View",
                    "Edit",
                    "Activate"
                ]
            },
            {
                "cloudletId": 0,
                "cloudletCode": "ER",
                "capabilities": [
                    "View",
                    "Edit",
                    "Activate",
                    "AdvancedEdit"
                ]
            }
            ],
        "properties": null
    },
    {
        "location": "/cloudlets/api/v2/group-info/5678",
        "serviceVersion": null,
        "apiVersion": "2.0",
        "groupId": 5678,
        "groupName": "Subgroup 1",
        "parentId": 1234,
        "capabilities": [
            {
                "cloudletId": 0,
                "cloudletCode": "ER",
                "capabilities": [
                    "View",
                    "Edit",
                    "Activate"
                ]
            }
            ],
        "properties": null
    }
]

Get a Group

Returns information about the Cloudlet types associated with the selected group. For results to display, you must have edit privileges for one or more Cloudlet types within the group.

GET /cloudlets/api/v2/group-info/{groupId}

Example: /cloudlets/api/v2/group-info/11754

Parameter Type Sample Description
Required
groupId Number 11754 For GET operations, returns only policies associated with the group ID entered. Enter 0 to get policies in all groups.

Status 200 application/json

Response:

[
    {
        "location": "/cloudlets/api/v2/group-info/1234",
        "serviceVersion": null,
        "apiVersion": "2.0",
        "groupId": 1234,
        "groupName": "Master Group Name",
        "parentId": 0,
        "capabilities": [
            {
                "cloudletId": 3,
                "cloudletCode": "FR",
                "capabilities": [
                    "View",
                    "Edit",
                    "Activate"
                ]
            },
            {
                "cloudletId": 0,
                "cloudletCode": "ER",
                "capabilities": [
                    "View",
                    "Edit",
                    "Activate",
                    "AdvancedEdit"
                ]
            }
            ],
        "properties": null
    }
]

  1. Run the List Groups operation.

  2. Store the groupId from the appropriate object within the listing.

  3. Make a GET request to /cloudlets/api/v2/group-info/{groupId}.

List Policies

Returns information for all available policies.

GET /cloudlets/api/v2/policies{?gid,includeDeleted,cloudletId,clonePolicyId,version}

Example: /cloudlets/api/v2/policies?gid=11754&includeDeleted=false&cloudletId=1001&clonePolicyId=11754&version=10

Parameter Type Sample Description
Optional
clonePolicyId Number 11754 If cloning an existing policy, this parameter is the ID of the policy (policyId) you want to clone. If there are attributes that you do not want propagated from the source policy, you must provide the new values in the request.
cloudletId Number 1001 For GET operations, returns only policies for this particular cloudletId.
gid Number 11754 For GET operations, returns only policies associated with the group ID (gid) entered.
includeDeleted Boolean false For GET operations, includes deleted policies in the results.
version Number 10 For POST operations, indicates the version of the existing policy to use for the new policy. If not specified, the latest version of the existing policy is copied.

Status 200 application/json

Response:

[
    {
        "location": "/cloudlets/api/v2/policies/1001",
        "serviceVersion": null,
        "apiVersion": "2.0",
        "policyId": 1001,
        "cloudletId": 99,
        "cloudletCode": "CC",
        "groupId": 1234,
        "name": "CookieCutter",
        "description": "Custom cookie cutter",
        "propertyName": "www.example.org",
        "createdBy": "sjones",
        "createDate": 1400535431324,
        "lastModifiedBy": "sjones",
        "lastModifiedDate": 1441829042000,
        "activations": [
            {
                "serviceVersion": null,
                "apiVersion": "2.0",
                "network": "prod",
                "policyInfo": {
                    "policyId": 1001,
                    "name": "CookieCutter",
                    "version": 2,
                    "status": "INACTIVE",
                    "statusDetail": "waiting to complete tests in test environment",
                    "detailCode": 0,
                    "activatedBy": "jsmith",
                    "activationDate": 1441829042000
                },
                "propertyInfo": {
                    "name": "www.example.org",
                    "version": 2,
                    "groupId": 1234,
                    "status": "INACTIVE",
                    "activatedBy": "sjones",
                    "activationDate": 1441137842000
                }
            },
            {
                "serviceVersion": null,
                "apiVersion": "2.0",
                "network": "test",
                "policyInfo": {
                    "policyId": 1001,
                    "name": "CookieCutter",
                    "version": 22,
                    "status": "ACTIVE",
                    "statusDetail": "testing",
                    "detailCode": 0,
                    "activatedBy": "jsmith",
                    "activationDate": 1400535431000
                },
                "propertyInfo": {
                    "name": "www.example.org",
                    "version": 22,
                    "groupId": 1234,
                    "status": "ACTIVE",
                    "activatedBy": "jsmith",
                    "activationDate": 1441137842000
                }
            }
        ]
    }
]

Create a Policy

Create a new Cloudlet policy. If a policy already exists with the same policy name, you receive a 409 (Conflict) status response that contains data for the existing policy. New policies are automatically assigned version number 1.

POST /cloudlets/api/v2/policies{?gid,includeDeleted,cloudletId,clonePolicyId,version}

Example: /cloudlets/api/v2/policies?gid=11754&includeDeleted=false&cloudletId=1001&clonePolicyId=11754&version=10

Content-Type: application/json

Request:

{
    "cloudletId": 99,
    "groupId": 1234,
    "name": "TestCreatePolicy1",
    "description": "Testing the creation of a policy"
}

Parameter Type Sample Description
Optional
clonePolicyId Number 11754 If cloning an existing policy, this parameter is the ID of the policy (policyId) you want to clone. If there are attributes that you do not want propagated from the source policy, you must provide the new values in the request.
cloudletId Number 1001 For GET operations, returns only policies for this particular cloudletId.
gid Number 11754 For GET operations, returns only policies associated with the group ID (gid) entered.
includeDeleted Boolean false For GET operations, includes deleted policies in the results.
version Number 10 For POST operations, indicates the version of the existing policy to use for the new policy. If not specified, the latest version of the existing policy is copied.

Status 200 application/json

Response:

{
    "location": "/cloudlets/api/v2/policies/1002",
    "serviceVersion": null,
    "apiVersion": "2.0",
    "policyId": 1002,
    "cloudletId": 99,
    "cloudletCode": "CC",
    "groupId": 1234,
    "name": "CreatePolicy1",
    "description": "Creating a policy",
    "deleted": false,
    "propertyName": null,
    "createdBy": "sjones",
    "createDate": 1428957069841,
    "lastModifiedBy": "jsmith",
    "lastModifiedDate": 1428957070000,
    "activations": []
}

  1. Run the List Cloudlets operation and store the cloudletId.

  2. Run the List Groups operation and store the groupId.

  3. Create a JSON file with the following required members: cloudletId, groupId, name. See the Policy for a listing of all members.

  4. Make a POST request to /cloudlets/api/v2/policies, specifying the JSON in the body of the request.

Get a Policy

Returns information about a specific Cloudlets policy.

GET /cloudlets/api/v2/policies/{policyId}

Example: /cloudlets/api/v2/policies/11754

Parameter Type Sample Description
Required
policyId Number 11754 The ID of the policy.

Status 200 application/json

Response:

{
    "location": "/cloudlets/api/v2/policies/1001",
    "serviceVersion": null,
    "apiVersion": "2.0",
    "policyId": 1001,
    "cloudletId": 99,
    "cloudletCode": "CC",
    "groupId": 1234,
    "name": "CookieCutter",
    "description": "Custom cookie cutter",
    "propertyName": "www.example.org",
    "createdBy": "jsmith",
    "createDate": 1428957070000,
    "lastModifiedBy": "sjones",
    "lastModifiedDate": 1441829042000,
    "activations": [
        {
            "serviceVersion": null,
            "apiVersion": "2.0",
            "network": "prod",
            "policyInfo": {
                "policyId": 1001,
                "name": "CookieCutter",
                "version": 2,
                "status": "INACTIVE",
                "statusDetail": "waiting to complete tests in test environment",
                "detailCode": 0,
                "activatedBy": "jsmith",
                "activationDate": 1433901173000
            },
            "propertyInfo": {
                "name": "www.example.org",
                "version": 2,
                "groupId": 1234,
                "status": "INACTIVE",
                "activatedBy": "sjones",
                "activationDate": 1441829042000
            }
        },
        {
            "serviceVersion": null,
            "apiVersion": "2.0",
            "network": "test",
            "policyInfo": {
                "policyId": 1001,
                "name": "CookieCutter",
                "version": 22,
                "status": "ACTIVE",
                "statusDetail": "testing",
                "detailCode": 0,
                "activatedBy": "jsmith",
                "activationDate": 1433901173000
            },
            "propertyInfo": {
                "name": "www.example.org",
                "version": 22,
                "groupId": 1234,
                "status": "ACTIVE",
                "activatedBy": "jsmith",
                "activationDate": 1441915442000
            }
        }
    ]
}

  1. Run the List Policies operation.

  2. Store the policyId from the appropriate object within the listing.

  3. Make a GET request to /cloudlets/api/v2/policies/{policyId}.

Update a Policy

Update attributes of an existing policy.

When updating a policy, note the following:

  • If you change the policy name, the new name must be unique.

  • Changes to policy names are not allowed if the policy is currently associated with one or more properties.

  • If a policy already exists with the same policy name, you receive a 409 (Conflict) status. The response contains data for the existing policy.

  • If you are updating a previously deleted policy by setting its deleted attribute to false, the operation fails if there is a name conflict with another policy.

  • The cloudletId and groupId are not required as they are for a POST request to this endpoint.

PUT /cloudlets/api/v2/policies/{policyId}

Example: /cloudlets/api/v2/policies/11754

Content-Type: application/json

Request:

{
    "description": "Testing the update of a policy",
}

Parameter Type Sample Description
Required
policyId Number 11754 The ID of the policy.

Status 200 application/json

Response:

{
    "location": "/cloudlets/api/v2/policies/1002",
    "serviceVersion": null,
    "apiVersion": "2.0",
    "policyId": 1002,
    "cloudletId": 99,
    "cloudletCode": "CC",
    "groupId": 1234,
    "name": "CookieCutter",
    "description": "Testing the update of a policy",
    "deleted": false,
    "propertyName": null,
    "createdBy": "sjones",
    "createDate": 1428957070000,
    "lastModifiedBy": "jsmith",
    "lastModifiedDate": 1431549070000,
    "activations": []
}

  1. Run the List Policies operation.

  2. Store the policyId from the appropriate object within the listing.

  3. Run the Get a Policy operation for the selected policyId.

  4. Modify the JSON file returned with the desired updates to the policy.

  5. Make a PUT request to /cloudlets/api/v2/policies/{policyId}, specifying the modified JSON in the body of the request.

Remove a Policy

When you delete a policy, you can reuse the deleted policy’s name in another policy. Deleting a policy sets its deleted attribute to true, which hides the policy from normal GET requests and makes the policy name available for use on another policy. There are also the following considerations when you delete a policy:

  • In Property Manager, if you try to reactivate an old property version that references the deleted policy, the operation fails.

  • A policy cannot be deleted if it is currently included in the behavior set of some active property version.

NOTE: If the GET request specifies the includeDeleted parameter, the response includes deleted policies.

You can also undelete a policy by setting its deleted attribute to false with a PUT request against policies/nnn. However, if the policy name would conflict with the name of another policy that was created since the current policy was deleted, the operation fails. If the old name is no longer available, you can both undelete a policy and change its name in a single PUT request.

NOTE: A successful DELETE operation returns a status code of 204 (No Content).

DELETE /cloudlets/api/v2/policies/{policyId}

Example: /cloudlets/api/v2/policies/11754

Parameter Type Sample Description
Required
policyId Number 11754 The ID of the policy.

Status 204

  1. Run the List Policies operation.

  2. Store the policyId from the appropriate object within the listing.

  3. Make a DELETE request to /cloudlets/api/v2/policies/{policyId}.

List Policy Versions

Returns information about all versions of a policy.

GET /cloudlets/api/v2/policies/{policyId}/versions{?includeRules,matchRuleFormat,cloneVersion}

Example: /cloudlets/api/v2/policies/11754/versions?includeRules=false&matchRuleFormat=1.0&cloneVersion=10

Parameter Type Sample Description
Required
policyId Number 11754 The ID of the policy.
Optional
cloneVersion Number 10 If cloning an existing policy version, this parameter value is the number of the policy version you want to clone. If there are attributes that you do not want propagated from the source policy version, you must provide the new values in the request.
includeRules Boolean false Includes the match rules for all policy versions in the results. Defaults to false.
matchRuleFormat String 1.0 Returns the matchRuleFormat version string, which shows the version of the Cloudlet-specific matchRules used. Defaults to 1.0.

Status 200 application/json

Response:

[
    {
        "revisionId": 11868,
        "policyId": 1001,
        "version": 1,
        "description": "test",
        "createdBy": "jsmith",
        "createDate": 1427133615439,
        "lastModifiedBy": "sjones",
        "lastModifiedDate": 1427133651975,
        "activations": [],
        "matchRules": [],
        "rulesLocked": false
    },
    {
        "revisionId": 11870,
        "policyId": 1001,
        "version": 2,
        "description": "v2",
        "createdBy": "jsmith",
        "createDate": 1427133784903,
        "lastModifiedBy": "sjones",
        "lastModifiedDate": 1427133805767,
        "activations": [],
        "matchRules": [],
        "rulesLocked": false
    }
]

  1. Run the List Policies operation.

  2. Store the policyId from the appropriate object within the listing.

  3. Make a GET request to /cloudlets/api/v2/policies/{policyId}/versions to return all versions of the policy.

Create a New Policy Version

Create a new policy version, where the version number increments from the highest existing version. With this operation you can change any modifiable policy or version attributes.

The newly created policy version number is included in the response and is one number greater than the previously highest version. The default value for description is an empty string and there are no matchRules. However, if you use the cloneVersion query parameter with the POST request, then the default values for these attributes are taken from the latest version.

POST /cloudlets/api/v2/policies/{policyId}/versions{?includeRules,matchRuleFormat,cloneVersion}

Example: /cloudlets/api/v2/policies/11754/versions?includeRules=false&matchRuleFormat=1.0&cloneVersion=10

Content-Type: application/json

Request:

{
    "description": "Testing the cloning of a policy",
    "matchRuleFormat": "1.0",
    "matchRules": []
}

Parameter Type Sample Description
Required
policyId Number 11754 The ID of the policy.
Optional
cloneVersion Number 10 If cloning an existing policy version, this parameter value is the number of the policy version you want to clone. If there are attributes that you do not want propagated from the source policy version, you must provide the new values in the request.
includeRules Boolean false Includes the match rules for all policy versions in the results. Defaults to false.
matchRuleFormat String 1.0 Returns the matchRuleFormat version string, which shows the version of the Cloudlet-specific matchRules used. Defaults to 1.0.

Status 200 application/json

Response:

{
    "revisionId": 12345,
    "policyId": 1002,
    "version": 2,
    "description": "Cloning a policy",
    "createdBy": "sjones",
    "createDate": 1428957891084,
    "lastModifiedBy": "jsmith",
    "lastModifiedDate": 1428957891084,
    "activations": [],
    "matchRules": [],
    "rulesLocked": false
}

  1. Run the List Policies operation.

  2. Store the policyId from the appropriate object within the listing.

  3. Make a POST request to /cloudlets/api/v2/policies/{policyId}/versions.

Get a Policy Version

Returns information about a specific Cloudlet policy version.

GET /cloudlets/api/v2/policies/{policyId}/versions/{version}{?omitRules,matchRuleFormat}

Example: /cloudlets/api/v2/policies/11754/versions/10?omitRules=false&matchRuleFormat=1.0

Parameter Type Sample Description
Required
policyId Number 11754 The ID of the policy.
version Number 10 The version number of the policy.
Optional
matchRuleFormat String 1.0 Returns the matchRuleFormat version string, which shows the version of the Cloudlet-specific matchRules used. Defaults to 1.0.
omitRules Boolean false Excludes the match rules from the results. Defaults to false.

Status 200 application/json

Response:

{
    "revisionId": 11870,
    "policyId": 1001,
    "version": 2,
    "description": "v2",
    "createdBy": "jsmith",
    "createDate": 1427133784903,
    "lastModifiedBy": "sjones",
    "lastModifiedDate": 1427133805767,
    "activations": [],
    "matchRules": [],
    "rulesLocked": false
}

  1. Run the List Policies operation.

  2. Store the policyId from the appropriate object within the listing.

  3. Run the List Policy Versions operation.

  4. Store the version from the appropriate object within the listing.

  5. Make a GET request to /cloudlets/api/v2/policies/{policyId}/versions/{version}.

Update a Policy Version

Update attributes of an existing policy version.

PUT /cloudlets/api/v2/policies/{policyId}/versions/{version}{?omitRules,matchRuleFormat}

Example: /cloudlets/api/v2/policies/11754/versions/10?omitRules=false&matchRuleFormat=1.0

Content-Type: application/json

Request:

{ "description": "v1 for Q1 Sales" }

Parameter Type Sample Description
Required
policyId Number 11754 The ID of the policy.
version Number 10 The version number of the policy.
Optional
matchRuleFormat String 1.0 Returns the matchRuleFormat version string, which shows the version of the Cloudlet-specific matchRules used. Defaults to 1.0.
omitRules Boolean false Excludes the match rules from the results. Defaults to false.

Status 200 application/json

Response:

{
    "revisionId": 11870,
    "policyId": 1001,
    "version": 1,
    "description": "v1 for Q1 sales",
    "createdBy": "sjones",
    "createDate": 1427133784903,
    "lastModifiedBy": "sjones",
    "lastModifiedDate": 1427133805767,
    "activations": [],
    "matchRules": [],
    "rulesLocked": false
}

  1. Run the List Policies operation.

  2. Store the policyId from the appropriate object within the listing.

  3. Run the List Policy Versions operation.

  4. Store the version you want to update.

  5. Run the Get a Policy Version operation.

  6. Modify the JSON file returned with any changes to match rules or version-level information. The description and matchRuleFormat members are required.

  7. Make a PUT request to /cloudlets/api/v2/policies/{policyId}/versions/{version}, specifying the modified JSON in the body of the request.

Remove a Policy Version

You have the option of removing policy versions, including those that are currently active on either the staging or production network. Once a policy version is deleted, you can still create a new policy version based on the deleted version.

Also, if you make changes to a deleted policy version, it is automatically undeleted and available for use.

When you remove a policy version, version numbers are not reallocated. For example, a policy has 15 versions, and you delete versions 14 and 15. The next version created would be 16, not 14.

A successful DELETE operation returns a status code of 204 (No Content).

DELETE /cloudlets/api/v2/policies/{policyId}/versions/{version}{?omitRules,matchRuleFormat}

Example: /cloudlets/api/v2/policies/11754/versions/10?omitRules=false&matchRuleFormat=1.0

Parameter Type Sample Description
Required
policyId Number 11754 The ID of the policy.
version Number 10 The version number of the policy.
Optional
matchRuleFormat String 1.0 Returns the matchRuleFormat version string, which shows the version of the Cloudlet-specific matchRules used. Defaults to 1.0.
omitRules Boolean false Excludes the match rules from the results. Defaults to false.

Status 204

  1. Run the List Policies operation.

  2. Store the policyId from the appropriate object within the listing.

  3. Run the List Policy Versions operation.

  4. Store the version from the appropriate object within the listing.

  5. Make a DELETE request to /cloudlets/api/v2/policies/{policyId}/versions/{version}.

Add a Version Rule

Add a new rule to an existing policy version. You can only add one rule at a time.

When adding a rule, use the index query parameter to set the position of the new rule within in the current list of rules. If you do not set this parameter, the new rule is added to the end of the current rule list. For Cloudlets, the first rule listed is the first rule evaluated.

POST /cloudlets/api/v2/policies/{policyId}/versions/{version}/rules{?index}

Example: /cloudlets/api/v2/policies/11754/versions/10/rules?index=3

Content-Type: application/json

Request:

{
    "matches": [
        {
            "matchType": "range",
            "objectMatchValue": {
                "type": "range",
                "value": [1, 25]
            },
            "matchOperator": "equals",
            "negate": false,
            "caseSensitive": false
        }
    ],
    "start": 0,
    "end": 0,
    "type": "asMatchRule",
    "disabled": "false",
    "forwardSettings": {
        "originId": "originremote2",
        "useIncomingQueryString": true,
        "pathAndQS": "/sales/Q1/"
    },
    "name": "Q1Sales",
    "id": null
}

Parameter Type Sample Description
Required
policyId Number 11754 The ID of the policy.
version Number 10 The version number of the policy.
Optional
index Number 3 The order within the current list of rules where you want to add the new rule. If you do not set this parameter, the new rule is added to the end of the current rule list. For Cloudlets, the first rule listed is the first rule evaluated.

Status 200 application/json

Response:

{
    "location": "/cloudlets/api/v2/policies/1002/versions/2/rules/5db847a66e0566ad",
    "akaRuleId": "5db847a66e0566ad",
    "matches": [
        {
            "matchType": "range",
            "objectMatchValue": {
                "type": "range",
                "value": [1, 25]
            },
            "matchOperator": "equals",
            "negate": false,
            "caseSensitive": false
        }
    ],
    "start": 0,
    "end": 0,
    "type": "asMatchRule",
    "disabled": "false",
    "forwardSettings": {
        "originId": "originremote2",
        "useIncomingQueryString": true,
        "pathAndQS": "/sales/Q1/"
    },
    "name": "Q1Sales",
    "id": null
}

  1. Run the List Policies operation.

  2. Store the policyId from the appropriate object within the listing.

  3. Run the List Policy Versions operation with the includeRules query parameter set to true.

  4. Store the version number and the akaRuleId from the appropriate object within the listing.

  5. Create a JSON file with the new match rules.

  6. Make a POST request to /cloudlets/api/v2/policies/{policyId}/versions/{version}/rules, specifying the JSON in the body of the request.

Get a Version Rule

Returns information about a specific rule within a policy version.

GET /cloudlets/api/v2/policies/{policyId}/versions/{version}/rules/{akaRuleId}

Example: /cloudlets/api/v2/policies/11754/versions/10/rules/5db847a66e0566ad

Parameter Type Sample Description
Required
akaRuleId String 5db847a66e0566ad The ID of the rule within the policy version.
policyId Number 11754 The ID of the policy.
version Number 10 The version number of the policy.

Status 200 application/json

Response:

{
    "location": "/cloudlets/api/v2/policies/1002/versions/2/rules/5db847a66e0566ad",
    "akaRuleId": "5db847a66e0566ad",
    "matches": [
        {
            "matchType": "range",
            "objectMatchValue": {
                "type": "range",
                "value": [1, 25]
            },
            "matchOperator": "equals",
            "negate": false,
            "caseSensitive": false
        }
    ],
    "start": 0,
    "end": 0,
    "type": "asMatchRule",
    "disabled": "false",
    "forwardSettings": {
        "originId": "originremote2",
        "useIncomingQueryString": true,
        "pathAndQS": "/sales/Q1/"
    },
    "name": "Q1Sales",
    "id": null
}

  1. Run the List Policies operation.

  2. Store the policyId from the appropriate object within the listing.

  3. Run the List Policy Versions operation with the includeRules query parameter set to true.

  4. Store the version number and the akaRuleId from the appropriate object within the listing.

  5. Make a GET request to /cloudlets/api/v2/policies/{policyId}/versions/{version}/rules/{akaRuleId}.

Update a Version Rule

Updates attributes of an existing rule within a policy version.

When updating a rule, use the disabled member to prevent the rule from being evaluated against incoming requests.

PUT /cloudlets/api/v2/policies/{policyId}/versions/{version}/rules/{akaRuleId}

Example: /cloudlets/api/v2/policies/11754/versions/10/rules/5db847a66e0566ad

Content-Type: application/json

Request:

{ "disabled": "true" }

Parameter Type Sample Description
Required
akaRuleId String 5db847a66e0566ad The ID of the rule within the policy version.
policyId Number 11754 The ID of the policy.
version Number 10 The version number of the policy.

Status 200 application/json

Response:

{
    "location": "/cloudlets/api/v2/policies/1002/versions/2/rules/5db847a66e0566ad",
    "akaRuleId": "5db847a66e0566ad",
    "matches": [
        {
            "matchType": "range",
            "objectMatchValue": {
                "type": "range",
                "value": [1, 25]
            },
            "matchOperator": "equals",
            "negate": false,
            "caseSensitive": false
        }
    ],
    "start": 0,
    "end": 0,
    "type": "asMatchRule",
    "disabled": "true",
    "forwardSettings": {
        "originId": "originremote2",
        "useIncomingQueryString": true,
        "pathAndQS": "/sales/Q1/"
    },
    "name": "Q1Sales",
    "id": null
}

  1. Run the List Policies operation.

  2. Store the policyId from the appropriate object within the listing.

  3. Run the List Policy Versions operation with the includeRules query parameter set to true.

  4. Store the version number and the akaRuleId from the appropriate object within the listing.

  5. Create a JSON file with any changes to match rules.

  6. Make a PUT request to /cloudlets/api/v2/policies/{policyId}/versions/{version}/rules/{akaRuleId}, specifying the JSON in the body of the request.

List Associated Properties

GET /cloudlets/api/v2/properties

Status 200 application/json

Response:

{
    "www.myproperty.com": {
        "groupId": 40498,
        "name": "www.myproperty.com",
        "newestVersion": {
            "activatedBy": "jsmith",
            "activationDate": "2015-08-25",
            "cloudletsOrigins": {
                "clorigin2": {
                    "id": "clorigin2",
                    "hostname": "origin2.myproperty.com",
                    "checksum": "0edc0bb1be7439248a77f48e806d2531",
                    "type": "CUSTOMER"
                },
                "clorigin1": {
                    "id": "clorigin1",
                    "hostname": "origin1.myproperty.com",
                    "checksum": "eefa90e680a1183725cfe2a1f00307c4",
                    "type": "CUSTOMER"
                }
            },
            "version": 5,
            "referencedPolicies": [
                "fr_policy_1"
            ]
        },
        "production": {
            "activatedBy": "jsmith",
            "activationDate": "2015-08-26",
            "cloudletsOrigins": {
                "clorigin2": {
                    "id": "clorigin2",
                    "hostname": "origin2.myproperty.com",
                    "checksum": "0edc0bb1be7439248a77f48e806d2531",
                    "type": "CUSTOMER"
                },
                "clorigin1": {
                    "id": "clorigin1",
                    "hostname": "origin1.myproperty.com",
                    "checksum": "eefa90e680a1183725cfe2a1f00307c4",
                    "type": "CUSTOMER"
                }
            },
            "version": 5,
            "referencedPolicies": [
                "fr_policy_1"
            ]
        },
        "staging": {
            "activatedBy": "sjones",
            "activationDate": "2015-08-25",
            "cloudletsOrigins": {
                "clorigin2": {
                    "id": "clorigin2",
                    "hostname": "origin2.myproperty.com",
                    "checksum": "0edc0bb1be7439248a77f48e806d2531",
                    "type": "CUSTOMER"
                },
                "clorigin1": {
                    "id": "clorigin1",
                    "hostname": "origin1.myproperty.com",
                    "checksum": "eefa90e680a1183725cfe2a1f00307c4",
                    "type": "CUSTOMER"
                }
            },
            "version": 5,
            "referencedPolicies": [
                "fr_policy_1"
            ]
        }
    }
}

Get Associated Properties for a Policy

GET /cloudlets/api/v2/policies/{policyId}/properties

Example: /cloudlets/api/v2/policies/11754/properties

Parameter Type Sample Description
Required
policyId Number 11754 The ID of the policy.

Status 200 application/json

Response:

{
    "www.myproperty.com": {
        "groupId": 40498,
        "name": "www.myproperty.com",
        "newestVersion": {
            "activatedBy": "sjones",
            "activationDate": "2015-08-25",
            "cloudletsOrigins": {
                "clorigin2": {
                    "id": "clorigin2",
                    "hostname": "origin2.myproperty.com",
                    "checksum": "0edc0bb1be7439248a77f48e806d2531",
                    "type": "CUSTOMER"
                },
                "clorigin1": {
                    "id": "clorigin1",
                    "hostname": "origin1.myproperty.com",
                    "checksum": "eefa90e680a1183725cfe2a1f00307c4",
                    "type": "CUSTOMER"
                }
            },
            "version": 5,
            "referencedPolicies": [
                "fr_policy_1"
            ]
        },
        "production": {
            "activatedBy": "jsmith",
            "activationDate": "2015-08-26",
            "cloudletsOrigins": {
                "clorigin2": {
                    "id": "clorigin2",
                    "hostname": "origin2.myproperty.com",
                    "checksum": "0edc0bb1be7439248a77f48e806d2531",
                    "type": "CUSTOMER"
                },
                "clorigin1": {
                    "id": "clorigin1",
                    "hostname": "origin1.myproperty.com",
                    "checksum": "eefa90e680a1183725cfe2a1f00307c4",
                    "type": "CUSTOMER"
                }
            },
            "version": 5,
            "referencedPolicies": [
                "fr_policy_1"
            ]
        },
        "staging": {
            "activatedBy": "jsmith",
            "activationDate": "2015-08-25",
            "cloudletsOrigins": {
                "clorigin2": {
                    "id": "clorigin2",
                    "hostname": "origin2.myproperty.com",
                    "checksum": "0edc0bb1be7439248a77f48e806d2531",
                    "type": "CUSTOMER"
                },
                "clorigin1": {
                    "id": "clorigin1",
                    "hostname": "origin1.myproperty.com",
                    "checksum": "eefa90e680a1183725cfe2a1f00307c4",
                    "type": "CUSTOMER"
                }
            },
            "version": 5,
            "referencedPolicies": [
                "fr_policy_1"
            ]
        }
    }
}

  1. Run the List Policies operation.

  2. Store the policyId from the appropriate object within the listing.

  3. Make a GET request to /cloudlets/api/v2/policies/{policyId}/properties, which returns a list of associated properties for a policy

List Cloudlets Origins

For this operation, you have the option of using the type query parameter to narrow the number of results returned by origin type. Options for the type parameter include APPLICATION_LOAD_BALANCER for Application Load Balancer origins, CUSTOMER for standard origins, and NETSTORAGE for NetStorage-based origins. You can use an APPLICATION_LOAD_BALANCER type to create a load balancing configuration.

NOTE: For Application Load Balancer, you can only use origins of type CUSTOMER for the data center origins. Origins with an origin type of APPLICATION_LOAD_BALANCER can support load balancing configurations.

GET /cloudlets/api/v2/origins{?type}

Example: /cloudlets/api/v2/origins?type=APPLICATION_LOAD_BALANCER

Parameter Type Sample Description
Optional
type String APPLICATION_LOAD_BALANCER Returns data for a specific type of origin as defined in Property Manager. Options include alb for Application Load Balancer origins, customer for standard origins, and netstorage for NetStorage-based origins.

Status 200 application/json

Response:

[
    {
        "originId": "nsorigin1",
        "hostname": "download.akamai.com/12345",
        "checksum": "013c0cdefg7439248a77f48e806d2531",
        "type": "NETSTORAGE"
    },
    {
        "originId": "clorigin2",
        "hostname": "origin2.myproperty.com",
        "checksum": "eefa90cdefg9183725cfe2a1f00307c4",
        "type": "CUSTOMER"
    },
    {
        "originId": "alborigin1",
        "checksum": "abcdefg1111hijklmn22222fff76yae2",
        "description": "My super awesome ALB origin"
        "type": "APPLICATION_LOAD_BALANCER"
    }
]

Get a Cloudlets Origin

Run this operation to pull data about a specific Cloudlets Origin from the Property Manager API and into the Cloudlets API.

GET /cloudlets/api/v2/origins/{originId}

Example: /cloudlets/api/v2/origins/clorigin1

Parameter Type Sample Description
Required
originId String clorigin1 Unique identifier for the origin.

Status 200 application/json

Response:

[
    {
        "originId": "clorigin1",
        "checksum": "abcdefg1111hijklmn22222fff76yae3",
        "description": "Origin for mobile user forwarding."
        "type": "APPLICATION_LOAD_BALANCER"
    }
]

  1. Run the List Cloudlets Origins operation.

  2. Store the originId from the appropriate object within the listing.

  3. Make a GET request to /cloudlets/api/v2/origins/{originId}.

Create a Load Balancing Configuration

For Application Load Balancer, run this operation to create a load balancing configuration.

This operation is only available for the APPLICATION_LOAD_BALANCER origin type.

POST /cloudlets/api/v2/origins/{originId}

Example: /cloudlets/api/v2/origins/clorigin1

Parameter Type Sample Description
Required
originId String clorigin1 Unique identifier for the origin.

Status 200 application/json

Response:

{
    "originId": "clorigin1",
    "checksum": "abcdefg1111hijklmn22222fff76yae3",
    "description": "Test load balancing configuration."
    "type": "APPLICATION_LOAD_BALANCER"
}

  1. Run the List Cloudlets Origins operation to verify that the originId you want to create isn’t already in use.

  2. Make a POST request to /cloudlets/api/v2/origins/{originId}.

Update a Load Balancing Configuration

For Application Load Balancer, run this operation to update the description of an existing load balancing configuration.

This operation is only available for the APPLICATION_LOAD_BALANCER origin type.

PUT /cloudlets/api/v2/origins/{originId}

Example: /cloudlets/api/v2/origins/clorigin1

Content-Type: application/json

Request:

{
    "description": "Test load balancing configuration."
}

Parameter Type Sample Description
Required
originId String clorigin1 Unique identifier for the origin.

Status 200 application/json

Response:

{
    "originId": "clorigin1",
    "checksum": "abcdefg1111hijklmn22222fff76yae3",
    "description": "Test load balancing configuration."
    "type": "APPLICATION_LOAD_BALANCER"
}

  1. Run the List Cloudlets Origins operation.

  2. Store the originId from the appropriate object within the listing.

  3. Create a JSON file with an updated entry for the description member.

  4. Make a PUT request to /cloudlets/api/v2/origins/{originId}, specifying the JSON in the body of the request.

List Load Balancing Versions

For Application Load Balancer, run this operation to list all versions of load balancing configuration.

The response lists the versions in descending order.

GET /cloudlets/api/v2/origins/{originId}/versions

Example: /cloudlets/api/v2/origins/clorigin1/versions

Parameter Type Sample Description
Required
originId String clorigin1 Unique identifier for the load balancing configuration.

Status 200 application/json

Response:

[
    {
        "createdBy": "jjones",
        "createdDate": "2016-03-08T11:42:18.690Z",
        "deleted": false,
        "description": "Test load balancing configuration.",
        "immutable": false,
        "lastModifiedBy": "ejnovak",
        "lastModifiedDate": "2016-06-02T00:40:02.237Z",
        "originId": "clorigin1",
        "version": 2
    },
    {
        "createdBy": "jjones",
        "createdDate": "2016-02-08T11:42:18.690Z",
        "deleted": false,
        "description": "Production load balancing configuration.",
        "immutable": false,
        "lastModifiedBy": "ejnovak",
        "lastModifiedDate": "2016-05-02T00:40:02.237Z",
        "originId": "clorigin1",
        "version": 1
    }
]

  1. Run the List Cloudlets Origins operation.

  2. Store the originId from the appropriate object within the listing.

  3. Make a GET request to /cloudlets/api/v2/origins/{originId}/versions.

Create a Load Balancing Version

You can create multiple versions of the load balancing configuration. By versioning these settings, you can test new configurations, or manage changes to the data centers supporting Application Load Balancer.

Only Cloudlets Origins with an originType of APPLICATION_LOAD_BALANCER can support load balancing configurations.

The liveness test for Application Load Balancer uses a basic HTTP poll.

POST /cloudlets/api/v2/origins/{originId}/versions

Example: /cloudlets/api/v2/origins/clorigin1/versions

Content-Type: application/json

Request:

{
    "balancingType": "WEIGHTED",
    "dataCenters": [
        {
            "cloudService": false,
            "livenessHosts": [
                "clorigin3.www.example.com",
            ],
            "latitude": 102.78108,
            "longitude": -116.07064,
            "continent": "NA",
            "country": "US",
            "originId": "clorigin3",
            "percent": 100.0
        }
    ],
    "deleted": false,
    "description": "Test load balancing configuration.",
    "immutable": false,
    "livenessSettings": {
        "hostHeader": "clorigin3.www.example.com",
        "interval": 25,
        "path": "/status",
        "port": 443,
        "protocol": "HTTPS",
        "status3xxFailure": false,
        "status4xxFailure": true,
        "status5xxFailure": false,
        "timeout": 30
    },
    "originId": "clorigin3",
    "version": 4
}

Parameter Type Sample Description
Required
originId String clorigin1 Unique identifier for the load balancing configuration.

Status 201 application/json

Response:

{
    "balancingType": "WEIGHTED",
    "createdBy": "jjones",
    "createdDate": "2015-10-08T11:42:18.690Z",
    "dataCenters": [
        {
            "cloudService": false,
            "livenessHosts": [
                "clorigin3.www.example.com",
            ],
            "latitude": 102.78108,
            "longitude": -116.07064,
            "continent": "NA",
            "country": "US",
            "originId": "clorigin3",
            "percent": 100.0
        }
    ],
    "deleted": false,
    "description": "Test load balancing configuration."
    "immutable": false,
    "lastModifiedBy": "ejnovak",
    "lastModifiedDate": "2016-05-02T00:40:02.237Z",
    "livenessSettings": {
        "hostHeader": "clorigin3.www.example.com",
        "interval": 25,
        "path": "/status",
        "port": 443,
        "protocol": "HTTPS",
        "status3xxFailure": false,
        "status4xxFailure": true,
        "status5xxFailure": false,
        "timeout": 30
    },
    "originId": "clorigin3",
    "version": 4
}

  1. Run the List Cloudlets Origins operation.

  2. Store the originId from the appropriate object within the listing.

  3. Create a JSON file with the following required members: cloudletId, originId, name. See the Cloudlets Origin members for a listing of all members.

  4. Make a POST request to /cloudlets/api/v2/origins/{originId}/versions, specifying the JSON in the body of the request.

Get a Load Balancing Version

For this operation, you have the option of using the validate query parameter. When set to true, this parameter verifies whether the settings for the selected originId and version are valid. The default setting for this parameter is false.

GET /cloudlets/api/v2/origins/{originId}/versions/{version}{?validate}

Example: /cloudlets/api/v2/origins/clorigin1/versions/1?validate=false

Parameter Type Sample Description
Required
originId String clorigin1 Unique identifier for the load balancing configuration.
version Number 1 The origin version.
Optional
validate Boolean false For GET operations, verifies that the current settings for the selected originId and version are valid.

Status 200 application/json

Response:

{
    "balancingType": "WEIGHTED",
    "createdBy": "jjones",
    "createdDate": "2015-10-08T11:42:18.690Z",
    "dataCenters": [
        {
            "cloudService": false,
            "livenessHosts": [
                "clorigin3.www.example.com",
            ],
            "latitude": 102.78108,
            "longitude": -116.07064,
            "continent": "NA",
            "country": "US",
            "originId": "clorigin3",
            "percent": 100.0
        }
    ],
    "deleted": false,
    "description": "Cloudlets origin for ALB rollout.",
    "immutable": false,
    "lastModifiedBy": "ejnovak",
    "lastModifiedDate": "2016-05-02T00:40:02.237Z",
    "livenessSettings": {
        "hostHeader": "clorigin3.www.example.com",
        "interval": 25,
        "path": "/status",
        "port": 443,
        "protocol": "HTTPS",
        "status3xxFailure": false,
        "status4xxFailure": true,
        "status5xxFailure": false,
        "timeout": 30
    },
    "originId": "clorigin1",
    "version": 4
}

  1. Run the List Cloudlets Origins operation.

  2. Store the originId from the appropriate object within the listing. The object should also have an originType of APPLICATION_LOAD_BALANCER.

  3. Run the List Cloudlets Origin Versions operation.

  4. Store the version from the appropriate object within the listing.

  5. Make a GET request to /cloudlets/api/v2/origins/{originId}/versions/{version}.

Update a Load Balancing Version

You cannot edit a load balancing configuration version that has ever been activated.

PUT /cloudlets/api/v2/origins/{originId}/versions/{version}{?validate}

Example: /cloudlets/api/v2/origins/clorigin1/versions/1?validate=false

Content-Type: application/json

Request:

{
    "balancingType": "WEIGHTED",
    "dataCenters": [
        {
            "cloudService": false,
            "latitude": 102.78108,
            "longitude": -116.07064,
            "continent": "NA",
            "country": "US",
            "originId": "clorigin3",
            "percent": 100.0
        }
    ],
    "deleted": false,
    "description": "Cloudlets origin for ALB rollout.",
    "livenessSettings": {
        "path": "/status",
        "port": 443,
        "protocol": "HTTPS",
        "status3xxFailure": false,
        "status4xxFailure": true,
        "status5xxFailure": false
    },
    "originId": "clorigin1",
    "version": 4
}

Parameter Type Sample Description
Required
originId String clorigin1 Unique identifier for the load balancing configuration.
version Number 1 The origin version.
Optional
validate Boolean false For GET operations, verifies that the current settings for the selected originId and version are valid.

Status 200 application/json

Response:

{
    "balancingType": "WEIGHTED",
    "createdBy": "jjones",
    "createdDate": "2015-10-08T11:42:18.690Z",
    "dataCenters": [
        {
            "cloudService": false,
            "livenessHosts": [
                "clorigin3.www.example.com",
            ],
            "latitude": 102.78108,
            "longitude": -116.07064,
            "continent": "NA",
            "country": "US",
            "originId": "clorigin3",
            "percent": 100.0
        }
    ],
    "deleted": false,
    "description": "Test load balancing configuration.",
    "immutable": false,
    "lastModifiedBy": "ejnovak",
    "lastModifiedDate": "2016-05-02T00:40:02.237Z",
    "livenessSettings": {
        "hostHeader": "clorigin3.www.example.com",
        "interval": 25,
        "path": "/status",
        "port": 443,
        "protocol": "HTTPS",
        "status3xxFailure": false,
        "status4xxFailure": true,
        "status5xxFailure": false,
        "timeout": 30
    },
    "originId": "clorigin1",
    "version": 4
}

  1. Run the List Cloudlets Origins operation.

  2. Store the originId from the appropriate object within the listing. The object should also have an originType of APPLICATION_LOAD_BALANCER.

  3. Run the List Cloudlets Origin Versions operation.

  4. Store the version from the appropriate object within the listing.

  5. Run the Get a Cloudlets Origin Version operation.

  6. Create a JSON file with any changes to the Cloudlets Origin members.

  7. Make a PUT request to /cloudlets/api/v2/origins/{originId}/versions/{version}, specifying the JSON in the body of the request.

List Current Load Balancing Activations

GET /cloudlets/api/v2/origins/currentActivations

Status 200 application/json

Response:

{
    "clorigin1": {
        "PRODUCTION": {
            "activatedBy": "jjones",
            "activatedDate": "2016-04-07T18:41:34.251Z",
            "network": "PRODUCTION",
            "originId": "clorigin1",
            "status": "active",
            "version": 1
        },
        "STAGING": {
            "activatedBy": "ejnovak",
            "activatedDate": "2016-05-30T18:41:34.251Z",
            "network": "PRODUCTION",
            "originId": "clorigin1",
            "status": "active",
            "version": 2
        }
    },
    "clorigin2": {
        "STAGING": {
            "activatedBy": "gzhang",
            "activatedDate": "2016-02-03T18:41:34.391Z",
            "network": "STAGING",
            "originId": "clorigin2",
            "status": "active",
            "version": 1
        }
    }
}

List Activations for a Load Balancing Configuration

The response lists the activations by the activatedDate with the most recent listed first.

GET /cloudlets/api/v2/origins/{originId}/activations

Example: /cloudlets/api/v2/origins/clorigin1/activations

Parameter Type Sample Description
Required
originId String clorigin1 Unique identifier for the load balancing configuration.

Status 200 application/json

Response:

[
    {
        "activatedBy": "jjones",
        "activatedDate": "2016-05-03T18:41:34.251Z",
        "network": "PRODUCTION",
        "originId": "clorigin1",
        "status": "active",
        "version": 1
    },
    {
        "activatedBy": "ejnovak",
        "activatedDate": "2016-04-07T18:41:34.461Z",
        "network": "STAGING",
        "originId": "clorigin1",
        "status": "active",
        "version": 2
    }
]

  1. Run the List Cloudlets Origins operation.

  2. Store the originId from the appropriate object within the listing. The object should also have an originType of APPLICATION_LOAD_BALANCER.

  3. Make a GET request to /cloudlets/api/v2/origins/{originId}/activations.

Activate a Load Balancing Version

POST /cloudlets/api/v2/origins/{originId}/activations

Example: /cloudlets/api/v2/origins/clorigin1/activations

Content-Type: application/json

Request:

{
    "network": "STAGING",
    "dryrun": false,
    "version": 1
}

Parameter Type Sample Description
Required
originId String clorigin1 Unique identifier for the load balancing configuration.

Status 200 application/json

Response:

[
    {
        "activatedBy": "jjones",
        "activatedDate": "2016-04-07T18:41:34.251Z",
        "network": "PRODUCTION",
        "originId": "clorigin1",
        "status": "active",
        "dryrun": false,
        "version": 1
    }
]

  1. Run the List Cloudlets Origins operation.

  2. Store the originId from the appropriate object within the listing. The object should also have an originType of APPLICATION_LOAD_BALANCER.

  3. Create a JSON file that includes the required version and network members as listed in the Load Balancing Version Activations for Application Load Balancer section of the data model.

  4. Make a POST request to /cloudlets/api/v2/origins/{originId}/activations, specifying the JSON in the body of the request.

List Policy Activations

Returns the complete activation history for the selected policy in reverse chronological order.

For this operation, you have the option of using the network and the propertyName query parameters to narrow the number of results returned. If using the network parameter, you can enter either staging or production. For the propertyName parameter, you need to know the name of the property associated with the Cloudlets policy versions you want a list of.

GET /cloudlets/api/v2/policies/{policyId}/activations{?network,propertyName}

Example: /cloudlets/api/v2/policies/11754/activations?network=prod&propertyName=prod

Parameter Type Sample Description
Required
policyId Number 11754 The ID of the policy.
Optional
network String prod Returns only activations for the selected network, either staging or prod.
propertyName String prod Returns only activations for the selected property.

Status 200 application/json

Response:

[
    {
    "serviceVersion": null,
    "apiVersion": "2.0",
    "network": "staging",
    "policyInfo":
        {
            "policyId": 2962,
            "name": "RequestControlPolicy",
            "version": 1,
            "status": "ACTIVE",
            "statusDetail": "File successfully deployed to Akamai's network",
            "detailCode": 4000,
            "activationDate": 1427428800000,
            "activatedBy": "jsmith"
        },
    "propertyInfo":
        {
            "name": "www.rc-cloudlet.com",
            "version": 0,
            "groupId": 40498,
            "status": "INACTIVE",
            "activatedBy": null,
            "activationDate": 0
        }
    }
]

  1. Run the List Policies operation.

  2. Store the policyId from the appropriate object within the listing.

  3. Make a GET request to /cloudlets/api/v2/policies/{policyId}/activations, which returns a list of activations for a specific policy.

Activate a Policy Version

Activate the selected cloudlet policy version. After activation completes, the Cloudlets policy is ready for use.

You can activate a policy version with a POST operation against the ../policies/{version}/activations endpoint, if you include the network and version JSON members.

If you include the network attribute in the request body, you can also activate a policy version by issuing a POST to the /cloudlets/api/v2/policies/{policyId}/versions/{version}/activations endpoint.

In addition, if the property version that references the Cloudlet policy is activated, an activation record is created.

The property activation status is either active or inactive.

NOTE: If you are using NetStorage, review the NetStorage Activation Considerations section.

POST /cloudlets/api/v2/policies/{policyId}/versions/{version}/activations

Example: /cloudlets/api/v2/policies/11754/versions/10/activations

Parameter Type Sample Description
Required
policyId Number 11754 The ID of the policy.
version Number 10 The version number of the policy.

  1. If not done already, use the Property Manager API (PAPI) to set up the behavior for each Cloudlet you are configuring:

  2. Run the List Policies operation.

  3. Store the policyId from the appropriate object within the listing.

  4. Run the List Policy Versions operation.

  5. Store the version from the appropriate object within the listing.

  6. Run the Get Associated Properties for a Policy operation.

  7. Store the name of any property that you want to associate with the policy version being activated.

  8. Create a JSON file with information about the network to activate on (staging or production), as well as any optional properties to associate with Cloudlets policy version.

  9. Make a POST request to /cloudlets/api/v2/policies/{policyId}/versions/{version}/activations, specifying the JSON in the body of the request.

Get a Schema

Get a JSON schema for interacting with policies to validate different requests used with this API.

For the request’s schemaName, use one the following, where cloudletType corresponds to the cloudletCode available from List Cloudlets.

Action to Validate JSON Schema Name
Create a new policy create-policy.json
Update a policy update-policy.json
Clone an existing policy clone-policy.json
Create or clone a policy version create-nimbus_policy_version-{cloudletType}-1.0.json
Update a policy version update-nimbus_policy_version-{cloudletType}-1.0.json
Create or update a match rule match_rule-{cloudletType}-1.0.json

GET /cloudlets/api/v2/schemas/{schemaName}

Example: /cloudlets/api/v2/schemas/create-policy.json

Parameter Type Sample Description
Required
schemaName String create-policy.json The name of the JSON schema file.

Status 200 application/json

Response:

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "CREATE POLICY",
    "description": "applied to requests to create policies of the form: POST /cloudlets/api/v2/policies",
    "version" : "1.0",
    "location" : "/cloudlets/api/v2/schemas/create-policy.json",
    "type": "object",
    "properties": {
        "name": {
            "type": "string",
            "pattern": "^[a-z_A-Z0-9]+$",
            "maxLength": 64
        },
        "cloudletId": {
            "type": "integer",
            "enum": [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ]
        },
        "description": {
            "type": [ "string", "null" ],
            "maxLength": 255
        },
        "propertyName": {
            "type": [ "string", "null" ],
            "pattern": "^[a-z_A-Z0-9\\.\\-]+$"
        },
        "groupId": {
            "type": "integer"
        }
    },
    "required": [ "cloudletId", "name" ],
    "additionalProperties": false
}

List Schemas per Cloudlet

Get links to all the JSON schemas by Cloudlet type (cloudletCode) to validate different requests used with this API. See List Cloudlets for information on how to obtain the cloudletCode.

GET /cloudlets/api/v2/schemas{?cloudletType}

Example: /cloudlets/api/v2/schemas?cloudletType=ER

Parameter Type Sample Description
Optional
cloudletType String ER The two- or three- letter code of the Cloudlet you want to view all schemas for. This value corresponds to the cloudletCode member available from List Cloudlets.

Status 200 application/json

Response:

{
    "schemas":
    [{
        "title": "EDGE REDIRECTOR MATCH RULE",
        "version": "1.0",
        "location": "/cloudlets/api/v2/schemas/match_rule-ER-1.0.json",
        "description": "applied to create/update match rule requests for ER cloudlets, where requests are of the form: POST|PUT /api/v2/policies/{policyId}/versions/{versionId}/rules/{ruleId}",
         "additionalDescription": "null"
    },
    {
        "title": "CREATE/CLONE POLICY VERSION",
        "version": "1.0",
        "location": "/cloudlets/api/v2/schemas/create-nimbus_policy_version-ER-1.0.json",
        "description": "applied to create/clone policy version requests of form: POST /policies/{policyId}/versions ",
        "additionalDescription": "applied to policy version requests for ER cloudlets"
    },
    {
        "title": "UPDATE POLICY VERSION",
        "version": "1.0",
        "location": "/cloudlets/api/v2/schemas/update-nimbus_policy_version-ER-1.0.json",
        "description": "applied to update policy version requests of form: PUT /policies/{policyId}/versions/{versionId} ",
        "additionalDescription": "applied to policy version requests for ER cloudlets"
    },
    {
        "title": "CREATE POLICY",
        "version": "1.0",
        "location": "/cloudlets/api/v2/schemas/create-policy.json",
        "description": "applied to requests to create policies of the form: POST /cloudlets/api/v2/policies",
        "additionalDescription": "null"
    },
    {
        "title": "UPDATE POLICY",
        "version": "1.0",
        "location": "/cloudlets/api/v2/schemas/update-policy.json",
        "description": "applied to all requests to update policies of the form: PUT /cloudlets/api/v2/policies/{policyId}",
        "additionalDescription": "null"
    },
    {
        "title": "CLONE POLICY",
        "version": "1.0",
        "location": "/cloudlets/api/v2/schemas/clone-policy.json",
        "description": "applied to requests to clone policies of the form: POST /cloudlets/api/v2/policies?clonePolicyId=***",
        "additionalDescription": "null"
    }]
}


Last modified: 1/9/2017