Skip to content

Latest commit

 

History

History
72 lines (58 loc) · 2.33 KB

deliveryservices_sslkeys_add.rst

File metadata and controls

72 lines (58 loc) · 2.33 KB

deliveryservices/sslkeys/add

.. seealso:: In most cases it is preferable to allow Traffic Ops to generate the keys via :ref:`to-api-v4-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 :term:`Delivery Service`.

Auth. Required:Yes
Roles Required:"admin" or "operations"
Permissions Required:DS-SECURITY-KEY:CREATE, DELIVERY-SERVICE:READ
Response Type:Object (string)

Request Structure

cdn:

The name of the CDN to which the :term:`Delivery Service` belongs

certificate:

An object that contains the actual components of the SSL key

crt:The certificate for the :term:`Delivery Service` identified by key
csr:The csr file for the :term:`Delivery Service` identified by key
key:The private key for the :term:`Delivery Service` identified by key
key:

The :ref:`ds-xmlid` of the :term:`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

POST /api/4.0/deliveryservices/sslkeys/add HTTP/1.1
Host: trafficops.infra.ciab.test
Content-Type: application/json

{
        "key": "ds-01",
        "version": "1",
        "certificate": {
                "key": "some_key",
                "csr": "some_csr",
                "crt": "some_crt"
        }
}

Response Structure

HTTP/1.1 200 OK
Content-Type: application/json

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