Skip to content

Latest commit

 

History

History
168 lines (147 loc) · 6.38 KB

profiles.rst

File metadata and controls

168 lines (147 loc) · 6.38 KB

profiles

GET

Auth. Required

Yes

Roles Required

None

Response Type

Array

Request Structure

Request Query Parameters
Name Required Description

cdn

no

Used to filter Profiles by the integral, unique identifier of the CDN to which they belong

id

no

Filters Profiles by profile-id
name

no

Filters Profiles by profile-name
param

no

Used to filter Profiles by the parameter-id of a Parameter associated with them
GET /api/3.0/profiles?name=ATS_EDGE_TIER_CACHE HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.62.0
Accept: */*
Cookie: mojolicious=...

Response Structure

cdn

The integral, unique identifier of the profile-cdn to which this Profile belongs

cdnName

The name of the profile-cdn to which this Profile belongs

description

The Profile's profile-description

id

The Profile's profile-id

lastUpdated

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

name

The Profile's profile-name

routingDisabled

The Profile's profile-routing-disabled setting

type

The Profile's profile-type

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: QEpKM/DwHBRvue9K7XKrpwKFKhW6yCMQ2vSQgxE7dWFGJaqC4KOUO92bsJU/5fjI9qlB+1uMT2kz6mFb1Wzp/w==
X-Server-Name: traffic_ops_golang/
Date: Fri, 07 Dec 2018 20:40:31 GMT
Content-Length: 220

{ "response": [
    {
        "id": 9,
        "lastUpdated": "2018-12-05 17:51:00+00",
        "name": "ATS_EDGE_TIER_CACHE",
        "description": "Edge Cache - Apache Traffic Server",
        "cdnName": "CDN-in-a-Box",
        "cdn": 2,
        "routingDisabled": false,
        "type": "ATS_PROFILE"
    }
]}

POST

Creates a new Profile.

Auth. Required

Yes

Roles Required

"admin" or "operations"

Response Type

Object

Request Structure

cdn

The integral, unique identifier of the profile-cdn to which this Profile shall belong

description

The Profile's profile-description

name

The Profile's profile-name

routingDisabled

The Profile's profile-routing-disabled setting

type

The Profile's profile-type

POST /api/3.0/profiles HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.62.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 125
Content-Type: application/json

{
    "name": "test",
    "description": "A test profile for API examples",
    "cdn": 2,
    "type": "UNK_PROFILE",
    "routingDisabled": true
}

Response Structure

cdn

The integral, unique identifier of the profile-cdn to which this Profile belongs

cdnName

The name of the profile-cdn to which this Profile belongs

description

The Profile's profile-description

id

The Profile's profile-id

lastUpdated

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

name

The Profile's profile-name

routingDisabled

The Profile's profile-routing-disabled setting

type

The Profile's profile-type

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: UGV3PCnYBY0J3siICR0f9VVRNdUK1+9zsDDP6T9yt6t+AoHckHe6bvzOli9to/fGhC2zz5l9Nc1ro4taJUDD8g==
X-Server-Name: traffic_ops_golang/
Date: Fri, 07 Dec 2018 21:24:49 GMT
Content-Length: 251

{ "alerts": [
    {
        "text": "profile was created.",
        "level": "success"
    }
],
"response": {
    "id": 16,
    "lastUpdated": "2018-12-07 21:24:49+00",
    "name": "test",
    "description": "A test profile for API examples",
    "cdnName": null,
    "cdn": 2,
    "routingDisabled": true,
    "type": "UNK_PROFILE"
}}