Log Delivery Service API v1

View, update and delete configurations for the Portal log delivery service.

Learn more:


Overview

The Log Delivery Service API allows users to view, update, and delete configurations for the Luna portal’s log delivery service. The scope of the returned data is limited by the user’s account: its permissions and accessible set of acgObjects. The API provides data for the last 15 months.

NOTE: A new version of this API is available. See Log Delivery Service API v3 for details.

API versioning

The Log Delivery Service REST API is versioned by including a version stamp as part of the request URI. For example, /v1/.... As of December 16, 2014, the Log Delivery Service API has one version: v1.

When accessing the API, all documented REST resources are available under all versions, even if nothing to that call has changed. For example, /lds/v1/configurations was not changed between v1 and v2, but is accessible under both v1 and v2. The general idea is that clients can use a single version at a time, rather than mix versions from REST call to REST call.

Getting help

If you encounter an issue that requires immediate assistance, contact Technical Support.

Resources

The Log Delivery Service API allows users to view, update, and delete configurations for the Luna portal’s log delivery service.

API summary

Operation Method Endpoint
Log Delivery Configurations
List Configurations GET /lds/v1/configurations
Create a Configuration POST /lds/v1/configurations
Get a Configuration GET /lds/v1/configurations/{serviceId}
Modify a Configuration PUT /lds/v1/configurations/{serviceId}
Remove a Configuration DELETE /lds/v1/configurations/{serviceId}
Copy a Configuration POST /lds/v1/configurations/copy/{sourceServiceId}
Suspend a Configuration POST /lds/v1/configurations/suspend/{serviceId}
Resume a Configuration POST /lds/v1/configurations/resume/{serviceId}
List Redeliveries GET /lds/v1/redeliveries
Create a Redelivery POST /lds/v1/redeliveries
Get a Redelivery GET /lds/v1/redeliveries/{redeliveryId}
Log Delivery Dictionaries
Get a Dictionary GET /lds/v1/dictionaries/{dictionaryName}{?objectType,objectId,currentValueKey}
Get Validation Context GET /lds/v1/dictionaries/{dictionaryName}/validation/data

List configurations

Gets Log Delivery Configurations for all acgObjects to which the currently logged-in user has access. This method retrieves CP code, EDNS, and GTM property configurations. For details on response members, see the Configuration object.

GET /lds/v1/configurations

Status 200 application/json

Response:

{
    "status": "ok",
    "content": [
        {
            "serviceId": 13130,
            "type": "CpCodeConfiguration",
            "deliveryType": "EMAIL",
            "emailConfiguration": { "emailAddress": "asf@Fafaf.plaaaa" },
            "ftpConfiguration": null,
            "contact": {
                "contactEmail": [
                    "aaa@aaa.com",
                    "asfasf@Fafa.pl"
                ],
                "dictId": "F-CO-457059"
            },
            "status": "EXPIRED",
            "startDate": {},
            "endDate": {},
            "logFormat": { "dictId": "22" },
            "logIdentifier": "asfasfafa",
            "aggregationType": "COLLECTION",
            "deliveryFrequency": { "dictId": "1" },
            "deliveryThreshold": "99",
            "deliverResidual": null,
            "messageSize": { "dictId": "4" },
            "encoding": { "dictId": "2" },
            "encodingKey": null,
            "configurationType": "PRIMARY",
            "acgObject": {
                "id": 100443,
                "type": "CP_CODE",
                "name": "100443 - Universalsports HD Silverlight"
            },
            "productGroupId": 1,
            "cpCode": {
                "dictValue": "Universalsports HD Silverlight",
                "dictId": "100443"
            },
            "dnsZone": null
        }
    ],
    "errorCode": null,
    "incidentId": null,
    "errorParameters": null,
    "errorMessage": null,
    "resolution": null
}

Create a configuration

Create a Log Delivery Configuration. If the request is successful, response contents is set to serviceId of newly created configuration. For details on response members, see the Configuration object.

POST /lds/v1/configurations

Content-Type: application/json

Request:

