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

PUT

Updates a steering target.

Auth. Required

Yes

Roles Required

Portal, Steering, Federation, “operations” or “admin”

Response Type

Object

Request Structure

Table 238 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 routing type of the target Delivery Service

value

The ‘weight’ which shall be attributed to the target Delivery Service

#531 Request Example
PUT /api/2.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": 1
}

Response Structure

deliveryService

A string that is the xml_id of the steering Delivery Service

deliveryServiceId

An integral, unique identifier for the steering Delivery Service

target

A string that is the xml_id of this target Delivery Service

targetId

An integral, unique identifier for this target Delivery Service

type

The routing type of this target Delivery Service

typeId

An integral, unique identifier for the routing type of this target Delivery Service

value

The ‘weight’ attributed to this steering target as an integer

#532 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, 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”

Response Type

undefined

Request Structure

Table 239 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

#533 Request Example
DELETE /api/2.0/steering/2/targets/1 HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...

Response Structure

#534 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, 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"
    }
]}