SLA API Data Model

This section provides details about the structure and component members of the objects the SLA API exchanges.

Quota

Each contract has a maximum number of allowed test configurations. The quota object indicates how many test configurations are allowed on the specified contract and how many are in use.

Sample JSON:

{
    "contractId": "1-2ABCD",
    "availabilitySlaCounts": {
        "used": 0,
        "max": 1
    },
    "performanceSlaCounts": {
        "used": 0,
        "max": 1
    }
}

Quota Members

Member Type Description
Required
contractId String The contract for which you want to retrieve quota information.
Optional
availabilitySlaCounts Quota.* Object containing quota information for availability test configurations.
performanceSlaCounts Quota.* Object containing quota information for performance test configurations.

Quota.*

Member Type Description
Optional
max Number The maximum number of allowed test configurations of the specified type (integer).
used Number The number of test configurations of the specified type that are currently used (integer).

Test

Represents a configuration of either an availability test or a performance test. A test object can be used to add a new test configuration, update an existing one, or get the settings of a specified configuration.

Sample JSON:

{
    "groupId": 1,
    "slaTestId": 82,
    "contractId": "1-2ABCD",
    "agentGroupId": 123,
    "name": "My Test Name",
    "type": "PERFORMANCE",
    "performanceSlaTarget": 1.1,
    "testDetails": {
        "originUrl": "http://www.example.com/path/sla-test-object.html",
        "akamaiUrl": "http://www.example.com/path/sla-test-object.html",
        "originDnsHostnameOverride": "unpredictablestring-www.example.com"
    }
}

Test Members

Member Type Description
Required
agentGroupId Numeric Enumeration Code representing the agent group (also called a region or regional SLA) for the test configuration. See agentGroupId Values for information on corresponding name values.
contractId String The contract associated with the test configuration.
name String Name that the user creates to identify test configurations and their associated reports.
type Enumeration The test configuration type: PERFORMANCE or AVAILABILITY.
Optional
groupId Number Identifier of the group containing the property; see the Property Manager API (PAPI), which provides these IDs. Required when creating a test configuration.
performanceSlaTarget Number The target performance as set forth in the SLA; expressed as a decimal number greater than or equal to 1.0. For a target performance improvement of 20%, specify 1.2.
slaTestId Number Globally unique numeric identifier that the system assigns to a newly created test configuration.
testDetails Test.testDetails Container for information about test object location and hostnames, described below.

Test.testDetails

Member Type Description
Required
akamaiUrl String The URL of the test object for the CDN portion of the test.
originUrl String The URL of the test object for the origin portion of the test; use outward-facing hostname if originDnsHostnameOverride is included; if not, use origin hostname.
Optional
originDnsHostnameOverride String Replaces the hostname in originUrl for the purposes of DNS lookup to obtain the IP address of the origin server; use if requests sent directly to your origin hostname redirect to the CDN.

agentGroupId Values

The following details the range of enumeration values for the agentGroupId member of the Test object.

Value of agentGroupId Value of Corresponding name
5 North American SLA
10 Global SLA
18 Europe SLA
19 China SLA
29 NE APAC SLA
33 APJ SLA
34 ASEAN SLA
35 Australia SLA
36 India SLA

PerformanceReport

Represents the performance test results for the specified date range. Each item in the data array contains aggregate performance data for one calendar day.

Sample JSON:

{
    "data": [
        {
            "date": "2016-03-09",
            "averageAkamaiPerformanceGain": 1.2573270808909731,
            "numberOfAkamaiTests": 1385,
            "numberOfOriginTests": 1385,
            "averageResponseTimeOrigin": 2145,
            "averageResponseTimeAkamai": 1706
        },
        {
            "date": "2016-03-10",
            "averageAkamaiPerformanceGain": 1.1373414230557088,
            "numberOfAkamaiTests": 1329,
            "numberOfOriginTests": 1329,
            "averageResponseTimeOrigin": 2062,
            "averageResponseTimeAkamai": 1813
        },
        {
            "date": "2016-03-11",
            "averageAkamaiPerformanceGain": 1.3577405857740585,
            "numberOfAkamaiTests": 1245,
            "numberOfOriginTests": 1245,
            "averageResponseTimeOrigin": 1947,
            "averageResponseTimeAkamai": 1434
        }
    ]
}

PerformanceReport Members

Member Type Description
Optional
data PerformanceReport.data.[n] Container for the instances of performance report data.

PerformanceReport.data.[n]  

Member Type Description
Optional
averageAkamaiPerformanceGain Number The average of all performance gains for the specified date; each instance calculated as (averageResponseTimeOrigin) / (averageResponseTimeAkamai).
averageResponseTimeAkamai Number The average of all CDN test times in milliseconds measured on the specified date.
averageResponseTimeOrigin Number The average of all origin test times in milliseconds measured on the specified date.
date String The calendar day of tests to be summarized; format is YYYY-MM-DD.
numberOfAkamaiTests Number The number of CDN performance test measurements included in the aggregation.
numberOfOriginTests Number The number of origin performance test measurements included in the aggregation.

AvailabilityReport

Represents the results of availability testing for the specified date range.

Sample JSON:

{
    "estimatedAvailabilityPercentage": 1,
    "originTestErrors": [
        {
            "agentName": "Frankfurt, Germany",
            "agentIp": "192.168.1.1",
            "time": "2016-03-09T03:29:25Z"
        },
        {
            "agentName": "Berlin, Germany",
            "agentIp": "192.168.1.2",
            "time": "2016-03-09T08:20:11Z"
        },
        {
            "agentName": "Paris, France",
            "agentIp": "192.168.1.3",
            "time": "2016-03-09T09:31:37Z"
        }
    ],
    "akamaiTestErrors": [
        {
            "agentName": "Frankfurt, Germany",
            "agentIp": "192.168.1.1",
            "time": "2016-03-09T03:29:25Z"
        },
        {
            "agentName": "Berlin, Germany",
            "agentIp": "192.168.1.2",
            "time": "2016-03-09T08:20:11Z"
        },
        {
            "agentName": "Paris, France",
            "agentIp": "192.168.1.3",
            "time": "2016-03-09T09:31:37Z"
        }
    ]
}

AvailabilityReport Members

Member Type Description
Optional
akamaiTestErrors AvailabilityReport.*.[n] Instances of the CDN test that reported failures.
estimatedAvailabilityPercentage Number Estimated portion of time in the selected date range for which no potential outage was detected expressed as a number from 0–1 representing a percentage. (1 = 100%, 0.9 = 90%, etc.)
originTestErrors AvailabilityReport.*.[n] Instances of the origin test that reported failures.

AvailabilityReport.*.[n]  

The following object is referenced by both the originTestErrors and akamaiTestErrors members.

Member Type Description
Optional
agentIp String The IP address of the agent.
agentName String The geographical location of the agent used in an origin or CDN availability test that failed.
time String Time that error occurred; format is ISO–8601 UTC (YYYY-MM-DDTHH:MM:SSZ); time zones other than UTC are not allowed.

AgentGroup

Represents the set of possible agents in which tests for a given SLA test configuration are run. Agents groups are defined by geographical location. This setting usually corresponds to the regional SLA provided to you with your purchase.

Sample JSON:

[
    {
        "agentGroupId": 1,
        "name": "Australia SLA"
    },
    {
        "agentGroupId": 5,
        "name": "North American SLA"
    }
]

AgentGroup Members

Member Type Description
Optional
agentGroupId Numeric Enumeration Code representing the agent group (also called a region or regional SLA) for the test configuration.
name String Descriptive name of an agent group indicating its geographical region.

Last modified: 11/22/2016