server_server_capabilities

GET

Gets all associations of Server Capabilities to cache servers.

Auth. Required

Yes

Roles Required

None

Permissions Required

SERVER:READ, SERVER-CAPABILITY:READ

Response Type

Array

Request Structure

Table 393 Request Query Parameters

Name

Required

Description

serverId

no

Filter Server Capability associations by the integral, unique identifier of the server to which they are assigned

serverHostName

no

Filter Server Capability associations by the host name of the server to which they are assigned

serverCapability

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.

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

Response Structure

serverHostName

The server’s host name

serverId

The server’s integral, unique identifier

lastUpdated

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

serverCapability

The Server Capability’s name

#953 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,PUT,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: 150

{
    "response": [
        {
            "lastUpdated": "2019-10-07 22:05:31+00",
            "serverHostName": "atlanta-org-1",
            "serverId": 260,
            "serverCapability": "ram"
        },
        {
            "lastUpdated": "2019-10-07 22:05:31+00",
            "serverHostName": "atlanta-org-2",
            "serverId": 261,
            "serverCapability": "disk"
        }
    ]
}

POST

Associates a Server Capability to a server.

Auth. Required

Yes

Roles Required

“admin” or “operations”

Permissions Required

SERVER:UPDATE, SERVER:READ, SERVER-CAPABILITY:READ

Response Type

Object

Request Structure

serverId

The integral, unique identifier of a server to be associated with a Server Capability

serverCapability

The Server Capability’s name to associate

Note

The server referenced must be either an Edge-tier or Mid-tier cache server.

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

{
    "serverId": 1,
    "serverCapability": "disk"
}

Response Structure

serverId

The integral, unique identifier of the newly associated server

lastUpdated

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

serverCapability

The Server Capability’s name

#955 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,PUT,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: 157

{
    "alerts": [
        {
            "text": "server server_capability was created.",
            "level": "success"
        }
    ],
    "response": {
        "lastUpdated": "2019-10-07 22:15:11+00",
        "serverId": 1,
        "serverCapability": "disk"
    }
}

DELETE

Disassociate a server from a Server Capability.

Note

If the serverCapability is a Server Capability required by a Delivery Service that to which the server is assigned the DELETE will be blocked until either the server is unassigned from the Delivery Service or the Server Capability is no longer required by the Delivery Service.

Auth. Required

Yes

Roles Required

“admin” or “operations”

Permissions Required

SERVER:UPDATE, SERVER:READ, SERVER-CAPABILITY:READ

Response Type

undefined

Request Structure

Table 394 Request Query Parameters

Name

Required

Description

serverId

yes

The integral, unique identifier of the server to disassociate

serverCapability

yes

term:Server Capability name to disassociate from given server

#956 Request Example
DELETE /api/4.0/server_server_capabilities?serverId=1&serverCapability=disk HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...

Response Structure

#957 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,PUT,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: 96

{
    "alerts": [
        {
            "text": "server server_capability was deleted.",
            "level": "success"
        }
    ]
}