Gets all associations of Server Capabilities
to cache servers
.
- Auth. Required
Yes
- Roles Required
None
- Response Type
Array
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 . |
GET /api/3.0/server_server_capabilities HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
- 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, innon-rfc-datetime
- serverCapability
The
Server Capability
's name
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"
}
]
}
Associates a Server Capability
to a server.
- Auth. Required
Yes
- Roles Required
"admin" or "operations"
- Response Type
Object
- 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
.
POST /api/3.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"
}
- 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, innon-rfc-datetime
- serverCapability
The
Server Capability
's name
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"
}
}
Disassociate a server from a Server Capability
.
Note
If the
serverCapability
is aServer Capability
required by aDelivery Service
that to which the server is assigned the DELETE will be blocked until either the server is unassigned from theDelivery Service
or theServer Capability
is no longer required by theDelivery Service
.
- Auth. Required
Yes
- Roles Required
"admin" or "operations"
- Response Type
undefined
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 |
DELETE /api/3.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=...
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"
}
]
}