{
    "configurationType": "PRIMARY",
    "acgObject": {
        "id": 222222,
        "type": "CP_CODE"
    },
    "productGroupId": 1,
    "startDate": 1401840000000,
    "endDate": 1402531200000,
    "logFormat": { "dictId": "16" },
    "logIdentifier": "fasfasfa",
    "aggregationType": "CALENDAR",
    "deliveryType": "EMAIL",
    "emailConfiguration": { "emailAddress": "saf@fa.pl" },
    "deliveryThreshold": "99",
    "deliverResidualFlag": true,
    "messageSize": { "dictId": "3" },
    "encoding": { "dictId": "4" },
    "encodingKey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\nxxxx\n-----END PGP PUBLIC KEY BLOCK-----",
    "contact": {
        "dictId": "xxxxx",
        "contactEmail": [
            "aaa@aa.pl",
            "bbb@bbb.com"
        ]
    }
}

Status 200 application/json

Response:

{
    "status": "ok",
    "contents": 13130,
    "errorCode": null,
    "incidentId": null,
    "errorParameters": null,
    "errorMessage": null,
    "resolution": null
}

Get a configuration

Gets information about Log Delivery Configuration for the specified serviceId. For details on response members, see the Configuration object.

GET /lds/v1/configurations/{serviceId}

Example: /lds/v1/configurations/13130

Parameter Type Sample Description
Required
serviceId Number 13130 ID of the configuration.

Status 200 application/json

Response:

{
    "status": "ok",
    "content": {
        "type": "CpCodeConfiguration",
        "serviceId": 13130,
        "deliveryType": "EMAIL",
        "emailConfiguration": { "emailAddress": "asf@Fafaf.plaaaa" },
        "ftpConfiguration": null,
        "contact": {
            "contactEmail": [
                "aaa@aaa.com",
                "asfasf@Fafa.pl"
            ],
            "dictId": "F-CO-457059"
        },
        "status": "EXPIRED",
        "startDate": {},
        "endDate": {},
        "logFormat": { "dictId": "22" },
        "logIdentifier": "asfasfafa",
        "aggregationType": "COLLECTION",
        "deliveryFrequency": { "dictId": "1" },
        "deliveryThreshold": "99",
        "deliverResidual": null,
        "messageSize": { "dictId": "4" },
        "deletedDate": {},
        "encoding": { "dictId": "2" },
        "encodingKey": null,
        "configurationType": "PRIMARY",
        "acgObject": {
            "id": 100443,
            "type": "CP_CODE",
            "name": "100443 - Universalsports HD Silverlight"
        },
        "productGroupId": 1,
        "cpCode": {
            "dictValue": "Universalsports HD Silverlight",
            "dictId": "100443"
        },
        "dnsZone": null
    },
    "errorCode": null,
    "incidentId": null,
    "errorParameters": null,
    "errorMessage": null,
    "resolution": null
}

Modify a configuration

Updates Log Delivery Configuration for given serviceId. For details on response members, see the Configuration object.

PUT /lds/v1/configurations/{serviceId}

Example: /lds/v1/configurations/13130

Content-Type: application/json

Request:

{
    "configurationType": "SHADOW",
    "acgObject": {
        "id": 11111,
        "type": "EDNS"
    },
    "productGroupId": 1,
    "startDate": 1402358400000,
    "endDate": 1403222400000,
    "logFormat": { "dictId": "17" },
    "logIdentifier": "asfa",
    "aggregationType": "COLLECTION",
    "deliveryType": "EMAIL",
    "ftpConfiguration": {
        "login": "ftpLogin",
        "machine": "ftpMachine",
        "password": "ftpPassword",
        "directory": "path/to/directory"
    },
    "deliveryFrequency": { "dictId": "1" },
    "messageSize": { "dictId": "3" },
    "encoding": { "dictId": "2" },
    "contact": {
        "contactEmail": [ "asf@Fa.pl" ],
        "dictId": "xxxx"
    }
}

Parameter Type Sample Description
Required
serviceId Number 13130 ID of the configuration.

Status 200 application/json

Response:

{
    "status": "ok",
    "contents": "ok",
    "errorCode": null,
    "incidentId": null,
    "errorParameters": null,
    "errorMessage": null,
    "resolution": null
}

