multiple_server_capabilities

New in version 4.1.

PUT

Associates a list of Server Capability to a server. The API call replaces all the server capabilities assigned to a server with the ones specified in the serverCapabilities field.

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

serverCapabilities

List of Server Capability’s name to associate

#850 Request Example
PUT /api/4.1/multiple_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,
    "serverCapabilities": ["test", "disk"]
}

Response Structure

serverId

The integral, unique identifier of the newly associated server

serverCapabilities

List of Server Capability’s name

#851 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, 8 Aug 2022 22:40:54 GMT; Max-Age=3600; HttpOnly
Whole-Content-Sha512: eQrl48zWids0kDpfCYmmtYMpegjnFxfOVvlBYxxLSfp7P7p6oWX4uiC+/Cfh2X9i3G+MQ36eH95gukJqOBOGbQ==
X-Server-Name: traffic_ops_golang/
Date: Mon, 08 Aug 2022 16:15:11 GMT
Content-Length: 157

{
    "alerts": [{
        "text": "Multiple Server Capabilities assigned to a server",
        "level": "success"
    }],
    "response": {
        "serverId": 1,
        "serverCapabilities": ["test", "disk"]
    }
}