You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by gi...@apache.org on 2018/04/26 17:57:54 UTC
[48/48] incubator-trafficcontrol-website git commit: Update docs from
commit 28336db2850f4454450ada86de9643e59a61deaa
Update docs from commit 28336db2850f4454450ada86de9643e59a61deaa
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/commit/2ca12610
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/tree/2ca12610
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/diff/2ca12610
Branch: refs/heads/asf-site
Commit: 2ca12610baf94e7cbc3cccc7a8552cd190241879
Parents: 9d004ac
Author: jenkins <bu...@apache.org>
Authored: Thu Apr 26 17:57:00 2018 +0000
Committer: jenkins <bu...@apache.org>
Committed: Thu Apr 26 17:57:00 2018 +0000
----------------------------------------------------------------------
docs/master/_sources/api/index.rst.txt | 27 +
docs/master/_sources/api/routes.rst.txt | 118 +
.../master/_sources/api/traffic_ops_api.rst.txt | 192 +
docs/master/_sources/api/v11/asn.rst.txt | 69 +
docs/master/_sources/api/v11/cachegroup.rst.txt | 317 +
docs/master/_sources/api/v11/cdn.rst.txt | 1086 ++++
docs/master/_sources/api/v11/changelog.rst.txt | 154 +
.../_sources/api/v11/deliveryservice.rst.txt | 1286 ++++
docs/master/_sources/api/v11/hwinfo.rst.txt | 67 +
docs/master/_sources/api/v11/index.rst.txt | 40 +
docs/master/_sources/api/v11/parameter.rst.txt | 136 +
.../_sources/api/v11/phys_location.rst.txt | 449 ++
docs/master/_sources/api/v11/profile.rst.txt | 129 +
docs/master/_sources/api/v11/region.rst.txt | 235 +
docs/master/_sources/api/v11/role.rst.txt | 58 +
docs/master/_sources/api/v11/server.rst.txt | 630 ++
docs/master/_sources/api/v11/static_dns.rst.txt | 63 +
docs/master/_sources/api/v11/status.rst.txt | 127 +
docs/master/_sources/api/v11/system.rst.txt | 79 +
.../_sources/api/v11/to_extension.rst.txt | 210 +
docs/master/_sources/api/v11/type.rst.txt | 151 +
docs/master/_sources/api/v11/user.rst.txt | 778 +++
.../_sources/api/v12/api_capability.rst.txt | 320 +
docs/master/_sources/api/v12/asn.rst.txt | 200 +
docs/master/_sources/api/v12/cache.rst.txt | 84 +
.../master/_sources/api/v12/cache_stats.rst.txt | 134 +
docs/master/_sources/api/v12/cachegroup.rst.txt | 802 +++
.../api/v12/cachegroup_parameter.rst.txt | 177 +
docs/master/_sources/api/v12/capability.rst.txt | 271 +
docs/master/_sources/api/v12/cdn.rst.txt | 1407 ++++
docs/master/_sources/api/v12/changelog.rst.txt | 164 +
.../_sources/api/v12/configfiles_ats.rst.txt | 193 +
.../_sources/api/v12/deliveryservice.rst.txt | 3479 ++++++++++
.../api/v12/deliveryservice_regex.rst.txt | 374 ++
.../api/v12/deliveryservice_stats.rst.txt | 155 +
docs/master/_sources/api/v12/division.rst.txt | 203 +
docs/master/_sources/api/v12/federation.rst.txt | 434 ++
.../api/v12/federation_deliveryservice.rst.txt | 155 +
.../v12/federation_federationresolver.rst.txt | 118 +
.../api/v12/federation_resolver.rst.txt | 110 +
.../_sources/api/v12/federation_user.rst.txt | 161 +
docs/master/_sources/api/v12/hwinfo.rst.txt | 68 +
docs/master/_sources/api/v12/index.rst.txt | 62 +
docs/master/_sources/api/v12/influxdb.rst.txt | 65 +
docs/master/_sources/api/v12/iso.rst.txt | 132 +
docs/master/_sources/api/v12/job.rst.txt | 136 +
docs/master/_sources/api/v12/parameter.rst.txt | 691 ++
.../_sources/api/v12/phys_location.rst.txt | 456 ++
docs/master/_sources/api/v12/profile.rst.txt | 415 ++
.../_sources/api/v12/profile_parameter.rst.txt | 573 ++
docs/master/_sources/api/v12/region.rst.txt | 244 +
docs/master/_sources/api/v12/role.rst.txt | 59 +
docs/master/_sources/api/v12/server.rst.txt | 1496 +++++
docs/master/_sources/api/v12/static_dns.rst.txt | 66 +
docs/master/_sources/api/v12/status.rst.txt | 127 +
.../_sources/api/v12/steering_target.rst.txt | 333 +
docs/master/_sources/api/v12/system.rst.txt | 80 +
docs/master/_sources/api/v12/tenant.rst.txt | 255 +
.../_sources/api/v12/to_extension.rst.txt | 206 +
docs/master/_sources/api/v12/topology.rst.txt | 152 +
docs/master/_sources/api/v12/type.rst.txt | 151 +
docs/master/_sources/api/v12/user.rst.txt | 1258 ++++
.../_sources/development/traffic_ops.rst.txt | 261 -
docs/master/_sources/index.rst.txt | 8 +
docs/master/api/index.html | 369 ++
docs/master/api/routes.html | 468 ++
docs/master/api/traffic_ops_api.html | 492 ++
docs/master/api/v11/asn.html | 364 ++
docs/master/api/v11/cachegroup.html | 741 +++
docs/master/api/v11/cdn.html | 2049 ++++++
docs/master/api/v11/changelog.html | 497 ++
docs/master/api/v11/deliveryservice.html | 2371 +++++++
docs/master/api/v11/hwinfo.html | 362 ++
docs/master/api/v11/index.html | 320 +
docs/master/api/v11/parameter.html | 463 ++
docs/master/api/v11/phys_location.html | 989 +++
docs/master/api/v11/profile.html | 472 ++
docs/master/api/v11/region.html | 650 ++
docs/master/api/v11/role.html | 352 ++
docs/master/api/v11/server.html | 1248 ++++
docs/master/api/v11/static_dns.html | 362 ++
docs/master/api/v11/status.html | 448 ++
docs/master/api/v11/system.html | 380 ++
docs/master/api/v11/to_extension.html | 583 ++
docs/master/api/v11/type.html | 502 ++
docs/master/api/v11/user.html | 1500 +++++
docs/master/api/v12/api_capability.html | 799 +++
docs/master/api/v12/asn.html | 587 ++
docs/master/api/v12/cache.html | 386 ++
docs/master/api/v12/cache_stats.html | 468 ++
docs/master/api/v12/cachegroup.html | 1551 +++++
docs/master/api/v12/cachegroup_parameter.html | 518 ++
docs/master/api/v12/capability.html | 702 ++
docs/master/api/v12/cdn.html | 2566 ++++++++
docs/master/api/v12/changelog.html | 521 ++
docs/master/api/v12/configfiles_ats.html | 489 ++
docs/master/api/v12/deliveryservice.html | 5983 ++++++++++++++++++
docs/master/api/v12/deliveryservice_regex.html | 860 +++
docs/master/api/v12/deliveryservice_stats.html | 495 ++
docs/master/api/v12/division.html | 586 ++
docs/master/api/v12/federation.html | 932 +++
.../api/v12/federation_deliveryservice.html | 501 ++
.../api/v12/federation_federationresolver.html | 450 ++
docs/master/api/v12/federation_resolver.html | 433 ++
docs/master/api/v12/federation_user.html | 511 ++
docs/master/api/v12/hwinfo.html | 365 ++
docs/master/api/v12/index.html | 341 +
docs/master/api/v12/influxdb.html | 354 ++
docs/master/api/v12/iso.html | 469 ++
docs/master/api/v12/job.html | 473 ++
docs/master/api/v12/parameter.html | 1383 ++++
docs/master/api/v12/phys_location.html | 1009 +++
docs/master/api/v12/profile.html | 982 +++
docs/master/api/v12/profile_parameter.html | 1106 ++++
docs/master/api/v12/region.html | 673 ++
docs/master/api/v12/role.html | 355 ++
docs/master/api/v12/server.html | 2703 ++++++++
docs/master/api/v12/static_dns.html | 365 ++
docs/master/api/v12/status.html | 448 ++
docs/master/api/v12/steering_target.html | 801 +++
docs/master/api/v12/system.html | 383 ++
docs/master/api/v12/tenant.html | 656 ++
docs/master/api/v12/to_extension.html | 583 ++
docs/master/api/v12/topology.html | 520 ++
docs/master/api/v12/type.html | 502 ++
docs/master/api/v12/user.html | 2303 +++++++
docs/master/development/index.html | 10 +-
docs/master/development/traffic_ops.html | 295 +-
docs/master/genindex.html | 9 +
docs/master/index.html | 91 +-
docs/master/objects.inv | Bin 4967 -> 4903 bytes
docs/master/search.html | 9 +
docs/master/searchindex.js | 2 +-
133 files changed, 74600 insertions(+), 546 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/2ca12610/docs/master/_sources/api/index.rst.txt
----------------------------------------------------------------------
diff --git a/docs/master/_sources/api/index.rst.txt b/docs/master/_sources/api/index.rst.txt
new file mode 100644
index 0000000..cd619bc
--- /dev/null
+++ b/docs/master/_sources/api/index.rst.txt
@@ -0,0 +1,27 @@
+..
+..
+.. Licensed under the Apache License, Version 2.0 (the "License");
+.. you may not use this file except in compliance with the License.
+.. You may obtain a copy of the License at
+..
+.. http://www.apache.org/licenses/LICENSE-2.0
+..
+.. Unless required by applicable law or agreed to in writing, software
+.. distributed under the License is distributed on an "AS IS" BASIS,
+.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+.. See the License for the specific language governing permissions and
+.. limitations under the License.
+..
+
+APIs
+****
+A guide to external RESTful APIs for Traffic Ops
+
+.. toctree::
+ :maxdepth: 2
+
+ traffic_ops_api
+ routes
+ v11/index
+ v12/index
+
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/2ca12610/docs/master/_sources/api/routes.rst.txt
----------------------------------------------------------------------
diff --git a/docs/master/_sources/api/routes.rst.txt b/docs/master/_sources/api/routes.rst.txt
new file mode 100644
index 0000000..1c849b3
--- /dev/null
+++ b/docs/master/_sources/api/routes.rst.txt
@@ -0,0 +1,118 @@
+.. raw:: html
+
+ <style>
+ table {
+ table-layout: fixed;
+ width: 100%;
+ }
+
+ td {
+ word-wrap:break-word;
+ }
+ table.docutils col:nth-child(1) {
+ width: 30%;
+ }
+ table.docutils col:nth-child(2) {
+ width: 30%;
+ }
+ table.docutils col:nth-child(3) {
+ width: 30%;
+ }
+ .wy-nav-content {
+ max-width: 1200px;
+ width: 90%;
+ }
+ </style>
+
+..
+..
+.. Licensed under the Apache License, Version 2.0 (the "License");
+.. you may not use this file except in compliance with the License.
+.. You may obtain a copy of the License at
+..
+.. http://www.apache.org/licenses/LICENSE-2.0
+..
+.. Unless required by applicable law or agreed to in writing, software
+.. distributed under the License is distributed on an "AS IS" BASIS,
+.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+.. See the License for the specific language governing permissions and
+.. limitations under the License.
+..
+
+
+.. _to-api-routes:
+
+API Routes
+==========
+
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| 1.0 | 1.1 | 1.2 |
++====================================+====================================================+====================================================+
+| /asns | :ref:`to-api-v11-asns-route` | :ref:`to-api-v12-asns-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /availableds | :ref:`to-api-v11-ds-route` | :ref:`to-api-v12-ds-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| *Not Implemented* | *Not Implemented* | :ref:`to-api-v12-cache-stats-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /datacrans | /api/1.1/crans.json | /api/1.2/crans.json |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /datacrans/orderby/:field | /api/1.1/crans.json | /api/1.2/crans.json |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /datadeliveryservice | :ref:`to-api-v11-ds-route` | :ref:`to-api-v12-ds-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /datadeliveryserviceserver | /api/1.1/deliveryserviceserver.json | /api/1.2/deliveryserviceserver.json |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /datadomains | /api/1.1/cdns/domains.json | /api/1.2/cdns/domains.json |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| *Not Implemented* | *Not Implemented* | :ref:`to-api-v12-ds-stats-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /datahwinfo | :ref:`to-api-v11-hwinfo-route` | :ref:`to-api-v12-hwinfo-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /datalinks | /api/1.1/deliveryserviceserver.json | /api/1.2/deliveryserviceserver.json |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /datalinks/orderby/:field | /api/1.1/deliveryserviceserver.json | /api/1.2/deliveryserviceserver.json |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /datalogs | :ref:`to-api-v11-change-logs-route` | :ref:`to-api-v12-change-logs-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /datalocation/orderby/id | :ref:`to-api-v11-cachegroups-route` | :ref:`to-api-v12-cachegroups-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /datalocationparameters | :ref:`to-api-v11-cachegroups-route` | :ref:`to-api-v12-cachegroups-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /dataparameter | :ref:`to-api-v11-parameters-route` | :ref:`to-api-v12-parameters-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /dataparameter/:parameter | /api/1.1/parameters/profile/:parameter.json | /api/1.2/parameters/profile/:parameter.json |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /dataphys_location | :ref:`to-api-v11-phys-loc-route` | :ref:`to-api-v12-phys-loc-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /dataprofile | :ref:`to-api-v11-profiles-route` | :ref:`to-api-v12-profiles-route` |
+| | | |
+| /dataprofile/orderby/name | | |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /dataregion | :ref:`to-api-v11-regions-route` | :ref:`to-api-v12-regions-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /datarole | :ref:`to-api-v11-roles-route` | :ref:`to-api-v12-roles-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /datarole/orderby/:field | :ref:`to-api-v11-roles-route` | :ref:`to-api-v12-roles-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /dataserver | :ref:`to-api-v11-servers-route` | :ref:`to-api-v12-servers-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /dataserver/orderby/:field | :ref:`to-api-v11-servers-route` | :ref:`to-api-v12-servers-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /dataserverdetail/select/:hostname | /api/1.1/servers/hostname/:hostname/details.json | /api/1.2/servers/hostname/:hostname/details.json |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /datastaticdnsentry | :ref:`to-api-v11-static-dns-route` | :ref:`to-api-v12-static-dns-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /datastatus | :ref:`to-api-v11-statuses-route` | :ref:`to-api-v12-statuses-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /datastatus/orderby/name | :ref:`to-api-v11-statuses-route` | :ref:`to-api-v12-statuses-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /datatype | :ref:`to-api-v11-types-route` | :ref:`to-api-v12-types-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /datatype/orderby/:field | :ref:`to-api-v11-types-route` | :ref:`to-api-v12-types-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /datauser | :ref:`to-api-v11-users-route` | :ref:`to-api-v12-users-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| /datauser/orderby/:field | :ref:`to-api-v11-users-route` | :ref:`to-api-v12-users-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
+| *Not Implemented* | *Not Implemented* | :ref:`to-api-v12-configfiles_ats-route` |
++------------------------------------+----------------------------------------------------+----------------------------------------------------+
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/2ca12610/docs/master/_sources/api/traffic_ops_api.rst.txt
----------------------------------------------------------------------
diff --git a/docs/master/_sources/api/traffic_ops_api.rst.txt b/docs/master/_sources/api/traffic_ops_api.rst.txt
new file mode 100644
index 0000000..2ae61d3
--- /dev/null
+++ b/docs/master/_sources/api/traffic_ops_api.rst.txt
@@ -0,0 +1,192 @@
+..
+..
+.. Licensed under the Apache License, Version 2.0 (the "License");
+.. you may not use this file except in compliance with the License.
+.. You may obtain a copy of the License at
+..
+.. http://www.apache.org/licenses/LICENSE-2.0
+..
+.. Unless required by applicable law or agreed to in writing, software
+.. distributed under the License is distributed on an "AS IS" BASIS,
+.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+.. See the License for the specific language governing permissions and
+.. limitations under the License.
+..
+
+API Overview
+************
+The Traffic Ops API provides programmatic access to read and write CDN data providing authorized API consumers with the ability to monitor CDN performance and configure CDN settings and parameters.
+
+Response Structure
+------------------
+All successful responses have the following structure: ::
+
+ {
+ "response": <JSON object with main response>,
+ }
+
+To make the documentation easier to read, only the ``<JSON object with main response>`` is documented, even though the response and version fields are always present.
+
+Using API Endpoints
+-------------------
+1. Authenticate with your Traffic Portal or Traffic Ops user account credentials.
+2. Upon successful user authentication, note the mojolicious cookie value in the response headers.
+3. Pass the mojolicious cookie value, along with any subsequent calls to an authenticated API endpoint.
+
+Example: ::
+
+ [jvd@laika ~]$ curl -H "Accept: application/json" http://localhost:3000/api/1.1/usage/asns.json
+ {"alerts":[{"level":"error","text":"Unauthorized, please log in."}]}
+ [jvd@laika ~]$
+ [jvd@laika ~]$ curl -v -H "Accept: application/json" -v -X POST --data '{ "u":"admin", "p":"secret_passwd" }' http://localhost:3000/api/1.1/user/login
+ * Hostname was NOT found in DNS cache
+ * Trying ::1...
+ * connect to ::1 port 3000 failed: Connection refused
+ * Trying 127.0.0.1...
+ * Connected to localhost (127.0.0.1) port 3000 (#0)
+ > POST /api/1.1/user/login HTTP/1.1
+ > User-Agent: curl/7.37.1
+ > Host: localhost:3000
+ > Accept: application/json
+ > Content-Length: 32
+ > Content-Type: application/x-www-form-urlencoded
+ >
+ * upload completely sent off: 32 out of 32 bytes
+ < HTTP/1.1 200 OK
+ < Connection: keep-alive
+ < Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
+ < Access-Control-Allow-Origin: http://localhost:8080
+ < Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept
+ < Set-Cookie: mojolicious=eyJleHBpcmVzIjoxNDI5NDAyMjAxLCJhdXRoX2RhdGEiOiJhZG1pbiJ9--f990d03b7180b1ece97c3bb5ca69803cd6a79862; expires=Sun, 19 Apr 2015 00:10:01 GMT; path=/; HttpOnly
+ < Content-Type: application/json
+ < Date: Sat, 18 Apr 2015 20:10:01 GMT
+ < Access-Control-Allow-Credentials: true
+ < Content-Length: 81
+ < Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+ * Server Mojolicious (Perl) is not blacklisted
+ < Server: Mojolicious (Perl)
+ <
+ * Connection #0 to host localhost left intact
+ {"alerts":[{"level":"success","text":"Successfully logged in."}]}
+ [jvd@laika ~]$
+
+ [jvd@laika ~]$ curl -H'Cookie: mojolicious=eyJleHBpcmVzIjoxNDI5NDAyMjAxLCJhdXRoX2RhdGEiOiJhZG1pbiJ9--f990d03b7180b1ece97c3bb5ca69803cd6a79862;' -H "Accept: application/json" http://localhost:3000/api/1.1/asns.json
+ {"response":{"asns":[{"lastUpdated":"2012-09-17 15:41:22", .. asn data deleted .. ,}
+ [jvd@laika ~]$
+
+API Errors
+----------
+
+**Response Properties**
+
++----------------------+--------+------------------------------------------------+
+| Parameter | Type | Description |
++======================+========+================================================+
+|``alerts`` | array | A collection of alert messages. |
++----------------------+--------+------------------------------------------------+
+| ``>level`` | string | Success, info, warning or error. |
++----------------------+--------+------------------------------------------------+
+| ``>text`` | string | Alert message. |
++----------------------+--------+------------------------------------------------+
+
+The 3 most common errors returned by Traffic Ops are:
+
+401 Unauthorized
+ When you don't supply the right cookie, this is the response. ::
+
+ [jvd@laika ~]$ curl -v -H "Accept: application/json" http://localhost:3000/api/1.1/usage/asns.json
+ * Hostname was NOT found in DNS cache
+ * Trying ::1...
+ * connect to ::1 port 3000 failed: Connection refused
+ * Trying 127.0.0.1...
+ * Connected to localhost (127.0.0.1) port 3000 (#0)
+ > GET /api/1.1/usage/asns.json HTTP/1.1
+ > User-Agent: curl/7.37.1
+ > Host: localhost:3000
+ > Accept: application/json
+ >
+ < HTTP/1.1 401 Unauthorized
+ < Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+ < Content-Length: 84
+ * Server Mojolicious (Perl) is not blacklisted
+ < Server: Mojolicious (Perl)
+ < Connection: keep-alive
+ < Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
+ < Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept
+ < Access-Control-Allow-Origin: http://localhost:8080
+ < Date: Sat, 18 Apr 2015 20:36:12 GMT
+ < Content-Type: application/json
+ < Access-Control-Allow-Credentials: true
+ <
+ * Connection #0 to host localhost left intact
+ {"alerts":[{"level":"error","text":"Unauthorized, please log in."}]}
+ [jvd@laika ~]$
+
+404 Not Found
+ When the resource (path) is non existent Traffic Ops returns a 404::
+
+ [jvd@laika ~]$ curl -v -H'Cookie: mojolicious=eyJleHBpcmVzIjoxNDI5NDAyMjAxLCJhdXRoX2RhdGEiOiJhZG1pbiJ9--f990d03b7180b1ece97c3bb5ca69803cd6a79862;' -H "Accept: application/json" http://localhost:3000/api/1.1/asnsjj.json
+ * Hostname was NOT found in DNS cache
+ * Trying ::1...
+ * connect to ::1 port 3000 failed: Connection refused
+ * Trying 127.0.0.1...
+ * Connected to localhost (127.0.0.1) port 3000 (#0)
+ > GET /api/1.1/asnsjj.json HTTP/1.1
+ > User-Agent: curl/7.37.1
+ > Host: localhost:3000
+ > Cookie: mojolicious=eyJleHBpcmVzIjoxNDI5NDAyMjAxLCJhdXRoX2RhdGEiOiJhZG1pbiJ9--f990d03b7180b1ece97c3bb5ca69803cd6a79862;
+ > Accept: application/json
+ >
+ < HTTP/1.1 404 Not Found
+ * Server Mojolicious (Perl) is not blacklisted
+ < Server: Mojolicious (Perl)
+ < Content-Length: 75
+ < Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+ < Content-Type: application/json
+ < Date: Sat, 18 Apr 2015 20:37:43 GMT
+ < Access-Control-Allow-Credentials: true
+ < Set-Cookie: mojolicious=eyJleHBpcmVzIjoxNDI5NDAzODYzLCJhdXRoX2RhdGEiOiJhZG1pbiJ9--8a5a61b91473bc785d4073fe711de8d2c63f02dd; expires=Sun, 19 Apr 2015 00:37:43 GMT; path=/; HttpOnly
+ < Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
+ < Connection: keep-alive
+ < Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept
+ < Access-Control-Allow-Origin: http://localhost:8080
+ <
+ * Connection #0 to host localhost left intact
+ {"alerts":[{"text":"Resource not found.","level":"error"}]}
+ [jvd@laika ~]$
+
+500 Internal Server Error
+ When you are asking for a correct path, but the database doesn't match, it returns a 500::
+
+ [jvd@laika ~]$ curl -v -H'Cookie: mojolicious=eyJleHBpcmVzIjoxNDI5NDAyMjAxLCJhdXRoX2RhdGEiOiJhZG1pbiJ9--f990d03b7180b1ece97c3bb5ca69803cd6a79862;' -H "Accept: application/json" http://localhost:3000/api/1.1/servers/hostname/jj/details.json
+ * Hostname was NOT found in DNS cache
+ * Trying ::1...
+ * connect to ::1 port 3000 failed: Connection refused
+ * Trying 127.0.0.1...
+ * Connected to localhost (127.0.0.1) port 3000 (#0)
+ > GET /api/1.1/servers/hostname/jj/details.json HTTP/1.1
+ > User-Agent: curl/7.37.1
+ > Host: localhost:3000
+ > Cookie: mojolicious=eyJleHBpcmVzIjoxNDI5NDAyMjAxLCJhdXRoX2RhdGEiOiJhZG1pbiJ9--f990d03b7180b1ece97c3bb5ca69803cd6a79862;
+ > Accept: application/json
+ >
+ < HTTP/1.1 500 Internal Server Error
+ * Server Mojolicious (Perl) is not blacklisted
+ < Server: Mojolicious (Perl)
+ < Cache-Control: no-cache, no-store, max-age=0, must-revalidate
+ < Content-Length: 93
+ < Set-Cookie: mojolicious=eyJhdXRoX2RhdGEiOiJhZG1pbiIsImV4cGlyZXMiOjE0Mjk0MDQzMDZ9--1b08977e91f8f68b0ff5d5e5f6481c76ddfd0853; expires=Sun, 19 Apr 2015 00:45:06 GMT; path=/; HttpOnly
+ < Content-Type: application/json
+ < Date: Sat, 18 Apr 2015 20:45:06 GMT
+ < Access-Control-Allow-Credentials: true
+ < Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
+ < Connection: keep-alive
+ < Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept
+ < Access-Control-Allow-Origin: http://localhost:8080
+ <
+ * Connection #0 to host localhost left intact
+ {"alerts":[{"level":"error","text":"An error occurred. Please contact your administrator."}]}
+ [jvd@laika ~]$
+
+ The rest of the API documentation will only document the ``200 OK`` case, where no errors have occured.
+
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/2ca12610/docs/master/_sources/api/v11/asn.rst.txt
----------------------------------------------------------------------
diff --git a/docs/master/_sources/api/v11/asn.rst.txt b/docs/master/_sources/api/v11/asn.rst.txt
new file mode 100644
index 0000000..b6960d7
--- /dev/null
+++ b/docs/master/_sources/api/v11/asn.rst.txt
@@ -0,0 +1,69 @@
+..
+..
+.. Licensed under the Apache License, Version 2.0 (the "License");
+.. you may not use this file except in compliance with the License.
+.. You may obtain a copy of the License at
+..
+.. http://www.apache.org/licenses/LICENSE-2.0
+..
+.. Unless required by applicable law or agreed to in writing, software
+.. distributed under the License is distributed on an "AS IS" BASIS,
+.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+.. See the License for the specific language governing permissions and
+.. limitations under the License.
+..
+
+
+.. _to-api-v11-asn:
+
+ASN
+===
+
+.. _to-api-v11-asns-route:
+
+/api/1.1/asns
++++++++++++++
+
+**GET /api/1.1/asns**
+
+ Authentication Required: Yes
+
+ Role(s) Required: None
+
+ **Response Properties**
+
+ +------------------+--------+-------------------------------------------------------------------------+
+ | Parameter | Type | Description |
+ +==================+========+=========================================================================+
+ | ``asns`` | array | A collection of asns |
+ +------------------+--------+-------------------------------------------------------------------------+
+ | ``>lastUpdated`` | string | The Time / Date this server entry was last updated |
+ +------------------+--------+-------------------------------------------------------------------------+
+ | ``>id`` | string | Local unique identifier for the ASN |
+ +------------------+--------+-------------------------------------------------------------------------+
+ | ``>asn`` | string | Autonomous System Numbers per APNIC for identifying a service provider. |
+ +------------------+--------+-------------------------------------------------------------------------+
+ | ``>cachegroup`` | string | Related cachegroup name |
+ +------------------+--------+-------------------------------------------------------------------------+
+
+ **Response Example** ::
+
+ {
+ "response": {
+ "asns": [
+ {
+ "lastUpdated": "2012-09-17 21:41:22",
+ "id": "27",
+ "asn": "7015",
+ "cachegroup": "us-ma-woburn"
+ },
+ {
+ "lastUpdated": "2012-09-17 21:41:22",
+ "id": "28",
+ "asn": "7016",
+ "cachegroup": "us-pa-pittsburgh"
+ }
+ ]
+ },
+ }
+
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/2ca12610/docs/master/_sources/api/v11/cachegroup.rst.txt
----------------------------------------------------------------------
diff --git a/docs/master/_sources/api/v11/cachegroup.rst.txt b/docs/master/_sources/api/v11/cachegroup.rst.txt
new file mode 100644
index 0000000..5278645
--- /dev/null
+++ b/docs/master/_sources/api/v11/cachegroup.rst.txt
@@ -0,0 +1,317 @@
+..
+..
+.. Licensed under the Apache License, Version 2.0 (the "License");
+.. you may not use this file except in compliance with the License.
+.. You may obtain a copy of the License at
+..
+.. http://www.apache.org/licenses/LICENSE-2.0
+..
+.. Unless required by applicable law or agreed to in writing, software
+.. distributed under the License is distributed on an "AS IS" BASIS,
+.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+.. See the License for the specific language governing permissions and
+.. limitations under the License.
+..
+
+.. _to-api-v11-cachegroup:
+
+Cache Group
+===========
+
+.. _to-api-v11-cachegroups-route:
+
+/api/1.1/cachegroups
+++++++++++++++++++++
+
+**GET /api/1.1/cachegroups**
+
+ Authentication Required: Yes
+
+ Role(s) Required: None
+
+ **Response Properties**
+
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | Parameter | Type | Description |
+ +===================================+========+==========================================================================+
+ | ``id`` | string | Local unique identifier for the Cache Group |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``lastUpdated`` | string | The Time / Date this entry was last updated |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``latitude`` | string | Latitude for the Cache Group |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``longitude`` | string | Longitude for the Cache Group |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``name`` | string | The name of the Cache Group entry |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``parentCachegroupId`` | string | Parent cachegroup ID. |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``parentCachegroupName`` | string | Parent cachegroup name. |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``secondaryParentCachegroupId`` | string | Secondary parent cachegroup ID. |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``secondaryParentCachegroupName`` | string | Secondary parent cachegroup name. |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``shortName`` | string | Abbreviation of the Cache Group Name |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``typeId`` | string | Unique identifier for the 'Type' of Cache Group entry |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``typeName`` | string | The name of the type of Cache Group entry |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+
+ **Response Example** ::
+
+ {
+ "response": [
+ {
+ "id": "21",
+ "lastUpdated": "2012-09-25 20:27:28",
+ "latitude": "0",
+ "longitude": "0",
+ "name": "dc-chicago",
+ "parentCachegroupId": null,
+ "parentCachegroupName": null,
+ "secondaryParentCachegroupId": null,
+ "secondaryParentCachegroupName": null,
+ "shortName": "dcchi",
+ "typeName": "MID_LOC",
+ "typeId": "4"
+ },
+ {
+ "id": "22",
+ "lastUpdated": "2012-09-25 20:27:28",
+ "latitude": "0",
+ "longitude": "0",
+ "name": "dc-chicago-1",
+ "parentCachegroupId": null,
+ "parentCachegroupName": null,
+ "secondaryParentCachegroupId": null,
+ "secondaryParentCachegroupName": null,
+ "shortName": "dcchi",
+ "typeName": "MID_LOC",
+ "typeId": "4"
+ }
+ ],
+ }
+
+|
+
+**GET /api/1.1/cachegroups/trimmed**
+
+ Authentication Required: Yes
+
+ Role(s) Required: None
+
+ **Response Properties**
+
+ +----------------------+--------+------------------------------------------------+
+ | Parameter | Type | Description |
+ +======================+========+================================================+
+ |``name`` | string | |
+ +----------------------+--------+------------------------------------------------+
+
+ **Response Example** ::
+
+ {
+ "response": [
+ {
+ "name": "dc-chicago"
+ },
+ {
+ "name": "dc-cmc"
+ }
+ ],
+ }
+
+|
+
+**GET /api/1.1/cachegroups/:id**
+
+ Authentication Required: Yes
+
+ Role(s) Required: None
+
+ **Response Properties**
+
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | Parameter | Type | Description |
+ +===================================+========+==========================================================================+
+ | ``id`` | string | Local unique identifier for the Cache Group |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``lastUpdated`` | string | The Time / Date this entry was last updated |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``latitude`` | string | Latitude for the Cache Group |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``longitude`` | string | Longitude for the Cache Group |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``name`` | string | The name of the Cache Group entry |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``parentCachegroupId`` | string | Parent cachegroup ID. |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``parentCachegroupName`` | string | Parent cachegroup name. |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``secondaryParentCachegroupId`` | string | Secondary parent cachegroup ID. |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``secondaryParentCachegroupName`` | string | Secondary parent cachegroup name. |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``shortName`` | string | Abbreviation of the Cache Group Name |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``typeId`` | string | Unique identifier for the 'Type' of Cache Group entry |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+ | ``typeName`` | string | The name of the type of Cache Group entry |
+ +-----------------------------------+--------+--------------------------------------------------------------------------+
+
+ **Response Example** ::
+
+ {
+ "response": [
+ {
+ "id": "21",
+ "lastUpdated": "2012-09-25 20:27:28",
+ "latitude": "0",
+ "longitude": "0",
+ "name": "dc-chicago",
+ "parentCachegroupId": null,
+ "parentCachegroupName": null,
+ "secondaryParentCachegroupId": null,
+ "secondaryParentCachegroupName": null,
+ "shortName": "dcchi",
+ "typeName": "MID_LOC",
+ "typeId": "4"
+ }
+ ],
+ }
+
+|
+
+
+**GET /api/1.1/cachegroup/:parameter_id/parameter**
+
+ Authentication Required: Yes
+
+ Role(s) Required: None
+
+ **Request Route Parameters**
+
+ +------------------+----------+-------------+
+ | Name | Required | Description |
+ +==================+==========+=============+
+ | ``parameter_id`` | yes | |
+ +------------------+----------+-------------+
+
+ **Response Properties**
+
+ +-----------------+--------+-------------+
+ | Parameter | Type | Description |
+ +=================+========+=============+
+ | ``cachegroups`` | array | |
+ +-----------------+--------+-------------+
+ | ``>name`` | string | |
+ +-----------------+--------+-------------+
+ | ``>id`` | string | |
+ +-----------------+--------+-------------+
+
+ **Response Example** ::
+
+ {
+ "response": {
+ "cachegroups": [
+ {
+ "name": "dc-chicago",
+ "id": "21"
+ },
+ {
+ "name": "dc-cmc",
+ "id": "22"
+ }
+ ]
+ },
+ }
+
+
+**GET /api/1.1/cachegroupparameters**
+
+ Authentication Required: Yes
+
+ Role(s) Required: None
+
+ **Response Properties**
+
+ +--------------------------+--------+-----------------------------------------+
+ | Parameter | Type | Description |
+ +==========================+========+=========================================+
+ | ``cachegroupParameters`` | array | A collection of cache group parameters. |
+ +--------------------------+--------+-----------------------------------------+
+ | ``>parameter`` | string | |
+ +--------------------------+--------+-----------------------------------------+
+ | ``>last_updated`` | string | |
+ +--------------------------+--------+-----------------------------------------+
+ | ``>cachegroup`` | string | |
+ +--------------------------+--------+-----------------------------------------+
+
+ **Response Example** ::
+
+ {
+ "response": {
+ "cachegroupParameters": [
+ {
+ "parameter": "379",
+ "last_updated": "2013-08-05 18:49:37",
+ "cachegroup": "us-ca-sanjose"
+ },
+ {
+ "parameter": "380",
+ "last_updated": "2013-08-05 18:49:37",
+ "cachegroup": "us-ca-sanjose"
+ },
+ {
+ "parameter": "379",
+ "last_updated": "2013-08-05 18:49:37",
+ "cachegroup": "us-ma-woburn"
+ }
+ ]
+ },
+ }
+
+
+|
+
+**GET /api/1.1/cachegroups/:parameter_id/parameter/available**
+
+ Authentication Required: Yes
+
+ Role(s) Required: None
+
+ **Request Route Parameters**
+
+ +------------------+----------+-------------+
+ | Name | Required | Description |
+ +==================+==========+=============+
+ | ``parameter_id`` | yes | |
+ +------------------+----------+-------------+
+
+ **Response Properties**
+
+ +----------------------+--------+------------------------------------------------+
+ | Parameter | Type | Description |
+ +======================+========+================================================+
+ |``name`` | | |
+ +----------------------+--------+------------------------------------------------+
+ |``id`` | | |
+ +----------------------+--------+------------------------------------------------+
+
+ **Response Example** ::
+
+ {
+ "response": [
+ {
+ "name": "dc-chicago",
+ "id": "21"
+ },
+ {
+ "name": "dc-cmc",
+ "id": "22"
+ }
+ ],
+ }
+