Get all targets for a steering Delivery Service
.
- Auth. Required
Yes
- Roles Required
None
- Permissions Required
STEERING:READ, DELIVERY-SERVICE:READ, TYPE:READ
- Response Type
Array
Name | Description |
---|---|
|
The integral, unique identifier of a steering Delivery Service for which targets shall be listed |
Name | Description |
---|---|
target | Return only the target mappings that target the Delivery Service identified by this integral, unique identifier |
orderby | Choose the ordering of the results - must be the name of one of the fields of the objects in the response array |
sortOrder | Changes the order of sorting. Either ascending (default or "asc") or descending ("desc") |
limit | Choose the maximum number of results to return |
offset | The number of results to skip before beginning to return results. Must use in conjunction with limit |
page | 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/4.0/steering/2/targets?target=1 HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
- deliveryService
A string that is the
ds-xmlid
of the steeringDelivery Service
- deliveryServiceId
An integral, unique identifier for the steering
Delivery Service
- target
A string that is the
ds-xmlid
of this targetDelivery Service
- targetId
An integral, unique identifier for this target
Delivery Service
- type
The steering type of this target
Delivery Service
. This should be one ofSTEERING_WEIGHT
,STEERING_ORDER
,STEERING_GEO_ORDER
orSTEERING_GEO_WEIGHT
- typeId
An integral, unique identifier for the
steering type <ds-steering>
of this targetDelivery Service
- value
The 'weight', 'order', 'geo_order' or 'geo_weight' attributed to this steering target as an integer
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: utlJK4oYS2l6Ff7NzAqRuQeMEtazYn3rM3Nlux2XgTLxvSyslHy0mJrwDExSU05gVMdrgYCLZrZEvPHlENT1nA==
X-Server-Name: traffic_ops_golang/
Date: Tue, 11 Dec 2018 14:09:23 GMT
Content-Length: 130
{ "response": [
{
"deliveryService": "test",
"deliveryServiceId": 2,
"target": "demo1",
"targetId": 1,
"type": "STEERING_ORDER",
"typeId": 44,
"value": 100
}
]}
Create a steering target.
- Auth. Required
Yes
- Roles Required
Portal, Steering, Federation, "operations" or "admin"
- Permissions Required
STEERING:CREATE, STEERING:READ, DELIVERY-SERVICE:READ, TYPE:READ
- Response Type
Object
Name | Description |
---|---|
|
The integral, unique identifier of a steering Delivery Service to which a target shall be added |
- targetId
The integral, unique identifier of a
Delivery Service
which shall be a new steering target for theDelivery Service
identified by theID
path parameter- typeId
The integral, unique identifier of the steering type of the new target
Delivery Service
. This should be corresponding to one ofSTEERING_WEIGHT
,STEERING_ORDER
,STEERING_GEO_ORDER
orSTEERING_GEO_WEIGHT
- value
The 'weight', 'order', 'geo_order' or 'geo_weight' which shall be attributed to the new target
Delivery Service
POST /api/4.0/steering/2/targets HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 43
Content-Type: application/json
{
"targetId": 1,
"value": 100,
"typeId": 43
}
- deliveryService
A string that is the
ds-xmlid
of the steeringDelivery Service
- deliveryServiceId
An integral, unique identifier for the steering
Delivery Service
- target
A string that is the
ds-xmlid
of this targetDelivery Service
- targetId
An integral, unique identifier for this target
Delivery Service
- type
The steering type of this target
Delivery Service
. This should be one ofSTEERING_WEIGHT
,STEERING_ORDER
,STEERING_GEO_ORDER
orSTEERING_GEO_WEIGHT
- typeId
An integral, unique identifier for the
steering type <ds-steering>
of this targetDelivery Service
- value
The 'weight', 'order', 'geo_order' or 'geo_weight' attributed to this steering target as an integer
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: +dTvfzrnOhdwAOMmY28r0+gFV5z+3aABI2FfAMziTYcU+pZrDanrJzMXpKWIL5Q/oCUBZpJDRt9hRCFkT4oGYw==
X-Server-Name: traffic_ops_golang/
Date: Mon, 10 Dec 2018 21:22:17 GMT
Content-Length: 196
{ "alerts": [
{
"text": "steeringtarget was created.",
"level": "success"
}
],
"response": {
"deliveryService": "test",
"deliveryServiceId": 2,
"target": "demo1",
"targetId": 1,
"type": "HTTP",
"typeId": 1,
"value": 100
}}