Skip to content

Latest commit

 

History

History
153 lines (130 loc) · 4.99 KB

parameters_id.rst

File metadata and controls

153 lines (130 loc) · 4.99 KB

parameters/{{ID}}

PUT

Replaces a Parameter.

Auth. Required

Yes

Roles Required

"admin" or "operations"

Response Type

Object

Request Structure

Request Path Parameters
Name Description

ID

The parameter-id of the Parameter which will be deleted
configFile

The Parameter's parameter-config-file

name

parameter-name of the Parameter

secure

A boolean value that describes whether or not the Parameter is parameter-secure

value

The Parameter's parameter-value

PUT /api/2.0/parameters/124 HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 81
Content-Type: application/json

{
    "name": "foo",
    "value": "bar",
    "configFile": "records.config",
    "secure": false
}

Response Structure

configFile

The Parameter's parameter-config-file

id

The Parameter's parameter-id

lastUpdated

The date and time at which this Parameter was last updated, in non-rfc-datetime

name

parameter-name of the Parameter

profiles

An array of Profile Names <profile-name> that use this Parameter

secure

A boolean value that describes whether or not the Parameter is parameter-secure

value

The Parameter's parameter-value

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: DMxS2gKceFVKRtezON/vsnrC+zI8onASSHaGv5i3wwvUvyt9KEe72gxQd6ZgVcSq3K8ZpkH6g3UI/WtEfdp5vA==
X-Server-Name: traffic_ops_golang/
Date: Wed, 05 Dec 2018 20:21:07 GMT
Content-Length: 209

{ "alerts": [
    {
        "text": "param was updated.",
        "level": "success"
    }
],
"response": {
    "configFile": "records.config",
    "id": 125,
    "lastUpdated": "2018-12-05 20:21:07+00",
    "name": "foo",
    "profiles": null,
    "secure": false,
    "value": "bar"
}}

DELETE

Deletes the specified Parameter. If, however, the Parameter is associated with one or more Profiles, deletion will fail.

Auth. Required

Yes

Roles Required

"admin" or "operations"

Response TYpe

undefined

Request Structure

Request Path Parameters
Name Description

ID

The parameter-id of the Parameter which will be deleted
DELETE /api/2.0/parameters/124 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: hJjQq2Seg7sqWt+jKgp6gwRxUtoVU34PFoc9wEaweXdaIBTn/BscoUuyw2/n+V8GZPqpeQcihZE50/0oQhdtHw==
X-Server-Name: traffic_ops_golang/
Date: Wed, 05 Dec 2018 19:20:30 GMT
Content-Length: 60

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