server_capabilities

GET

Retrieves Server Capabilities.

Auth. Required:

Yes

Roles Required:

“read-only”

Response Type:

Array

Request Structure

Table 216 Request Query Parameters

Name

Required

Description

name

no

Return the Server Capability with this name

#488 Request Structure
GET /api/3.0/server_capabilities?name=RAM HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...

Response Structure

name:

The name of this Server Capability

lastUpdated:

The date and time at which this Server Capability was last updated, in ISO-like format

#489 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: EH8jo8OrCu79Tz9xpgT3YRyKJ/p2NcTmbS3huwtqRByHz9H6qZLQjA59RIPaVSq3ZxsU6QhTaox5nBkQ9LPSAA==
X-Server-Name: traffic_ops_golang/
Date: Mon, 07 Oct 2019 21:36:13 GMT
Content-Length: 68

{
    "response": [
        {
            "name": "RAM",
            "lastUpdated": "2019-10-07 20:38:24+00"
        }
    ]
}

POST

Create a new Server Capability.

Auth. Required:

Yes

Roles Required:

“admin” or “operations”

Response Type:

Object

Request Structure

name:

The name of the Server Capability

#490 Request Example
POST /api/3.0/server_capabilities HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 15
Content-Type: application/json

{
    "name": "RAM"
}

Response Structure

name:

The name of this Server Capability

lastUpdated:

The date and time at which this Server Capability was last updated, in ISO-like format

#491 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: ysdopC//JQI79BRUa61s6M2HzHxYHpo5RdcuauOoqCYxiVOoUhNZfOVydVkv8zDN2qA374XKnym4kWj3VzQIXg==
X-Server-Name: traffic_ops_golang/
Date: Mon, 07 Oct 2019 22:10:00 GMT
Content-Length: 137

{
    "alerts": [
        {
            "text": "server capability was created.",
            "level": "success"
        }
    ],
    "response": {
        "name": "RAM",
        "lastUpdated": "2019-10-07 22:10:00+00"
    }
}

DELETE

Deletes a specific Server Capability.

Auth. Required:

Yes

Roles Required:

“admin” or “operations”

Response Type:

undefined

Request Structure

Table 217 Request Query Parameters

Name

Required

Description

name

yes

The name of the Server Capability to be deleted

#492 Request Example
DELETE /api/3.0/server_capabilities?name=RAM HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...

Response Structure

#493 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: 8zCAATbCzcqiqigGVBy7WF1duDuXu1Wg2DBe9yfqTw/c+yhE2eUk73hFTA/Oqt0kocaN7+1GkbFdPkQPvbnRaA==
X-Server-Name: traffic_ops_golang/
Date: Mon, 07 Oct 2019 20:44:40 GMT
Content-Length: 72

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