Skip to content

Latest commit

 

History

History
155 lines (132 loc) · 6.67 KB

steering_id_targets_targetID.rst

File metadata and controls

155 lines (132 loc) · 6.67 KB

steering/{{ID}}/targets/{{targetID}}

PUT

Updates a steering target.

Auth. Required

Yes

Roles Required

Portal, Steering, Federation, "operations" or "admin"

Permissions Required

STEERING:UPDATE, STEERING:READ, DELIVERY-SERVICE:READ, TYPE:READ

Response Type

Object

Request Structure

Request Path Parameters
Name Description

ID

The integral, unique identifier of a steering Delivery Service
targetID The integral, unique identifier of a Delivery Service which is a target of the Delivery Service identified by ID
typeId

The integral, unique identifier of the steering type <ds-steering> of the target Delivery Service. This should be corresponding to one of STEERING_WEIGHT, STEERING_ORDER, STEERING_GEO_ORDER or STEERING_GEO_WEIGHT

value

The 'weight', 'order', 'geo_order' or 'geo_weight' which shall be attributed to the target Delivery Service

PUT /api/4.0/steering/2/targets/1 HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 26
Content-Type: application/json

{
    "value": 1,
    "typeId": 43
}

Response Structure

deliveryService

A string that is the ds-xmlid of the steering Delivery Service

deliveryServiceId

An integral, unique identifier for the steering Delivery Service

target

A string that is the ds-xmlid of this target Delivery Service

targetId

An integral, unique identifier for this target Delivery Service

type

The steering type of this target Delivery Service

typeId

An integral, unique identifier for the steering type <ds-steering> of this target Delivery Service

value

The '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: AfXsIRzdtU3HZYkr93qBMVTZRJ5oTF2u5sKYnd+DSqxZ+RQxY6vXtCupnnXCf9dxMt5QXRW1EFOW/FBG6lFrTg==
X-Server-Name: traffic_ops_golang/
Date: Tue, 11 Dec 2018 14:34:22 GMT
Content-Length: 194

{ "alerts": [
    {
        "text": "steeringtarget was updated.",
        "level": "success"
    }
],
"response": {
    "deliveryService": "test",
    "deliveryServiceId": 2,
    "target": "demo1",
    "targetId": 1,
    "type": "HTTP",
    "typeId": 1,
    "value": 1
}}

DELETE

Removes a specific target mapping from a specific Delivery Service

Auth. Required

Yes

Roles Required

Portal, Steering, Federation, "operations" or "admin"

Permissions Required

STEERING:DELETE, STEERING:READ, DELIVERY-SERVICE:READ, TYPE:READ

Response Type

undefined

Request Structure

Request Path Parameters
Name Description

ID

The integral, unique identifier of a steering Delivery Service - a target of which shall be deleted
targetID The integral, unique identifier of a Delivery Service which is a target to be removed of the Delivery Service identified by ID
DELETE /api/4.0/steering/2/targets/1 HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...

Response Structure

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: N6h8Kl7uQveqpTc3fmKXFDY2yYe5smApNcaTow4ab0DHGFdJfqQh89I4nvvaXvmVNhxVAqX3UE/6blbO8/9Xqg==
X-Server-Name: traffic_ops_golang/
Date: Tue, 11 Dec 2018 14:42:54 GMT
Content-Length: 69

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