Adaptive Acceleration API v1

Shows how your Adaptive Acceleration configuration affects your content.

Learn more:


Overview

The Adaptive Acceleration product uses Automatic Server Push, with the HTTP/2 protocol, and Automatic Preconnect to increase the speed of page loading. The Adaptive Acceleration API provides the ability to see which rules Adaptive Acceleration applies to a property. It also allows you to start the generation of new rules.

Who should use this API

This API reports how Adaptive Acceleration was applied to a set of web pages. It also allows you to reset the rules when you do a large site update and you want to ensure that Adaptive Acceleration has a policy that is up to date with all of your new resources. These rules are made up of the list of hostnames that Adaptive Acceleration currently preconnects to. They are also made up of the list of resources that Adaptive Acceleration pushes to the browser using server push. There are two different types of rules:

  • Default rule: This rule applies to the entire Property Manager property. The default rule shows all the resources pushed and preconnected to for any URL with Adaptive Acceleration enabled that is in the property.

  • URL-specific rules: These rules show the additional resources, other than those in the default, that Adaptive Acceleration pushes or preconnects to.

Getting started

Before using the API for the first time:

  • Review Get Started for API tools that Akamai provides.

  • Review Authorize Your Client to create your Akamai API access credentials and authorizations. As detailed in The API Identity Model, you then access the API using custom hostnames that looks like this: https://akzz-XXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXX.luna.akamaiapis.net.

After provisioning the API token, the user associated with the unique token can submit cases on behalf of other users. The property ID is an external dependency for using this API. Get a relevant propertyId value from the List Properties operation in the Property Manager API. You use the same value, but with the prp_ prefix removed. For example, instead of prp_175780, you specify 175780. You can also get this ID in the Property Manager user interface.

Resources

This section provides details on the API’s operations.

API summary

Download the RAML descriptors for this API.

Operation Method Endpoint
Report on a Property GET /adaptive-acceleration/v1/properties/{propertyId}
Reset a Property Report POST /adaptive-acceleration/v1/properties/{propertyId}/reset

Report on a property

Get a specific property.

GET /adaptive-acceleration/v1/properties/{propertyId}

Sample: /adaptive-acceleration/v1/properties/175780

Parameter Type Sample Description
URL parameters
propertyId Number 175780 A unique identifier for a property.

Status 200 application/json

Response Body:

{
    "creationDate": "2016-08-25T16:45:02Z",
    "isActive": true,
    "lastModifiedDate": "2016-08-25T16:45:02Z",
    "lastReset": "2016-08-25T16:45:02Z",
    "zoneDeployDate": "2017-01-26T18:07:01Z",
    "version": 123,
    "commonPreconnectHeader": [
        "https://www.example0.com"
    ],
    "commonPushedResources": [
        "https://www.example.com/66dc044c-c886-4eb5-8ff2-d9721ec27fc3.js",
        "https://www.example.com/3e940cc8-8170-4e02-8ba4-5d967a997518.js",
        "https://www.example.com/1f682d27-2afa-4e3a-ac1a-2616629152e7.js",
        "https://www.example.com/12345678-c886-4eb5-8ff2-d9721ec27fc3.js"
    ],
    "pageSpecificRules": [
        {
            "basePageURL": "https://qa.www.example.com/checkout/receipt.jsp",
            "pageSpecificPreconnectHeader": [
                "https://www.example3.com"
            ],
            "pageSpecificPushedResources": [
                "https://qa.www.example.com/css/13455/all.css",
                "https://qa.www.example.com/css/13455/checkout/checkout.css",
                "https://qa.www.example.com/css/13455/checkout/receipt.css",
                "https://qa.www.example.com/js/13455/checkout/checkout.js",
                "https://qa.www.example.com/js/13455/be/ee522b75/scripts/lite-578e4f4264746d53-staging.js",
                "https://qa.www.example.com/js/13455/be/30ea2b75/scripts/lite-554041283961326d-staging.js",
                "https://qa.www.example.com/js/13455/be/b8eeeab7/scripts/lite-561eaa6565363300-staging.js"
            ],
            "basePageURL": "https://www.example.com/30dbc1a6-c9e4-474b-a525-70577c90c62d.html",
            "pageSpecificPreconnectHeader": [
                "https://www.example4.com"
            ],
            "pageSpecificPushedResources": [
                "https://www.example.com/c2be42fc-cc9a-4088-ab1c-1417ac212b6f.css",
                "https://www.example.com/c1ebcb4b-0a1a-4c64-9cc2-59de8ab25995.css",
                "https://www.example.com/34333a06-8e1e-4171-ae19-6560960d24df.css",
                "https://www.example.com/9eea3314-ea4e-4398-8dc7-a049c9706918.css",
                "https://www.example.com/8c8bf80a-dc13-4177-b360-3c7b97aa6d9b.css"
            ]
        }
    ]
}

Reset a property report

After you set up Adaptive Acceleration and view a report for the first time, you can use Reset to purge all the existing information about previous resources pushed and preconnected to and then reset the rules for pushing and preconnecting to resources. If the identity associated with the API token does not have read/write permission within Luna, a 403 error results.

POST /adaptive-acceleration/v1/properties/{propertyId}/reset

Sample: /adaptive-acceleration/v1/properties/175780/reset

Parameter Type Sample Description
URL parameters
propertyId Number 175780 A unique identifier for a property.

Status 204

Data

This section provides details for each type of data object the API exchanges.

