asns/{{id}}

See also

The Autonomous System Wikipedia page for an explanation of what an ASN actually is.

PUT

Allows user to edit an existing ASN-to-Cache Group association.

Auth. Required

Yes

Roles Required

“admin” or “operations”

Permissions Required

ASN:UPDATE, ASN:READ, CACHE-GROUP:UPDATE, CACHE-GROUP:READ

Response Type

Object

Request Structure

asn

The new ASN which will be associated with the identified Cache Group - must not conflict with existing associations

cachegroup

An optional field which, if present, is a string that specifies the Name of a Cache Group to which this ASN will be assigned

Note

While this endpoint accepts the cachegroup field, sending this in the request payload has no effect except that the response will (erroneously) name the Cache Group to which the ASN was assigned. Any subsequent requests will reveal that, in fact, the Cache Group is set entirely by the cachegroupId field, and so the actual Name may differ from what was in the request.

cachegroupId

An integer that is the ID of a Cache Group to which this ASN will be assigned - must not conflict with existing associations

Table 418 Request Path Parameters

Name

Required

Description

id

yes

The integral, unique identifier of the desired ASN-to-Cache Group association

#1032 Request Example
PUT /api/4.0/asns/1 HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 29
Content-Type: application/x-www-form-urlencoded

{"asn": 2, "cachegroupId": 1}

Response Structure

asn

An ASN as specified by IANA for identifying a service provider

cachegroup

A string that is the Name of the Cache Group that is associated with this ASN

cachegroupId

An integer that is the ID of the Cache Group that is associated with this ASN

id

An integral, unique identifier for this association between an ASN and a Cache Group

lastUpdated

The time and date this server entry was last updated in Traffic Ops’s Custom Date/Time Format

#1033 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: /83P4LJVsrQx9BKHFxo5pbhQMlB4o3a9v3PpkspyOJcpNx1S/GJhCPpiANBki547sbY+0vTq76IriHZ4GYp8bA==
X-Server-Name: traffic_ops_golang/
Date: Thu, 08 Nov 2018 14:37:39 GMT
Content-Length: 160

{ "alerts": [
    {
        "text": "asn was updated.",
        "level": "success"
    }
],
"response": {
    "asn": 2,
    "cachegroup": null,
    "cachegroupId": 1,
    "id": 1,
    "lastUpdated": "2018-11-08 14:37:39+00"
}}

DELETE

Deletes an association between an ASN and a Cache Group.

Auth. Required

Yes

Roles Required

“admin” or “operations”

Permissions Required

ASN:DELETE, ASN:READ, CACHE-GROUP:READ, CACHE-GROUP:UPDATE

Response Type

undefined

Request Structure

Table 419 Request Path Parameters

Name

Required

Description

id

yes

The integral, unique identifier of the desired ASN-to-Cache Group association

#1034 Request Example
DELETE /api/4.0/asns/1 HTTP/1.1
User-Agent: python-requests/2.22.0
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Cookie: mojolicious=...
Content-Length: 0

Response Structure

#1035 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-Encoding: gzip
Content-Type: application/json
Set-Cookie: mojolicious=...; Path=/; Expires=Mon, 02 Dec 2019 23:06:24 GMT; Max-Age=3600; HttpOnly
Whole-Content-Sha512: 6t3WA+DOcfPJB5UnvDpzEVx5ySfmJgEV9wgkO71U5k32L1VXpxcaTdDVLNGgDDl9sdNftmYnKXf5jpfWUuFYJQ==
X-Server-Name: traffic_ops_golang/
Date: Mon, 02 Dec 2019 22:06:24 GMT
Content-Length: 81

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