deliveryservices/sslkeys/add

See also

In most cases it is preferable to allow Traffic Ops to generate the keys via deliveryservices/sslkeys/generate, rather than uploading them manually using this endpoint.

POST

Allows user to upload an SSL certificate, csr, and private key for a Delivery Service.

Auth. Required:

Yes

Roles Required:

“admin” or “operations”

Response Type:

Object (string)

Request Structure

cdn:

The name of the CDN to which the Delivery Service belongs

certificate:

An object that contains the actual components of the SSL key

crt:

The certificate for the Delivery Service identified by key

csr:

The csr file for the Delivery Service identified by key

key:

The private key for the Delivery Service identified by key

hostname:

The desired hostname of the Delivery Service

Note

In most cases, this must be the same as the Delivery Service URL’

key:

The xml_id of the Delivery Service to which these keys will be assigned

version:

An integer that defines the “version” of the key - which may be thought of as the sequential generation; that is, the higher the number the more recent the key

#333 Request Example
POST /api/3.0/deliveryservices/sslkeys/add HTTP/1.1
Host: trafficops.infra.ciab.test
Content-Type: application/json

{
    "cdn": "test-cdn",
    "hostname": "tr.ds-01.mycdn.ciab.test",
    "key": "ds-01",
    "version": "1",
    "certificate": {
        "key": "some_key",
        "csr": "some_csr",
        "crt": "some_crt"
    }
}

Response Structure

#334 Response Example
HTTP/1.1 200 OK
Content-Type: application/json

{
    "response": "Successfully added ssl keys for ds-01"
}