deliveryservices_required_capabilities

GET

Gets all associations of Server Capability to Delivery Services.

Auth. Required

Yes

Roles Required

None

Permissions Required

DELIVERY-SERVICE:READ

Response Type

Array

Request Structure

Table 324 Request Query Parameters

Name

Required

Description

deliveryServiceID

no

Filter Server Capability associations by Delivery Service integral, unique identifier

xmlID

no

Filter Server Capability associations by Delivery Service xml_id

requiredCapability

no

Filter Server Capability associations by Server Capability name

orderby

no

Choose the ordering of the results - must be the name of one of the fields of the objects in the response array

sortOrder

no

Changes the order of sorting. Either ascending (default or “asc”) or descending (“desc”)

limit

no

Choose the maximum number of results to return

offset

no

The number of results to skip before beginning to return results. Must use in conjunction with limit.

page

no

Return the nth page of results, where “n” is the value of this parameter, pages are limit long and the first page is 1. If offset was defined, this query parameter has no effect. limit must be defined to make use of page.

#769 Request Example
GET /api/4.0/deliveryservices_required_capabilities HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...

Response Structure

deliveryServiceID

The associated Delivery Service’s integral, unique identifier

xmlID

The associated Delivery Service’s xml_id

lastUpdated

The date and time at which this association between the Delivery Service and the Server Capability was last updated, in Traffic Ops’s Custom Date/Time Format

requiredCapability

The Server Capability’s name

#770 Response Example
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Set-Cookie, Cookie
Access-Control-Allow-Methods: POST,GET,OPTIONS,DELETE
Access-Control-Allow-Origin: *
Content-Type: application/json
Set-Cookie: mojolicious=...; Path=/; Expires=Mon, 18 Nov 2019 17:40:54 GMT; Max-Age=3600; HttpOnly
Whole-Content-Sha512: UFO3/jcBFmFZM7CsrsIwTfPc5v8gUiXqJm6BNp1boPb4EQBnWNXZh/DbBwhMAOJoeqDImoDlrLnrVjQGO4AooA==
X-Server-Name: traffic_ops_golang/
Date: Mon, 07 Oct 2019 22:15:11 GMT
Content-Length: 396

{
    "response": [
        {
            "deliveryServiceID": 1,
            "lastUpdated": "2019-10-07 22:05:31+00",
            "requiredCapability": "ram",
            "xmlId": "example_ds-1"
        },
        {
            "deliveryServiceID": 2,
            "lastUpdated": "2019-10-07 22:05:31+00",
            "requiredCapability": "disk",
            "xmlId": "example_ds-2"
        }
    ]
}

POST

Associates a Server Capability with a Delivery Service.

Auth. Required

Yes

Roles Required

“admin” or “operations”

Permissions Required

DELIVERY-SERVICE:READ, DELIVERY-SERVICE:UPDATE

Response Type

Object

Note

A Server Capability can only be made required on a Delivery Service if its associated Servers already have that Server Capability assigned.

Request Structure

deliveryServiceID

The integral, unique identifier of the Delivery Service to be associated

requiredCapability

The name of the Server Capability to be associated

#771 Request Example
POST /api/4.0/deliveryservices_required_capabilities HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 56
Content-Type: application/json

{
    "deliveryServiceID": 1,
    "requiredCapability": "disk"
}

Response Structure

deliveryServiceID

The newly associated Delivery Service’s integral, unique identifier

lastUpdated

The date and time at which this association between the Delivery Service and the Server Capability was last updated, in Traffic Ops’s Custom Date/Time Format

requiredCapability

The newly associated Server Capability’s name

#772 Response Example
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Set-Cookie, Cookie
Access-Control-Allow-Methods: POST,GET,OPTIONS,DELETE
Access-Control-Allow-Origin: *
Content-Type: application/json
Set-Cookie: mojolicious=...; Path=/; Expires=Mon, 18 Nov 2019 17:40:54 GMT; Max-Age=3600; HttpOnly
Whole-Content-Sha512: eQrl48zWids0kDpfCYmmtYMpegjnFxfOVvlBYxxLSfp7P7p6oWX4uiC+/Cfh2X9i3G+MQ36eH95gukJqOBOGbQ==
X-Server-Name: traffic_ops_golang/
Date: Mon, 07 Oct 2019 22:15:11 GMT
Content-Length: 287

{
    "alerts": [
        {
            "level": "success",
            "text": "deliveryservice.RequiredCapability was created."
        }
    ],
    "response": {
        "deliveryServiceID": 1,
        "lastUpdated": "2019-10-07 22:15:11+00",
        "requiredCapability": "disk"
    }
}

DELETE

Dissociate a Server Capability from a Delivery Service.

Auth. Required

Yes

Roles Required

“admin” or “operations”

Permissions Required

DELIVERY-SERVICE:READ, DELIVERY-SERVICE:UPDATE

Response Type

undefined

Request Structure

deliveryServiceID

The integral, unique identifier of the Delivery Service from which a Server Capability will be dissociated

requiredCapability

The name of the Server Capability to dissociate

#773 Request Example
POST /api/4.0/deliveryservices_required_capabilities HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 56
Content-Type: application/json

{
    "deliveryServiceID": 1,
    "requiredCapability": "disk"
}

Response Structure

#774 Response Example
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Set-Cookie, Cookie
Access-Control-Allow-Methods: POST,GET,OPTIONS,DELETE
Access-Control-Allow-Origin: *
Content-Type: application/json
Set-Cookie: mojolicious=...; Path=/; Expires=Mon, 18 Nov 2019 17:40:54 GMT; Max-Age=3600; HttpOnly
Whole-Content-Sha512: eQrl48zWids0kDpfCYmmtYMpegjnFxfOVvlBYxxLSfp7P7p6oWX4uiC+/Cfh2X9i3G+MQ36eH95gukJqOBOGbQ==
X-Server-Name: traffic_ops_golang/
Date: Mon, 07 Oct 2019 22:15:11 GMT
Content-Length: 127

{
    "alerts": [
        {
            "level": "success",
            "text": "deliveryservice.RequiredCapability was deleted."
        }
    ]
}