Remove a configuration

Deletes Log Delivery Configuration for given serviceId.

DELETE /lds/v1/configurations/{serviceId}

Example: /lds/v1/configurations/13130

Parameter Type Sample Description
Required
serviceId Number 13130 ID of the configuration.

Status 200 application/json

Response:

{
    "status": "ok",
    "contents": "ok",
    "errorCode": null,
    "incidentId": null,
    "errorParameters": null,
    "errorMessage": null,
    "resolution": null
}

Copy a configuration

Create a copy of a Log Delivery Configuration based for a given sourceServiceId. For details on response members within the target, see the ConfigurationCopy object.

POST /lds/v1/configurations/copy/{sourceServiceId}

Example: /lds/v1/configurations/copy/13130

Content-Type: application/json

Request:

{
    "target": {
        "acgObjectId": "111111",
        "acgObjectType": "CP_CODE",
        "productGroupId": 1
    }
}

Parameter Type Sample Description
Required
sourceServiceId Number 13130 ID of the source configuration for copy.

Status 200 application/json

Response:

{
    "status": "ok",
    "contents": "ok",
    "errorCode": null,
    "incidentId": null,
    "errorParameters": null,
    "errorMessage": null,
    "resolution": null
}

Suspend a configuration

Suspend log delivery configuration for given serviceId.

POST /lds/v1/configurations/suspend/{serviceId}

Example: /lds/v1/configurations/suspend/13130

Content-Type: application/json

Request:

{}

Parameter Type Sample Description
Required
serviceId Number 13130 ID of the configuration.

Status 200 application/json

Response:

{
    "status": "ok",
    "contents": "ok",
    "errorCode": null,
    "incidentId": null,
    "errorParameters": null,
    "errorMessage": null,
    "resolution": null
}

Resume a configuration

Resume log delivery configuration for given serviceId.

POST /lds/v1/configurations/resume/{serviceId}

Example: /lds/v1/configurations/resume/13130

Content-Type: application/json

Request:

{}

Parameter Type Sample Description
Required
serviceId Number 13130 ID of the configuration.

Status 200 application/json

Response:

{
    "status": "ok",
    "contents": "ok",
    "errorCode": null,
    "incidentId": null,
    "errorParameters": null,
    "errorMessage": null,
    "resolution": null
}

List redeliveries

Lists all log redelivery requests. For details on response members, see the Redelivery object.

GET /lds/v1/redeliveries

Status 200 application/json

Response:

{
    "status": "ok",
    "contents": [
        {
            "serviceId": 190083,
            "id": 196236,
            "status": "NEW",
            "beginTime": 0,
            "endTime": 24,
            "createdDate": 1403706381000,
            "modifiedDate": 1403706381000,
            "redeliveryDate": 1403568000000
        },
        {
            "serviceId": 190083,
            "id": 196237,
            "status": "NEW",
            "beginTime": 0,
            "endTime": 24,
            "createdDate": 1403706381000,
            "modifiedDate": 1403706381000,
            "redeliveryDate": 1403654400000
        },
        {
            "serviceId": 190083,
            "id": 196233,
            "status": "NEW",
            "beginTime": 0,
            "endTime": 24,
            "createdDate": 1403706380000,
            "modifiedDate": 1403706380000,
            "redeliveryDate": 1403308800000
        }
    ],
    "errorCode": null,
    "incidentId": null,
    "errorParameters": null,
    "errorMessage": null,
    "resolution": null
}

Create a redelivery

Create a Log Configuration redelivery request. If the request is successful, the response contains a newly created redelivery identifier. For details on response members, see the Redelivery object.

POST /lds/v1/redeliveries

Content-Type: application/json

Request:

{
    "serviceId": 188937,
    "beginTime": 0,
    "endTime": 24,
    "redeliveryDate": 1402531200000
}

Status 200 application/json

Response:

{
    "status": "ok",
    "contents": 786,
    "errorCode": null,
    "incidentId": null,
    "errorParameters": null,
    "errorMessage": null,
    "resolution": null
}

Get a redelivery

Gets information about redelivery request for the specified redeliveryId. For details on response members, see the Redelivery object.

