OTA Updates API Resources

This section provides details on the OTA Updates API’s various operations and parameters.

API Summary

Operation Method Endpoint
CP Codes   (download RAML)
List Content Provider Codes GET /ota/v1/cpcodes
Download Notifications   (download RAML)
List Download Notifications GET /ota/v1/download-notifications/{cpcode}{?start}

List Content Provider Codes

This operation lists all content provider codes assigned to the Internet of Things product. Use one of the identifiers as input to the List Download Notifications operation.

GET /ota/v1/cpcodes

Status 200 application/json

Response Body:

[
    {
        "id": 100001,
        "name": "cp code 100001"
    },
    {
        "id": 100002,
        "name": "cp code 100002"
    }
]

List Download Notifications

This operation returns a single page of notifications about completed downloads to specific vehicles, limited to those downloads registered under one content provider code. All requests subsequent to the first request require storing nextPageStart from the last response’s notifications array and using it as start of a new request.

GET /ota/v1/download-notifications/{cpcode}{?start}

Sample: /ota/v1/download-notifications/100001?start=1497947550000

Parameter Type Sample Description
URL Parameters
cpcode Integer 100001 The content provider code assigned to the Internet of Things product. Run the List Content Provider Codes operation to get an identifier.
Optional Query Parameters
start Integer 1497947550000 The Unix timestamp in milliseconds that starts a range of notifications. It cannot be older than the notification retention period of the past 12 hours. If not specified, the API returns notifications from the past 12 hours.

Status 200 application/json

Response Body:

{
    "notifications": [
        {
            "cpcode": 100001,
            "path": "/files/0001",
            "host": "downloads.automotive-company.com",
            "uid": "0000-0000-0001",
            "downloadTime": "2017-05-16T17:30:01+00:00"
        },
        {
            "cpcode": 100001,
            "path": "/files/0002",
            "host": "downloads.automotive-company.com",
            "uid": "0000-0000-0002",
            "downloadTime": "2017-05-16T17:33:02+00:00"
        }
    ],
    "nextPageStart": 1497627402001
}

Last modified: 8/28/2017