Download the JSON schemas for this API.

The data schema tables below list membership requirements as follows:

Member is required to be present, regardless of whether its value is empty or null.
Member is optional, and may be omitted in some cases.

PropertyReport

Encapsulates Adaptive Acceleration rules targeted to a specific property.

Download schema: property.json

Sample GET response:

{
    "creationDate": "2016-08-25T16:45:02Z",
    "isActive": true,
    "lastModifiedDate": "2016-08-25T16:45:02Z",
    "lastReset": "2016-08-25T16:45:02Z",
    "zoneDeployDate": "2017-01-26T18:07:01Z",
    "version": 123,
    "commonPreconnectHeader": [
        "https://www.example0.com"
    ],
    "commonPushedResources": [
        "https://www.example.com/66dc044c-c886-4eb5-8ff2-d9721ec27fc3.js",
        "https://www.example.com/3e940cc8-8170-4e02-8ba4-5d967a997518.js",
        "https://www.example.com/1f682d27-2afa-4e3a-ac1a-2616629152e7.js",
        "https://www.example.com/12345678-c886-4eb5-8ff2-d9721ec27fc3.js"
    ],
    "pageSpecificRules": [
        {
            "basePageURL": "https://qa.www.example.com/checkout/receipt.jsp",
            "pageSpecificPreconnectHeader": [
                "https://www.example3.com"
            ],
            "pageSpecificPushedResources": [
                "https://qa.www.example.com/css/13455/all.css",
                "https://qa.www.example.com/css/13455/checkout/checkout.css",
                "https://qa.www.example.com/css/13455/checkout/receipt.css",
                "https://qa.www.example.com/js/13455/checkout/checkout.js",
                "https://qa.www.example.com/js/13455/be/ee522b75/scripts/lite-578e4f4264746d53-staging.js",
                "https://qa.www.example.com/js/13455/be/30ea2b75/scripts/lite-554041283961326d-staging.js",
                "https://qa.www.example.com/js/13455/be/b8eeeab7/scripts/lite-561eaa6565363300-staging.js"
            ],
            "basePageURL": "https://www.example.com/30dbc1a6-c9e4-474b-a525-70577c90c62d.html",
            "pageSpecificPreconnectHeader": [
                "https://www.example4.com"
            ],
            "pageSpecificPushedResources": [
                "https://www.example.com/c2be42fc-cc9a-4088-ab1c-1417ac212b6f.css",
                "https://www.example.com/c1ebcb4b-0a1a-4c64-9cc2-59de8ab25995.css",
                "https://www.example.com/34333a06-8e1e-4171-ae19-6560960d24df.css",
                "https://www.example.com/9eea3314-ea4e-4398-8dc7-a049c9706918.css",
                "https://www.example.com/8c8bf80a-dc13-4177-b360-3c7b97aa6d9b.css"
            ]
        }
    ]
}

PropertyReport members

Member Type Required Description
commonPreconnectHeader Array List of header contents that Adaptive Acceleration currently preconnects to.
pageSpecificPushedResources Array List of URLs for which Adaptive Acceleration currently performs a server push.
creationDate String An ISO–8601 timestamp representing when the system created the Adaptive Acceleration rules.
isActive Boolean If enabled, indicates whether the Adaptive Acceleration feature has been activated for the reported period.
lastModifiedDate String An ISO–8601 timestamp representing when the system last modified the Adaptive Acceleration rules.
lastReset String An ISO–8601 timestamp representing when you reset the Adaptive Acceleration rules, or the last time you created the rules.
pageSpecificRules PropertyReport.pageSpecificRules[] Encapsulates Adaptive Acceleration rules targeted to a specific page.
version Integer Version of the Adaptive Acceleration rules.
zoneDeployDate String An ISO–8601 timestamp representing when the Adaptive Acceleration rules were last updated.
PropertyReport.pageSpecificRules[]: Encapsulates Adaptive Acceleration rules targeted to a specific page.
basePageURL String This is the URL in question.
commonPreconnectHeader Array List of header contents that Adaptive Acceleration currently preconnects to.
pageSpecificPushedResources Array List of URLs for which Adaptive Acceleration currently performs a server push.

Errors

This section provides details on the data object that reflects the API’s common response to error cases, and lists the API’s range of response status codes for both error and success cases.

Error responses

The following shows a typical error response. The outer object characterizes the overall problem, while the details array lists potentially more than one problem detected in the request.

{
    "code": "bad.request",
    "details": [
        {
            "code": "bad.request.error",
            "message": "CaseId provided is incorrect"
        }
    ],
    "incidentId": "0c296a9e-b063-44d1-a6c0-35228becc4ab",
    "title": "Bad Request"
}

Error members

Member Type Description
Required
code String Identifies a type of error that characterizes the overall problem.
details Error.details Provides details on potentially more than one error detected in the request.
incidentId String Provides a unique identifier for the problem, useful when communicating with Akamai support.
title String A descriptive label for the overall problem.
Error.details[]
code String Identifies a type of error that characterizes each specific problem.
message String Describes each specific problem.

HTTP status codes

The following lists the range of HTTP response codes the API may produce for both success and error cases:

Code Description
200 Request OK
201 Resource created
401 Unauthorized request
402 Failed request
403 Forbidden
404 Resource not found
405 Method not allowed
409 Conflict
415 Unsupported media type
429 Too many requests
500 Internal Server Error
503 Service Unavailable

Last modified: 1/25/2018