GET /lds/v1/redeliveries/{redeliveryId}

Example: /lds/v1/redeliveries/196082

Parameter Type Sample Description
Required
redeliveryId Number 196082 ID of the redelivery.

Status 200 application/json

Response:

{
    "status": "ok",
    "content": {
        "serviceId": 13130,
        "id": 196082,
        "status": "NEW",
        "beginTime": 0,
        "endTime": 24,
        "createdDate": 1403519955000,
        "modifiedDate": 1403519955000,
        "redeliveryDate": 1403481600000
    },
    "errorCode": null,
    "incidentId": null,
    "errorParameters": null,
    "errorMessage": null,
    "resolution": null
}

Get a dictionary

Get a list of dictionary items. Each dictionary item contains key and value members.

GET /lds/v1/dictionaries/{dictionaryName}{?objectType,objectId,currentValueKey}

Example: /lds/v1/dictionaries/DELIVERY_FREQUENCY?objectType=CP_CODE&objectId=100443&currentValueKey=7

Parameter Type Sample Description
Required
dictionaryName Enumeration DELIVERY_FREQUENCY Dictionary name value. Possible values: DELIVERY_FREQUENCY, ENCODINGS, LOG_FORMATS, MESSAGE_SIZES, PHONES, PRODUCTS, PRODUCT_GROUPS_FOR_ACGS.
Optional
currentValueKey String 7 Value of current key. This is always included in the returned list for dictionaries where values are dynamically evaluated (i.e. LOG_FORMATS).
objectId Number 100443 The acgObject identifier. Required when a dictionary value must be evaluated for a specific object, such as LOG_FORMATS.
objectType String CP_CODE The acgObject type. Required when a dictionary value must be evaluated for a specific object, such as LOG_FORMATS.

Status 200 application/json

Response:

{
    "status": "ok",
    "content": [
        { "key": "1", "value": "Every 24 hours" },
        { "key": "2", "value": "Every 12 hours" },
        { "key": "3", "value": "Every 6 hours"  },
        { "key": "4", "value": "Every 4 hours"  },
        { "key": "5", "value": "Every 3 hours"  },
        { "key": "6", "value": "Every 2 hours"  },
        { "key": "7", "value": "Every 1 hour"   }
    ],
    "errorCode": null,
    "incidentId": null,
    "errorParameters": null,
    "errorMessage": null,
    "resolution": null
}

Get validation context

Get the dictionary’s validation context.

GET /lds/v1/dictionaries/{dictionaryName}/validation/data

Example: /lds/v1/dictionaries/ENCODINGS/validation/data

Parameter Type Sample Description
Required
dictionaryName Enumeration ENCODINGS Dictionary name value. Possible values: ENCODINGS.

Status 200 application/json

Response:

{
    "status": "ok",
    "contents": [
        {
            "emailFlag": true,
            "ftpFlag": false,
            "dictId": "1"
        },
        {
            "emailFlag": true,
            "ftpFlag": false,
            "dictId": "2"
        },
        {
            "emailFlag": false,
            "ftpFlag": true,
            "dictId": "3"
        },
        {
            "emailFlag": true,
            "ftpFlag": true,
            "dictId": "4"
        }
    ],
    "errorCode": null,
    "incidentId": null,
    "errorParameters": null,
    "resolution": null,
    "errorMessage": null
}

Data

This section provides details on the various data structures the Log Delivery Service API exchanges.

Configuration

