profileparameters
GET
Retrieves all Parameter/Profile assignments.
- Auth. Required:
Yes
- Roles Required:
None
- Permissions Required:
PROFILE:READ, PARAMETER:READ
- Response Type:
Array
Request Structure
Name |
Required |
Description |
---|---|---|
orderby |
no |
Choose the ordering of the results - must be the name of one of the fields of the objects in the |
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 |
Response Structure
- lastUpdated:
The date and time at which this Profile/Parameter association was last modified, in RFC 3339 format
Changed in version 5.0: Prior to version 5.0 of the API, this field was in Traffic Ops’s Custom Date/Time Format.
- parameter:
- profile:
The Name of the Profile to which the Parameter identified by
parameter
is assigned
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: +bnMkRgdx4bJoGGlr3mZl539obj3aQAP8e65FAXgywdRAUfXZCFM6VNDn7wScXBmvF2SFXo9F+MhuSwrtB9mPg==
X-Server-Name: traffic_ops_golang/
Date: Mon, 10 Dec 2018 15:09:13 GMT
Transfer-Encoding: chunked
{ "response": [
{
"lastUpdated": "2018-12-05T21:44:14.410503+05:30",
"profile": "GLOBAL",
"parameter": 4
},
{
"lastUpdated": "2018-12-05T21:44:14.410503+05:30",
"profile": "GLOBAL",
"parameter": 5
}
]}
Note
The response example for this endpoint has been truncated to only the first two elements of the resulting array, as the output was hundreds of lines long.
POST
Associate a Parameter to a Profile.
- Auth. Required:
Yes
- Roles Required:
“admin” or “operations”
- Response Type:
Object
- Permissions Required:
PROFILE:READ, PARAMETER:READ, PROFILE:UPDATE
Request Structure
This endpoint accepts two formats for the request payload:
- Single Object Format
- Array Format
For making multiple assignments of Parameters to Profiles simultaneously
Single Object Format
- parameterId:
- profileId:
The ID of the Profile to which the Parameter identified by
parameterId
will be assigned
POST /api/5.0/profileparameters HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 36
Content-Type: application/json
{
"profileId": 18,
"parameterId": 1
}
Array Format
- parameterId:
- profileId:
The ID of the Profile to which the Parameter identified by
parameterId
will be assigned
POST /api/5.0/profileparameters HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 88
Content-Type: application/json
[{
"profileId": 18,
"parameterId": 2
},
{
"profileId": 18,
"parameterId": 3
}]
Response Structure
- lastUpdated:
The date and time at which the Profile/Parameter assignment was last modified, in RFC 3339 format
Changed in version 5.0: Prior to version 5.0 of the API, this field was in Traffic Ops’s Custom Date/Time Format.
- parameter:
- parameterId:
- profile:
- profileId:
The ID of the Profile to which the Parameter identified by
parameterId
is assigned
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: eDmIwlzX44fZdxLRPHMNa8aoGAK5fQv9Y70A2eeQHfEkliU4evwcsQ4WeHcH0l3/wPTGlpyC0gwLo8LQQpUxWQ==
X-Server-Name: traffic_ops_golang/
Date: Mon, 10 Dec 2018 13:50:11 GMT
Content-Length: 166
{
"alerts": [
{
"text": "All Requested ProfileParameters were created.",
"level": "success"
}
],
"response": [
{
"lastUpdated": "2018-12-05T21:44:14.410503+05:30",
"profile": "testProfile1",
"profileId": 18,
"parameter": "testParam1",
"parameterId": 1
}
]
}
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: eDmIwlzX44fZdxLRPHMNa8aoGAK5fQv9Y70A2eeQHfEkliU4evwcsQ4WeHcH0l3/wPTGlpyC0gwLo8LQQpUxWQ==
X-Server-Name: traffic_ops_golang/
Date: Mon, 10 Dec 2018 13:50:11 GMT
Content-Length: 166
{
"alerts": [
{
"text": "All Requested Profile_Parameters were created.",
"level": "success"
}
],
"response": [
{
"lastUpdated": "2018-12-05T21:44:14.410503+05:30",
"profile": "test1",
"profileId": 17,
"parameter": "tm.toolname",
"parameterId": 1091
},
{
"lastUpdated": "2018-12-05T21:44:14.410503+05:30",
"profile": "test2",
"profileId": 18,
"parameter": "maxRevalDurationDays",
"parameterId": 1091
}
]
}