Log Delivery Service API v1 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
}


Last modified: 4/6/2017