Member Type Required Description
acgObject Object Configuration acgObject, contains id, name, and type (with possible values CP_CODE, EDNS, or GTM_PROPERTY).
aggregationType Enumeration Type of aggregation value, either COLLECTION or CALENDAR.
aggregationType Enumeration Type of aggregation value, either COLLECTION or CALENDAR.
configurationType Enumeration Type of configuration, either SPIN, SHADOW, or PRIMARY.
configurationType Enumeration Type of configuration, either SPIN, SHADOW, or PRIMARY.
contact Object Contact person information, including a list of email addresses (contactEmail) and Contact identifier (dictId).
cpCode Object Deprecated. Configuration CP code for CP code configurations. Contains ID of the CP code (dictId) and description (dictValue).
deletedDate String Deletion date of Log Delivery. Not empty means that Log Delivery no longer exists. Contains a Moment object serialized to JSON.
deliverResidualFlag Boolean Deliver residual data flag. Required if Aggregationtype is Calendar.
deliverResidual Number Deliver residual data flag. A null value means false, 1 means true.
deliveryFrequency Object Log delivery frequency value. Contains ID (dictId) from delivery frequency dictionary. Required If Aggregationtype is Collection.
deliveryThreshold Enumeration Log delivery threshold value, either 99, 99.5, 99.9, or 99.99. Required if Aggregationtype is Calendar.
deliveryType Enumeration Type of log delivery method, either EMAIL or FTP.
deliveryType Enumeration Type of log delivery method, either FTP or EMAIL.
dnsZone Object Deprecated. DNS zone for EDNS configurations. Contains ID of the DNS zone (zoneId) and zone name (zoneName).
emailConfiguration Object Log delivery destination for email configuration, contains an emailAddress field. Required if deliveryType is EMAIL.
encodingKey String Public key value for GPG encrypted encoding. Required if encoding.dictId is 4.
encoding Object Logs encoding value. Contains ID (dictId) from the encoding dictionary. Possible values differ based on the deliveryType. For specific validation context, refer to dictionary validations.
endDate String End date of Log Delivery. Contains serialized to JSON Moment object.
ftpConfiguration Object Contains FTP machine address, login, password, and path to the destination directory. Required if the deliveryType is FTP.
logFormat Object Configuration log format. Contains ID (dictId) from log format dictionary.
logIdentifier String Configuration log format value.
messageSize Object Logs message size value. Contains ID (dictId) from message size dictionary.
productGroupId Number Configuration product group identifier. The productGroupId mapping to a list of products for available ACG is in the PRODUCT_GROUPS_FOR_ACGS dictionary.
serviceId Number ID of the configuration.
startDate String Start date of Log Delivery. Contains a Moment object serialized to JSON.
status Enumeration Configuration status information, either NONE, ACTIVE, EXPIRED, or SUSPENDED.
type String Deprecated. Type of configuration, either CpCodeConfiguration or EdnsConfiguration. Only applies to CP code or EDNS configurations.

ConfigurationCopy

Member Type Required Description
acgObjectId String Unique identifier for the AcgObject, available from the PRODUCT_GROUPS_FOR_ACGS dictionary.
acgObjectType Enumeration Type of acgObject, either CP_CODE, EDNS, or GTM_PROPERTY.
productGroupId Number Unique integer identifier for the configuration product group. The productGroupId that maps to a list of products for available ACG is in the PRODUCT_GROUPS_FOR_ACGS dictionary.

Redelivery

Member Type Required Description
beginTime Number First hour of time range (0–23) from which logs redelivery is requested.
createdDate String Date of redelivery creation.
endTime Number Last hour of time range (1–24) from which logs redelivery is requested.
id Number Unique integer identifier for the redelivery.
modifiedDate String Date of last redelivery modification.
redeliveryDate String Date (day, month, year) from which logs redelivery is requested.
serviceId Number Identifier of the configuration.
status Enumeration Status of the redelivery, either NEW, SCHEDULED, SUCCESS, or FAILED.

Errors

This section provides details on the Log Delivery Service API’s error response format, and its range of HTTP response codes.

Error responses

The Log Delivery Service API encloses error response content in a status object that features the following members:

Member Type Description
content Object, String, or Array Property containing the appropriate response object.
errorCode String Error’s category.
errorMessage String Short description of a problem.
errorType Enumeration Type of error, either SERVER_FAILURE or SERVER_EXCEPTION.
incidentId String Identifies the incident, useful for Akamai to analyze the problem.
resolution String Provides a hint for how to respond to the problem.
status Enumeration Status of the response, either ok or error.

HTTP status codes

Code Description
200 OK.
400 Bad Request. Please provide all the required parameters.
403 User is not authenticated.
500 There is a problem processing your request. Please try again later. The details are provided in the response body.

Last modified: 4/6/2017