Skip to content

Latest commit

 

History

History
113 lines (95 loc) · 4.89 KB

oc_ci_configuration_host.rst

File metadata and controls

113 lines (95 loc) · 4.89 KB

OC/CI/configuration/{{host}}

PUT

Triggers an asynchronous task to update the configuration for the uCDN (Upstream Content Delivery Network) and the specified host by adding the request to a queue to be reviewed later. This returns a 202 Accepted status and an endpoint to be used for status updates.

Note

Users with the ICDN:UCDN-OVERRIDE permission will need to provide a "ucdn" query parameter to bypass the need for uCDN (Upstream Content Delivery Network) information in the JWT (JSON Web Token) and allow them to view all CDNi (Content Delivery Network Interconnect) information.

Auth. Required

Yes

Roles Required

"admin" or "operations"

Permissions Required

CDNI:UPDATE

Response Type

Object

Request Structure

This requires authorization using a JWT (JSON Web Token) provided by the dCDN (Downstream Content Delivery Network) to identify the uCDN (Upstream Content Delivery Network). This token must include the following claims:

Required JWT claims
Name Description

iss

Issuer claim as a string key for the uCDN (Upstream Content Delivery Network)

aud

Audience claim as a string key for the dCDN (Downstream Content Delivery Network)

exp

Expiration claim as the expiration date as a Unix epoch timestamp (in seconds)
Request Path Parameters
Name Description

host

The text identifier for the host domain to be updated with the new configuration.
type

A string of the type of metadata to follow. See 8006 for possible values. Only a selection of these are supported.

host-metadata

An array of generic metadata objects that conform to 8006.

generic-metadata-type

A string of the type of metadata to follow conforming to 8006.

generic-metadata-value

An array of generic metadata value objects conforming to 8006 and SVA (Streaming Video Alliance) specifications.

PUT /api/4.0/oc/ci/configuration/example.com HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 181
Content-Type: application/json

{
    "type": "MI.HostMetadata",
    "host-metadata": [
        {
            "generic-metadata-type": "MI.RequestedCapacityLimits",
            "generic-metadata-value": {
                "requested-limits": [
                    {
                        "limit-type": "egress",
                        "limit-value": 20000,
                        "footprints": [
                            {
                                "footprint-type": "ipv4cidr",
                                "footprint-value": [
                                    "127.0.0.1",
                                    "127.0.0.2"
                                ]
                            }
                        ]
                    }
                ]
            }
        }
    ]
}

Response Structure

HTTP/1.1 202 Accepted
Content-Type: application/json

{ "alerts": [
    {
        "text": "CDNi configuration update request received. Status updates can be found here: /api/4.0/async_status/1",
        "level": "success"
    }
]}