http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/42d25dc5/docs/latest/_sources/development/traffic_ops_api/v11/redis.txt ---------------------------------------------------------------------- diff --git a/docs/latest/_sources/development/traffic_ops_api/v11/redis.txt b/docs/latest/_sources/development/traffic_ops_api/v11/redis.txt deleted file mode 100644 index 795be7f..0000000 --- a/docs/latest/_sources/development/traffic_ops_api/v11/redis.txt +++ /dev/null @@ -1,431 +0,0 @@ -.. -.. Copyright 2015 Comcast Cable Communications Management, LLC -.. -.. 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-redis: - -Redis -===== - -.. Note:: The redis documentation needs a thorough review! - -.. _to-api-v11-redis-route: - -/api/1.1/redis -++++++++++++++ - -**GET /api/1.1/traffic_monitor/stats.json** - -Authentication Required: Yes - -Role(s) Required: None - -**Response Properties** - -+----------------------+--------+------------------------------------------------+ -| Parameter | Type | Description | -+======================+========+================================================+ -| ``aaData`` | array | | -+----------------------+--------+------------------------------------------------+ - -**Response Example** -:: - - { - "aaData": [ - [ - "0", - "ALL", - "ALL", - "ALL", - "true", - "ALL", - "142035", - "172365661.85" - ], - [ - 1, - "EDGE1_TOP_421_PSPP", - "odol-atsec-atl-03", - "us-ga-atlanta", - "1", - "REPORTED", - "596", - "923510.04", - "69.241.82.126" - ] - ], - } - -| - -**GET /api/1.1/redis/stats.json** - -Authentication Required: Yes - -Role(s) Required: None - -**Response Properties** - -+----------------------+--------+------------------------------------------------+ -| Parameter | Type | Description | -+======================+========+================================================+ -|``number`` | array | | -+----------------------+--------+------------------------------------------------+ -|``what`` | string | | -+----------------------+--------+------------------------------------------------+ -|``which`` | string | | -+----------------------+--------+------------------------------------------------+ -|``interval`` | string | | -+----------------------+--------+------------------------------------------------+ -|``elapsed`` | string | | -+----------------------+--------+------------------------------------------------+ -|``end`` | string | | -+----------------------+--------+------------------------------------------------+ -|``start`` | string | | -+----------------------+--------+------------------------------------------------+ - -**Response Example** -:: - - { - "number": -1, - "what": null, - "which": null, - "interval": " 10 seconds ", - "elapsed": "0.11271 (0.112065) ", - "end": "Thu Jan 1 00:00:00 1970", - "start": "Thu Jan 1 00:00:00 1970" - } - -| - -**GET /api/1.1/redis/info/:host_name.json** - -Authentication Required: Yes - -Role(s) Required: None - -**Request Route Parameters** - -+--------------------------+--------+--------------------------------------------+ -| Parameter | Type | Description | -+==========================+========+============================================+ -|``host_name`` | string | | -+--------------------------+--------+--------------------------------------------+ - -**Response Properties** - -+-------------------------------------+--------+-------------+ -| Parameter | Type | Description | -+=====================================+========+=============+ -| ``Server`` | hash | | -+-------------------------------------+--------+-------------+ -| ``>redis_build_id`` | string | | -+-------------------------------------+--------+-------------+ -| ``>config_file`` | string | | -+-------------------------------------+--------+-------------+ -| ``>uptime_in_seconds`` | string | | -+-------------------------------------+--------+-------------+ -| ``>hz`` | string | | -+-------------------------------------+--------+-------------+ -| ``>os`` | string | | -+-------------------------------------+--------+-------------+ -| ``>redis_git_sha1`` | string | | -+-------------------------------------+--------+-------------+ -| ``>redis_version`` | string | | -+-------------------------------------+--------+-------------+ -| ``>tcp_port`` | string | | -+-------------------------------------+--------+-------------+ -| ``>redis_git_dirty`` | string | | -+-------------------------------------+--------+-------------+ -| ``>redis_mode`` | string | | -+-------------------------------------+--------+-------------+ -| ``>run_id`` | string | | -+-------------------------------------+--------+-------------+ -| ``>uptime_in_days`` | string | | -+-------------------------------------+--------+-------------+ -| ``>gcc_version`` | string | | -+-------------------------------------+--------+-------------+ -| ``>arch_bits`` | string | | -+-------------------------------------+--------+-------------+ -| ``>lru_clock`` | string | | -+-------------------------------------+--------+-------------+ -| ``>multiplexing_api`` | string | | -+-------------------------------------+--------+-------------+ -| ``Keyspace`` | string | | -+-------------------------------------+--------+-------------+ -| ``>db0`` | string | | -+-------------------------------------+--------+-------------+ -| ``slowlog`` | array | | -+-------------------------------------+--------+-------------+ -| ``Persistence`` | hash | | -+-------------------------------------+--------+-------------+ -| ``>rdb_bgsave_in_progress`` | string | | -+-------------------------------------+--------+-------------+ -| ``>loading`` | string | | -+-------------------------------------+--------+-------------+ -| ``>rdb_current_bgsave_time_sec`` | string | | -+-------------------------------------+--------+-------------+ -| ``>aof_enabled`` | string | | -+-------------------------------------+--------+-------------+ -| ``>rdb_last_bgsave_time_sec`` | string | | -+-------------------------------------+--------+-------------+ -| ``>aof_last_rewrite_time_sec`` | string | | -+-------------------------------------+--------+-------------+ -| ``>aof_last_write_status`` | string | | -+-------------------------------------+--------+-------------+ -| ``>rdb_last_bgsave_status`` | string | | -+-------------------------------------+--------+-------------+ -| ``>aof_last_bgrewrite_status`` | string | | -+-------------------------------------+--------+-------------+ -| ``>aof_current_rewrite_time_sec`` | string | | -+-------------------------------------+--------+-------------+ -| ``>aof_rewrite_scheduled`` | string | | -+-------------------------------------+--------+-------------+ -| ``>aof_rewrite_in_progress`` | string | | -+-------------------------------------+--------+-------------+ -| ``>rdb_last_save_time`` | string | | -+-------------------------------------+--------+-------------+ -| ``>rdb_changes_since_last_save`` | string | | -+-------------------------------------+--------+-------------+ -| ``slowlen`` | int | | -+-------------------------------------+--------+-------------+ -| ``CPU`` | hash | | -+-------------------------------------+--------+-------------+ -| ``>used_cpu_user`` | string | | -+-------------------------------------+--------+-------------+ -| ``>used_cpu_sys`` | string | | -+-------------------------------------+--------+-------------+ -| ``>used_cpu_user_children`` | string | | -+-------------------------------------+--------+-------------+ -| ``>used_cpu_sys_children`` | string | | -+-------------------------------------+--------+-------------+ -| ``Memory`` | string | | -+-------------------------------------+--------+-------------+ -| ``>used_memory_lua`` | string | | -+-------------------------------------+--------+-------------+ -| ``>mem_allocator`` | string | | -+-------------------------------------+--------+-------------+ -| ``>used_memory_human`` | string | | -+-------------------------------------+--------+-------------+ -| ``>used_memory_peak_human`` | string | | -+-------------------------------------+--------+-------------+ -| ``>used_memory_peak`` | string | | -+-------------------------------------+--------+-------------+ -| ``>used_memory_rss`` | string | | -+-------------------------------------+--------+-------------+ -| ``>mem_fragmentation_ratio`` | string | | -+-------------------------------------+--------+-------------+ -| ``>used_memory`` | string | | -+-------------------------------------+--------+-------------+ -| ``Replication`` | hash | | -+-------------------------------------+--------+-------------+ -| ``>repl_backlog_first_byte_offset`` | string | | -+-------------------------------------+--------+-------------+ -| ``>repl_backlog_active`` | string | | -+-------------------------------------+--------+-------------+ -| ``>repl_backlog_histlen`` | string | | -+-------------------------------------+--------+-------------+ -| ``>repl_backlog_size`` | string | | -+-------------------------------------+--------+-------------+ -| ``>role`` | string | | -+-------------------------------------+--------+-------------+ -| ``>master_repl_offset`` | string | | -+-------------------------------------+--------+-------------+ -| ``>connected_slaves`` | string | | -+-------------------------------------+--------+-------------+ -| ``Clients`` | hash | | -+-------------------------------------+--------+-------------+ -| ``>client_biggest_input_buf`` | string | | -+-------------------------------------+--------+-------------+ -| ``>client_longest_output_list`` | string | | -+-------------------------------------+--------+-------------+ -| ``>blocked_clients`` | string | | -+-------------------------------------+--------+-------------+ -| ``>connected_clients`` | string | | -+-------------------------------------+--------+-------------+ -| ``Stats`` | hash | | -+-------------------------------------+--------+-------------+ -| ``>latest_fork_usec`` | string | | -+-------------------------------------+--------+-------------+ -| ``>rejected_connections`` | string | | -+-------------------------------------+--------+-------------+ -| ``>sync_partial_ok`` | string | | -+-------------------------------------+--------+-------------+ -| ``>pubsub_channels`` | string | | -+-------------------------------------+--------+-------------+ -| ``>instantaneous_ops_per_sec`` | string | | -+-------------------------------------+--------+-------------+ -| ``>total_connections_received`` | string | | -+-------------------------------------+--------+-------------+ -| ``>pubsub_patterns`` | string | | -+-------------------------------------+--------+-------------+ -| ``>sync_full`` | string | | -+-------------------------------------+--------+-------------+ -| ``>keyspace_hits`` | string | | -+-------------------------------------+--------+-------------+ -| ``>keyspace_misses`` | string | | -+-------------------------------------+--------+-------------+ -| ``>total_commands_processed`` | string | | -+-------------------------------------+--------+-------------+ -| ``>expired_keys`` | string | | -+-------------------------------------+--------+-------------+ -| ``>sync_partial_err`` | string | | -+-------------------------------------+--------+-------------+ - -**Response Example** -:: - - { - "Server": { - "redis_build_id": "606641459177bc09", - "config_file": "\/etc\/redis\/redis.conf", - "uptime_in_seconds": "1113787", - "hz": "10", - "os": "Linux 2.6.32-220.el6.x86_64 x86_64", - "redis_git_sha1": "00000000", - "redis_version": "2.8.15", - "process_id": "14607", - "tcp_port": "6379", - "redis_git_dirty": "0", - "redis_mode": "standalone", - "run_id": "43c5d003453b96e38ad3eae54026d8e1b078a7fd", - "uptime_in_days": "12", - "gcc_version": "4.4.6", - "arch_bits": "64", - "lru_clock": "16050046", - "multiplexing_api": "epoll" - }, - "Keyspace": { - "db0": "keys=26319,expires=0,avg_ttl=0" - }, - "slowlog": [ - [ - "32656", - "1425336191", - "18539", - [ - "keys", - "*" - ] - ] - ], - "Persistence": { - "rdb_bgsave_in_progress": "0", - "loading": "0", - "rdb_current_bgsave_time_sec": "-1", - "aof_enabled": "0", - "rdb_last_bgsave_time_sec": "-1", - "aof_last_rewrite_time_sec": "-1", - "aof_last_write_status": "ok", - "rdb_last_bgsave_status": "ok", - "aof_last_bgrewrite_status": "ok", - "aof_current_rewrite_time_sec": "-1", - "aof_rewrite_scheduled": "0", - "aof_rewrite_in_progress": "0", - "rdb_last_save_time": "1424222403", - "rdb_changes_since_last_save": "2595831724" - }, - "slowlen": 128, - "CPU": { - "used_cpu_user": "45252.98", - "used_cpu_sys": "154718.84", - "used_cpu_user_children": "0.00", - "used_cpu_sys_children": "0.00" - }, - "Memory": { - "used_memory_lua": "33792", - "mem_allocator": "jemalloc-3.6.0", - "used_memory_human": "5.25G", - "used_memory_peak_human": "8.08G", - "used_memory_peak": "8675798632", - "used_memory_rss": "8870088704", - "mem_fragmentation_ratio": "1.57", - "used_memory": "5633381640" - }, - "Replication": { - "repl_backlog_first_byte_offset": "0", - "repl_backlog_active": "0", - "repl_backlog_histlen": "0", - "repl_backlog_size": "1048576", - "role": "master", - "master_repl_offset": "0", - "connected_slaves": "0" - }, - "Clients": { - "client_biggest_input_buf": "0", - "client_longest_output_list": "0", - "blocked_clients": "0", - "connected_clients": "16" - }, - "Stats": { - "latest_fork_usec": "0", - "rejected_connections": "0", - "sync_partial_ok": "0", - "pubsub_channels": "0", - "instantaneous_ops_per_sec": "2238", - "total_connections_received": "2502657", - "evicted_keys": "0", - "pubsub_patterns": "0", - "sync_full": "0", - "keyspace_hits": "49388626", - "keyspace_misses": "780", - "total_commands_processed": "2645272238", - "expired_keys": "0", - "sync_partial_err": "0" - } - } - -| - -**GET /api/1.1/redis/match/#match/start_date/:start_date/end_date/:end_date/interval/:interval.json** - -Authentication Required: Yes - -Role(s) Required: None - -**Request Route Parameters** - -+--------------------------+--------+--------------------------------------------+ -| Parameter | Type | Description | -+==========================+========+============================================+ -|``start_date`` | string | | -+--------------------------+--------+--------------------------------------------+ -|``end_date`` | string | | -+--------------------------+--------+--------------------------------------------+ -|``interval`` | string | | -+--------------------------+--------+--------------------------------------------+ - -**Response Properties** - -+-------------+--------+-------------+ -| Parameter | Type | Description | -+=============+========+=============+ -| ``alerts`` | array | | -+-------------+--------+-------------+ -| ``>level`` | string | | -+-------------+--------+-------------+ -| ``>text`` | string | | -+-------------+--------+-------------+ -| ``version`` | string | | -+-------------+--------+-------------+ - -**Response Example** - -TBD - - -
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/42d25dc5/docs/latest/_sources/development/traffic_ops_api/v12/ConfigFiles-ApacheTrafficServer.txt ---------------------------------------------------------------------- diff --git a/docs/latest/_sources/development/traffic_ops_api/v12/ConfigFiles-ApacheTrafficServer.txt b/docs/latest/_sources/development/traffic_ops_api/v12/ConfigFiles-ApacheTrafficServer.txt new file mode 100644 index 0000000..3a6d109 --- /dev/null +++ b/docs/latest/_sources/development/traffic_ops_api/v12/ConfigFiles-ApacheTrafficServer.txt @@ -0,0 +1,212 @@ +.. +.. +.. 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-v12-configfiles: + +Config Files and Config File Metadata +=== + +.. _to-api-v12-configfiles-route: + +/api/1.2/servers/:hostname/configfiles/ats +/api/1.2/servers/:host_id/configfiles/ats ++++++++++++++ + +**GET /api/1.2/servers/:hostname/configfiles/ats** +**GET /api/1.2/servers/:host_id/configfiles/ats** + + + Authentication Required: Yes + + Role(s) Required: Operator + + **Request Query Parameters** + + **Response Properties** + + +======================================================================================================+ + | Info Section | + +-------------------+--------+-------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===================+========+=========================================================================+ + | ``profileId`` | string | The ID of the profile assigned to the cache. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``profileName`` | string | The name of the profile assigned to the cache. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``toRevProxyUrl`` | string | The configured reverse proxy cache for configfile requests. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``toURL`` | string | The configured URL for Traffic Ops. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``serverIpv4`` | string | The configured IP address of the cache. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``serverName`` | string | The cache's short form hostname. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``serverId`` | string | The cache's Traffic Ops ID. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``cdnId`` | string | The ID of the cache's assigned CDN. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``cdnName`` | string | The name of the cache's assigned CDN. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``serverTcpPort`` | string | The configured port of the server's used by ATS. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``serverTcpPort`` | string | The configured port of the server's used by ATS. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``serverTcpPort`` | string | The configured port of the server's used by ATS. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``serverTcpPort`` | string | The configured port of the server's used by ATS. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``serverTcpPort`` | string | The configured port of the server's used by ATS. | + +======================================================================================================+ + | configFiles Section | + +-------------------+--------+-------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===================+========+=========================================================================+ + | ``fnameOnDisk`` | string | The filename of the configuration file as stored on the cache. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``location`` | string | The directory location of the configuration file as stored on the cache.| + +-------------------+--------+-------------------------------------------------------------------------+ + | ``apiUri`` | string | The path to generate the configuration file from Traffic Ops. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``scope`` | string | The scope of the configuration file. | + +-------------------+--------+-------------------------------------------------------------------------+ + + + **Response Example** :: + + { + "info": { + "profileId": 278, + "toRevProxyUrl": "https://to.example.com:81", + "toUrl": "https://to.example.com/", + "serverIpv4": "192.168.1.5", + "serverTcpPort": 80, + "serverName": "cache-ats-01", + "cdnId": 1, + "cdnName": "CDN_1", + "serverId": 21, + "profileName": "EDGE_CDN_1_EXAMPLE" + }, + "configFiles": [ + { + "fnameOnDisk": "remap.config", + "location": "/opt/trafficserver/etc/trafficserver", + "apiUri": "/api/1.2/profiles/EDGE_CDN_1_EXAMPLE/configfiles/ats/remap.config", + "scope": "profiles" + }, + { + "fnameOnDisk": "ssl_multicert.config", + "location": "/opt/trafficserver/etc/trafficserver", + "apiUri": "/api/1.2/cdns/CDN_1/configfiles/ats/ssl_multicert.config", + "scope": "cdns" + }, + { + "fnameOnDisk": "parent.config", + "location": "/opt/trafficserver/etc/trafficserver", + "apiUri": "/api/1.2/servers/cache-ats-01/configfiles/ats/parent.config" + } + ] + } + + +/api/1.2/servers/:hostname/configfiles/ats/:configfile +/api/1.2/servers/:host_id/configfiles/ats/:configfile ++++++++++++++ + +**GET /api/1.2/servers/:hostname/configfiles/ats/:configfile** +**GET /api/1.2/servers/:host_id/configfiles/ats/:configfile** + + + Authentication Required: Yes + + Role(s) Required: Operator + + **Request Query Parameters** + + **Response Properties** + + Returns the requested configuration file for download. If scope used is incorrect for the config file requested, returns a 404 with the correct scope. + + **Response Example** :: + + { + "alerts": [ + { + "level": "error", + "text": "Error - incorrect file scope for route used. Please use the profiles route." + } + ] + } + + +/api/1.2/profiles/:profile_name/configfiles/ats/:configfile +/api/1.2/profiles/:profile_id/configfiles/ats/:configfile ++++++++++++++ + +**GET /api/1.2/profiles/:profile_name/configfiles/ats/:configfile** +**GET /api/1.2/profiles/:profile_id/configfiles/ats/:configfile** + + + Authentication Required: Yes + + Role(s) Required: Operator + + **Request Query Parameters** + + **Response Properties** + + Returns the requested configuration file for download. If scope used is incorrect for the config file requested, returns a 404 with the correct scope. + + **Response Example** :: + + { + "alerts": [ + { + "level": "error", + "text": "Error - incorrect file scope for route used. Please use the cdns route." + } + ] + } + + +/api/1.2/cdns/:cdn_name/configfiles/ats/:configfile +/api/1.2/cdns/:cdn_id/configfiles/ats/:configfile ++++++++++++++ + +**GET /api/1.2/cdns/:cdn_name/configfiles/ats/:configfile** +**GET /api/1.2/cdns/:cdn_id/configfiles/ats/:configfile** + + + Authentication Required: Yes + + Role(s) Required: Operator + + **Request Query Parameters** + + **Response Properties** + + Returns the requested configuration file for download. If scope used is incorrect for the config file requested, returns a 404 with the correct scope. + + **Response Example** :: + + { + "alerts": [ + { + "level": "error", + "text": "Error - incorrect file scope for route used. Please use the servers route." + } + ] + } + http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/42d25dc5/docs/latest/_sources/development/traffic_ops_api/v12/api_capability.txt ---------------------------------------------------------------------- diff --git a/docs/latest/_sources/development/traffic_ops_api/v12/api_capability.txt b/docs/latest/_sources/development/traffic_ops_api/v12/api_capability.txt new file mode 100644 index 0000000..794dd4f --- /dev/null +++ b/docs/latest/_sources/development/traffic_ops_api/v12/api_capability.txt @@ -0,0 +1,320 @@ +.. +.. +.. 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-v12-api_capability: + +API-Capabilities +================ + +.. _to-api-v12-api-capability-route: + +/api/1.2/api_capabilities ++++++++++++++++++++++++++ + +**GET /api/1.2/api_capabilities** + + Get all API-capability mappings. + + Authentication Required: Yes + + Role(s) Required: None + + **Query Parameters** + + +----------------+----------+--------+------------------------------------+ + | Name | Required | Type | Description | + +================+==========+========+====================================+ + | ``capability`` | no | string | Capability name. | + +----------------+----------+--------+------------------------------------+ + + **Response Properties** + + +-------------------+--------+--------------------------------------------------+ + | Parameter | Type | Description | + +===================+========+==================================================+ + | ``id`` | int | Mapping id. | + +-------------------+--------+--------------------------------------------------+ + | ``httpMethod`` | enum | One of: 'GET', 'POST', 'PUT', 'PATCH', 'DELETE'. | + +-------------------+--------+--------------------------------------------------+ + | ``route`` | string | API route. | + +-------------------+--------+--------------------------------------------------+ + | ``capability`` | string | Capability name. | + +-------------------+--------+--------------------------------------------------+ + | ``lastUpdated`` | string | | + +-------------------+--------+--------------------------------------------------+ + + **Response Example** :: + + { + "response": [ + { + "id": "6", + "httpMethod": "GET", + "route": "/api/*/asns", + "capability": "asn-read", + "lastUpdated": "2017-04-02 08:22:43" + }, + { + "id": "7", + "httpMethod": "GET", + "route": "/api/*/asns/*", + "capability": "asn-read", + "lastUpdated": "2017-04-02 08:22:43" + } + ] + } + +| + +**GET /api/1.2/api_capabilities/:id** + + Get an API-capability mapping by id. + + Authentication Required: Yes + + Role(s) Required: None + + **Request Route Parameters** + + +-------------+----------+-------+-------------------------------------+ + | Name | Required | Type | Description | + +=============+==========+=======+=====================================+ + | ``id`` | yes | int | Mapping id. | + +-------------+----------+-------+-------------------------------------+ + + **Response Properties** + + +-------------------+--------+--------------------------------------------------+ + | Parameter | Type | Description | + +===================+========+==================================================+ + | ``id`` | int | Mapping id. | + +-------------------+--------+--------------------------------------------------+ + | ``httpMethod`` | enum | One of: 'GET', 'POST', 'PUT', 'PATCH', 'DELETE'. | + +-------------------+--------+--------------------------------------------------+ + | ``route`` | string | API route. | + +-------------------+--------+--------------------------------------------------+ + | ``capability`` | string | Capability name. | + +-------------------+--------+--------------------------------------------------+ + | ``lastUpdated`` | string | | + +-------------------+--------+--------------------------------------------------+ + + **Response Example** :: + + { + "response": [ + { + "id": "6", + "httpMethod": "GET", + "route": "/api/*/asns", + "capability": "asn-read", + "lastUpdated": "2017-04-02 08:22:43" + } + ] + } + +| + +**POST /api/1.2/api_capabilities** + + Create an API-capability mapping. + + Authentication Required: Yes + + Role(s) Required: admin or oper + + **Request Properties** + + +----------------+----------+--------+--------------------------------------------------+ + | Name | Required | Type | Description | + +================+==========+========+==================================================+ + | ``httpMethod`` | yes | enum | One of: 'GET', 'POST', 'PUT', 'PATCH', 'DELETE'. | + +----------------+----------+--------+--------------------------------------------------+ + | ``route`` | yes | string | API route. | + +----------------+----------+--------+--------------------------------------------------+ + | ``capability`` | yes | string | Capability name | + +----------------+----------+--------+--------------------------------------------------+ + + **Request Example** :: + + { + "httpMethod": "POST", + "route": "/api/*/cdns", + "capability": "cdn-write" + } + + **Response Properties** + + +--------------------+--------+--------------------------------------------------+ + | Parameter | Type | Description | + +====================+========+==================================================+ + | ``response`` | hash | The details of the creation, if success. | + +--------------------+--------+--------------------------------------------------+ + | ``>id`` | int | Mapping id. | + +--------------------+--------+--------------------------------------------------+ + | ``>httpMethod`` | enum | One of: 'GET', 'POST', 'PUT', 'PATCH', 'DELETE'. | + +--------------------+--------+--------------------------------------------------+ + | ``>route`` | string | API route. | + +--------------------+--------+--------------------------------------------------+ + | ``>capability`` | string | Capability name | + +--------------------+--------+--------------------------------------------------+ + | ``>lastUpdated`` | string | | + +--------------------+--------+--------------------------------------------------+ + | ``alerts`` | array | A collection of alert messages. | + +--------------------+--------+--------------------------------------------------+ + | ``>level`` | string | Success, info, warning or error. | + +--------------------+--------+--------------------------------------------------+ + | ``>text`` | string | Alert message. | + +--------------------+--------+--------------------------------------------------+ + + + **Response Example** :: + + { + "response":{ + "id": "6", + "httpMethod": "POST", + "route": "/api/*/cdns", + "capability": "cdn-write", + "lastUpdated": "2017-04-02 08:22:43" + }, + "alerts":[ + { + "level": "success", + "text": "API-capability mapping was created." + } + ] + } + +| + +**PUT /api/1.2/api_capabilities/{:id}** + + Edit an API-capability mapping. + + Authentication Required: Yes + + Role(s) Required: admin or oper + + **Request Route Parameters** + + +-------------------+----------+--------+---------------------------------------+ + | Name | Required | Type | Description | + +===================+==========+========+=======================================+ + | ``id`` | yes | string | Mapping id. | + +-------------------+----------+--------+---------------------------------------+ + + **Request Properties** + + +-------------------+--------+--------------------------------------------------+ + | Parameter | Type | Description | + +===================+========+==================================================+ + | ``httpMethod`` | enum | One of: 'GET', 'POST', 'PUT', 'PATCH', 'DELETE'. | + +-------------------+--------+--------------------------------------------------+ + | ``route`` | string | API route. | + +-------------------+--------+--------------------------------------------------+ + | ``capability`` | string | Capability name | + +-------------------+--------+--------------------------------------------------+ + + + **Request Example** :: + + { + "httpMethod": "GET", + "route": "/api/*/cdns", + "capability": "cdn-read" + } + + **Response Properties** + + +--------------------+--------+--------------------------------------------------+ + | Parameter | Type | Description | + +====================+========+==================================================+ + | ``response`` | hash | The details of the creation, if success. | + +--------------------+--------+--------------------------------------------------+ + | ``>id`` | int | Mapping id. | + +--------------------+--------+--------------------------------------------------+ + | ``>httpMethod`` | enum | One of: 'GET', 'POST', 'PUT', 'PATCH', 'DELETE'. | + +--------------------+--------+--------------------------------------------------+ + | ``>route`` | string | API route. | + +--------------------+--------+--------------------------------------------------+ + | ``>capability`` | string | Capability name | + +--------------------+--------+--------------------------------------------------+ + | ``>lastUpdated`` | string | | + +--------------------+--------+--------------------------------------------------+ + | ``alerts`` | array | A collection of alert messages. | + +--------------------+--------+--------------------------------------------------+ + | ``>level`` | string | Success, info, warning or error. | + +--------------------+--------+--------------------------------------------------+ + | ``>text`` | string | Alert message. | + +--------------------+--------+--------------------------------------------------+ + + **Response Example** :: + + { + "response":{ + "id": "6", + "httpMethod": "GET", + "route": "/api/*/cdns", + "capability": "cdn-read", + "lastUpdated": "2017-04-02 08:22:43" + }, + "alerts":[ + { + "level": "success", + "text": "API-capability mapping was updated." + } + ] + } + +| + +**DELETE /api/1.2/api_capabilities/{:id}** + + Delete a capability. + + Authentication Required: Yes + + Role(s) Required: admin or oper + + **Request Route Parameters** + + +-------------------+----------+--------+---------------------------------------+ + | Name | Required | Type | Description | + +===================+==========+========+=======================================+ + | ``id`` | yes | string | Mapping id. | + +-------------------+----------+--------+---------------------------------------+ + + **Response Properties** + + +-----------------+----------+------------------------------------------------+ + | Parameter | Type | Description | + +=================+==========+================================================+ + | ``alerts`` | array | A collection of alert messages. | + +-----------------+----------+------------------------------------------------+ + | ``>level`` | string | success, info, warning or error. | + +-----------------+----------+------------------------------------------------+ + | ``>text`` | string | Alert message. | + +-----------------+----------+------------------------------------------------+ + + **Response Example** :: + + { + "alerts": [ + { + "level": "success", + "text": "API-capability mapping deleted." + } + ], + } http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/42d25dc5/docs/latest/_sources/development/traffic_ops_api/v12/cachegroup.txt ---------------------------------------------------------------------- diff --git a/docs/latest/_sources/development/traffic_ops_api/v12/cachegroup.txt b/docs/latest/_sources/development/traffic_ops_api/v12/cachegroup.txt index 391c278..1831f49 100644 --- a/docs/latest/_sources/development/traffic_ops_api/v12/cachegroup.txt +++ b/docs/latest/_sources/development/traffic_ops_api/v12/cachegroup.txt @@ -234,6 +234,61 @@ Cache Group | +**GET /api/1.2/cachegroups/:id/unassigned_parameters** + + Retrieves all parameters NOT assigned to the cache group. + + Authentication Required: Yes + + Role(s) Required: None + + **Request Route Parameters** + + +------------------+----------+-----------------------+ + | Name | Required | Description | + +==================+==========+=======================+ + | ``id`` | yes | Cache group id | + +------------------+----------+-----------------------+ + + **Response Properties** + + +------------------+---------+--------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +==================+=========+================================================================================+ + | ``last_updated`` | string | The Time / Date this server entry was last updated | + +------------------+---------+--------------------------------------------------------------------------------+ + | ``secure`` | boolean | When true, the parameter is accessible only by admin users. Defaults to false. | + +------------------+---------+--------------------------------------------------------------------------------+ + | ``value`` | string | The parameter value, only visible to admin if secure is true | + +------------------+---------+--------------------------------------------------------------------------------+ + | ``name`` | string | The parameter name | + +------------------+---------+--------------------------------------------------------------------------------+ + | ``config_file`` | string | The parameter config_file | + +------------------+---------+--------------------------------------------------------------------------------+ + + **Response Example** :: + + { + "response": [ + { + "last_updated": "2012-09-17 21:41:22", + "secure": false, + "value": "0,1,2,3,4,5,6", + "name": "Drive_Letters", + "config_file": "storage.config" + }, + { + "last_updated": "2012-09-17 21:41:22", + "secure": true, + "value": "STRING __HOSTNAME__", + "name": "CONFIG proxy.config.proxy_name", + "config_file": "records.config" + } + ], + } + +| + **GET /api/1.2/cachegroup/:parameter_id/parameter** Authentication Required: Yes @@ -391,7 +446,7 @@ Cache Group +---------------------------------+----------+-------------------------------------------------------------------+ | ``secondaryParentCachegroup`` | no | Name of Secondary Parent Cache Group entry. | +---------------------------------+----------+-------------------------------------------------------------------+ - | ``typeName`` | yes | The type of Cache Group entry, "EDGE_LOC", "MID_LOC" or "ORG_LOC" | + | ``typeId`` | yes | The type of Cache Group entry, "EDGE_LOC", "MID_LOC" or "ORG_LOC" | +---------------------------------+----------+-------------------------------------------------------------------+ **Request Example** :: @@ -402,7 +457,7 @@ Cache Group "latitude": 12, "longitude": 45, "parentCachegroup": "cache_group_mid", - "typeName": "EDGE_LOC" + "typeId": 6 } **Response Properties** @@ -636,7 +691,9 @@ Cache Group +==============+=========+===============================================+ | action | string | queue or dequeue | +--------------+---------+-----------------------------------------------+ - | cdn | string | cdn name | + | cdn | string | cdn name or cdn ID is required | + +--------------+---------+-----------------------------------------------+ + | cdnId | string | cdn ID or cdn name is required | +--------------+---------+-----------------------------------------------+ **Response Properties** http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/42d25dc5/docs/latest/_sources/development/traffic_ops_api/v12/cachegroup_parameter.txt ---------------------------------------------------------------------- diff --git a/docs/latest/_sources/development/traffic_ops_api/v12/cachegroup_parameter.txt b/docs/latest/_sources/development/traffic_ops_api/v12/cachegroup_parameter.txt new file mode 100644 index 0000000..1872c51 --- /dev/null +++ b/docs/latest/_sources/development/traffic_ops_api/v12/cachegroup_parameter.txt @@ -0,0 +1,177 @@ +.. +.. +.. 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-v12-cachegroupparameters: + + +Cache Group parameters +====================== + +.. _to-api-v12-cachegroupparameters-route: + +/api/1.2/cachegroupparameters ++++++++++++++++++++++++++++++ + +**POST /api/1.2/cachegroupparameters** + + Assign parameter(s) to cache group(s). + + Authentication Required: Yes + + Role(s) Required: Admin or Operations + + **Request Properties** + + Two formats are acceptable. + + Single cachegroup-parameter format: + + +------------------+----------+----------------------------------------------------+ + | Parameter | Required | Description | + +==================+==========+====================================================+ + | ``cacheGroupId`` | yes | cache group id. | + +------------------+----------+----------------------------------------------------+ + | ``parameterId`` | yes | parameter id. | + +------------------+----------+----------------------------------------------------+ + + Profile-parameter array format: + + +-----------------------+----------+----------------------------------------------------+ + | Parameter | Required | Description | + +=======================+==========+====================================================+ + | | yes | cachegroup-parameter array. | + +-----------------------+----------+----------------------------------------------------+ + | ``>cacheGroupId`` | yes | cache group id. | + +-----------------------+----------+----------------------------------------------------+ + | ``>parameterId`` | yes | parameter id. | + +-----------------------+----------+----------------------------------------------------+ + + **Request Example** :: + + Single cachegroup-parameter format: + + { + "cacheGroupId": 2, + "parameterId": 6 + } + + Cachegroup-parameter array format: + + [ + { + "cacheGroupId": 2, + "parameterId": 6 + }, + { + "cacheGroupId": 2, + "parameterId": 7 + }, + { + "cacheGroupId": 3, + "parameterId": 6 + } + ] + + **Response Properties** + + +-------------------+---------+-----------------------------------------------------+ + | Parameter | Type | Description | + +===================+=========+=====================================================+ + | ``response`` | array | Cache group-parameter associations. | + +-------------------+---------+-----------------------------------------------------+ + | ``>cacheGroupId`` | string | Cache Group id. | + +-------------------+---------+-----------------------------------------------------+ + | ``>parameterId`` | string | Parameter id. | + +-------------------+---------+-----------------------------------------------------+ + | ``alerts`` | array | A collection of alert messages. | + +-------------------+---------+-----------------------------------------------------+ + | ``>level`` | string | success, info, warning or error. | + +-------------------+---------+-----------------------------------------------------+ + | ``>text`` | string | Alert message. | + +-------------------+---------+-----------------------------------------------------+ + | ``version`` | string | | + +-------------------+---------+-----------------------------------------------------+ + + **Response Example** :: + + { + "response":[ + { + "cacheGroupId": "2", + "parameterId": "6" + }, + { + "cacheGroupId": "2", + "parameterId": "7" + }, + { + "cacheGroupId": "3", + "parameterId": "6" + } + ] + "alerts":[ + { + "level": "success", + "text": "Cache group parameter associations were created." + } + ] + } + +| + +**DELETE /api/1.2/cachegroupparameters/{:cachegroup_id}/{:parameter_id}** + + Delete a cache group parameter association. + + Authentication Required: Yes + + Role(s) Required: Admin or Operations + + **Request Route Parameters** + + +------------------+----------+----------------------------------------------------+ + | Name | Required | Description | + +==================+==========+====================================================+ + | ``cachegroup_id``| yes | cache group id. | + +------------------+----------+----------------------------------------------------+ + | ``parameter_id`` | yes | parameter id. | + +------------------+----------+----------------------------------------------------+ + + **Response Properties** + + +-------------------+--------+-----------------------------------------------------+ + | Parameter | Type | Description | + +===================+========+=====================================================+ + | ``alerts`` | array | A collection of alert messages. | + +-------------------+--------+-----------------------------------------------------+ + | ``>level`` | string | success, info, warning or error. | + +-------------------+--------+-----------------------------------------------------+ + | ``>text`` | string | Alert message. | + +-------------------+--------+-----------------------------------------------------+ + | ``version`` | string | | + +-------------------+--------+-----------------------------------------------------+ + + **Response Example** :: + + { + "alerts":[ + { + "level": "success", + "text": "Cache group parameter association was deleted." + } + ] + } + +| http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/42d25dc5/docs/latest/_sources/development/traffic_ops_api/v12/capability.txt ---------------------------------------------------------------------- diff --git a/docs/latest/_sources/development/traffic_ops_api/v12/capability.txt b/docs/latest/_sources/development/traffic_ops_api/v12/capability.txt new file mode 100644 index 0000000..570a811 --- /dev/null +++ b/docs/latest/_sources/development/traffic_ops_api/v12/capability.txt @@ -0,0 +1,271 @@ +.. +.. +.. 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-v12-capability: + +Capabilities +============ + +.. _to-api-v12-capability-route: + +/api/1.2/capabilities ++++++++++++++++++++++ + +**GET /api/1.2/capabilities** + + Get all capabilities. + + Authentication Required: Yes + + Role(s) Required: None + + **Response Properties** + + +-------------------+--------+-------------------------------------------------+ + | Parameter | Type | Description | + +===================+========+=================================================+ + | ``name`` | string | Capability name. | + +-------------------+--------+-------------------------------------------------+ + | ``description`` | string | Describing the APIs covered by the capability. | + +-------------------+--------+-------------------------------------------------+ + | ``lastUpdated`` | string | | + +-------------------+--------+-------------------------------------------------+ + + **Response Example** :: + + { + "response": [ + { + "name": "cdn-read", + "description": "View CDN configuration", + "lastUpdated": "2017-04-02 08:22:43" + }, + { + "name": "cdn-write", + "description": "Create, edit or delete CDN configuration", + "lastUpdated": "2017-04-02 08:22:43" + } + ] + } + +| + +**GET /api/1.2/capabilities/:name** + + Get a capability by name. + + Authentication Required: Yes + + Role(s) Required: None + + **Request Route Parameters** + + +-------------+----------+--------+------------------------------------+ + | Name | Required | Type | Description | + +=============+==========+========+====================================+ + | ``name`` | yes | string | Capability name. | + +-------------+----------+--------+------------------------------------+ + + **Response Properties** + + +-------------------+--------+-------------------------------------------------+ + | Parameter | Type | Description | + +===================+========+=================================================+ + | ``name`` | string | Capability name. | + +-------------------+--------+-------------------------------------------------+ + | ``description`` | string | Describing the APIs covered by the capability. | + +-------------------+--------+-------------------------------------------------+ + | ``lastUpdated`` | string | | + +-------------------+--------+-------------------------------------------------+ + + **Response Example** :: + + { + "response": [ + { + "name": "cdn-read", + "description": "View CDN configuration", + "lastUpdated": "2017-04-02 08:22:43" + } + ] + } + +| + +**POST /api/1.2/capabilities** + + Create a capability. + + Authentication Required: Yes + + Role(s) Required: admin or oper + + **Request Parameters** + + +-----------------+----------+--------+-------------------------------------------------+ + | Name | Required | Type | Description | + +=================+==========+========+=================================================+ + | ``name`` | yes | string | Capability name. | + +-----------------+----------+--------+-------------------------------------------------+ + | ``description`` | yes | string | Describing the APIs covered by the capability. | + +-----------------+----------+--------+-------------------------------------------------+ + + **Request Example** :: + + { + "name": "cdn-write", + "description": "Create, edit or delete CDN configuration" + } + + **Response Properties** + + +--------------------+--------+-------------------------------------------------+ + | Parameter | Type | Description | + +====================+========+=================================================+ + | ``response`` | hash | The details of the creation, if success. | + +--------------------+--------+-------------------------------------------------+ + | ``>name`` | string | Capability name. | + +--------------------+--------+-------------------------------------------------+ + | ``>description`` | string | Describing the APIs covered by the capability. | + +--------------------+--------+-------------------------------------------------+ + | ``alerts`` | array | A collection of alert messages. | + +--------------------+--------+-------------------------------------------------+ + | ``>level`` | string | Success, info, warning or error. | + +--------------------+--------+-------------------------------------------------+ + | ``>text`` | string | Alert message. | + +--------------------+--------+-------------------------------------------------+ + + + **Response Example** :: + + { + "response":{ + "name": "cdn-write", + "description": "Create, edit or delete CDN configuration" + }, + "alerts":[ + { + "level": "success", + "text": "Capability was created." + } + ] + } + +| + +**PUT /api/1.2/capabilities/{:name}** + + Edit a capability. + + Authentication Required: Yes + + Role(s) Required: admin or oper + + **Request Route Parameters** + + +-------------------+----------+------------------------------------------------+ + | Name | Type | Description | + +===================+==========+================================================+ + | ``name`` | int | Capability name. | + +-------------------+----------+------------------------------------------------+ + + **Request Properties** + + +-------------------+--------+-------------------------------------------------+ + | Parameter | Type | Description | + +===================+========+=================================================+ + | ``description`` | string | Describing the APIs covered by the capability. | + +-------------------+--------+-------------------------------------------------+ + + + **Request Example** :: + + { + "description": "View CDN configuration" + } + + **Response Properties** + + +--------------------+--------+-------------------------------------------------+ + | Parameter | Type | Description | + +====================+========+=================================================+ + | ``response`` | hash | The details of the update, if success. | + +--------------------+--------+-------------------------------------------------+ + | ``>name`` | string | Capability name. | + +--------------------+--------+-------------------------------------------------+ + | ``>description`` | int | Describing the APIs covered by the capability. | + +--------------------+--------+-------------------------------------------------+ + | ``alerts`` | array | A collection of alert messages. | + +--------------------+--------+-------------------------------------------------+ + | ``>level`` | string | Success, info, warning or error. | + +--------------------+--------+-------------------------------------------------+ + | ``>text`` | string | Alert message. | + +--------------------+--------+-------------------------------------------------+ + + **Response Example** :: + + { + "response":{ + "name": "cdn-read", + "description": "View CDN configuration" + }, + "alerts":[ + { + "level": "success", + "text": "Capability was updated." + } + ] + } + +| + +**DELETE /api/1.2/capabilities/{:name}** + + Delete a capability. + + Authentication Required: Yes + + Role(s) Required: admin or oper + + **Request Route Parameters** + + +-----------------+----------+------------------------------------------------+ + | Name | Required | Description | + +=================+==========+================================================+ + | ``name`` | yes | Capability name. | + +-----------------+----------+------------------------------------------------+ + + **Response Properties** + + +-----------------+----------+------------------------------------------------+ + | Parameter | Type | Description | + +=================+==========+================================================+ + | ``alerts`` | array | A collection of alert messages. | + +-----------------+----------+------------------------------------------------+ + | ``>level`` | string | success, info, warning or error. | + +-----------------+----------+------------------------------------------------+ + | ``>text`` | string | Alert message. | + +-----------------+----------+------------------------------------------------+ + + **Response Example** :: + + { + "alerts": [ + { + "level": "success", + "text": "Capability deleted." + } + ], + } http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/42d25dc5/docs/latest/_sources/development/traffic_ops_api/v12/cdn.txt ---------------------------------------------------------------------- diff --git a/docs/latest/_sources/development/traffic_ops_api/v12/cdn.txt b/docs/latest/_sources/development/traffic_ops_api/v12/cdn.txt index d7e3c3c..650b0a9 100644 --- a/docs/latest/_sources/development/traffic_ops_api/v12/cdn.txt +++ b/docs/latest/_sources/development/traffic_ops_api/v12/cdn.txt @@ -38,6 +38,8 @@ CDN +-------------------+--------+-------------------------------------------------+ | ``name`` | string | CDN name. | +-------------------+--------+-------------------------------------------------+ + | ``domainName`` | string | TLD of the CDN. | + +-------------------+--------+-------------------------------------------------+ | ``dnssecEnabled`` | bool | DNSSEC enabled. | +-------------------+--------+-------------------------------------------------+ | ``lastUpdated`` | string | | @@ -49,13 +51,15 @@ CDN "response": [ { "id": "1" - "name": "over-the-top", + "name": "cdn1", + "domainName": "cdn1.foo.com", "dnssecEnabled": false, "lastUpdated": "2014-10-02 08:22:43" }, { "id": "2" "name": "cdn2", + "domainName": "cdn2.foo.com", "dnssecEnabled": true, "lastUpdated": "2014-10-02 08:22:43" } @@ -87,6 +91,8 @@ CDN +-------------------+--------+-------------------------------------------------+ | ``name`` | string | CDN name. | +-------------------+--------+-------------------------------------------------+ + | ``domainName`` | string | TLD of the CDN. | + +-------------------+--------+-------------------------------------------------+ | ``dnssecEnabled`` | bool | DNSSEC enabled. | +-------------------+--------+-------------------------------------------------+ | ``lastUpdated`` | string | | @@ -99,6 +105,7 @@ CDN { "id": "2" "name": "cdn2", + "domainName": "cdn2.foo.com", "dnssecEnabled": false, "lastUpdated": "2014-10-02 08:22:43" } @@ -130,6 +137,8 @@ CDN +-------------------+--------+-------------------------------------------------+ | ``name`` | string | CDN name. | +-------------------+--------+-------------------------------------------------+ + | ``domainName`` | string | TLD of the CDN. | + +-------------------+--------+-------------------------------------------------+ | ``dnssecEnabled`` | bool | DNSSEC enabled. | +-------------------+--------+-------------------------------------------------+ | ``lastUpdated`` | string | | @@ -142,6 +151,7 @@ CDN { "id": "2" "name": "cdn2", + "domainName": "cdn2.foo.com", "dnssecEnabled": false, "lastUpdated": "2014-10-02 08:22:43" } @@ -165,16 +175,19 @@ CDN +===================+========+=================================================+ | ``name`` | string | CDN name. | +-------------------+--------+-------------------------------------------------+ - | ``dnssecEnabled`` | int | Whether dnssec is enabled. | - | | | - 0: disabled | - | | | - 1: enabled | + | ``domainName`` | string | TLD of the CDN. | + +-------------------+--------+-------------------------------------------------+ + | ``dnssecEnabled`` | bool | Whether dnssec is enabled. | + | | | - false: disabled | + | | | - true: enabled | +-------------------+--------+-------------------------------------------------+ **Request Example** :: { "name": "cdn_test", - "dnssecEnabled": 0 + "domainName": "cdn3.foo.com", + "dnssecEnabled": true } **Response Properties** @@ -184,12 +197,14 @@ CDN +====================+========+=================================================+ | ``response`` | hash | The details of the creation, if success. | +--------------------+--------+-------------------------------------------------+ - | ``>name`` | string | CDN name. | - +--------------------+--------+-------------------------------------------------+ | ``>id`` | int | CDN id. | +--------------------+--------+-------------------------------------------------+ + | ``>name`` | string | CDN name. | + +--------------------+--------+-------------------------------------------------+ | ``>dnssecEnabled`` | string | Whether dnssec is enabled. | +--------------------+--------+-------------------------------------------------+ + | ``>domainName`` | string | TLD of the CDN. | + +--------------------+--------+-------------------------------------------------+ | ``alerts`` | array | A collection of alert messages. | +--------------------+--------+-------------------------------------------------+ | ``>level`` | string | Success, info, warning or error. | @@ -202,9 +217,10 @@ CDN { "response":{ - "name": "cdn_test", "id": 3 - "dnssecEnabled": 0 + "name": "cdn_test", + "domainName": "cdn3.foo.com", + "dnssecEnabled": true }, "alerts":[ { @@ -239,9 +255,11 @@ CDN +===================+========+=================================================+ | ``name`` | string | CDN name. | +-------------------+--------+-------------------------------------------------+ - | ``dnssecEnabled`` | int | Whether dnssec is enabled. | - | | | - 0: disabled | - | | | - 1: enabled | + | ``domainName`` | string | TLD of the CDN. | + +-------------------+--------+-------------------------------------------------+ + | ``dnssecEnabled`` | bool | Whether dnssec is enabled. | + | | | - false: disabled | + | | | - true: enabled | +-------------------+--------+-------------------------------------------------+ @@ -249,7 +267,8 @@ CDN { "name": "cdn_test2", - "dnssecEnabled": 0 + "domainName": "cdn3.foo.com", + "dnssecEnabled": false } **Response Properties** @@ -263,7 +282,9 @@ CDN +--------------------+--------+-------------------------------------------------+ | ``>id`` | int | CDN id. | +--------------------+--------+-------------------------------------------------+ - | ``>dnssecEnabled`` | string | Whether dnssec is enabled. | + | ``>domainName`` | string | TLD of the CDN. | + +--------------------+--------+-------------------------------------------------+ + | ``>dnssecEnabled`` | bool | Whether dnssec is enabled. | +--------------------+--------+-------------------------------------------------+ | ``alerts`` | array | A collection of alert messages. | +--------------------+--------+-------------------------------------------------+ @@ -276,9 +297,10 @@ CDN { "response":{ + "id": 3, "name": "cdn_test2", - "id": 3 - "dnssecEnabled": 0 + "domainName": "cdn3.foo.com", + "dnssecEnabled": false }, "alerts":[ { @@ -331,6 +353,59 @@ CDN | +**POST /api/1.2/cdns/{:id}/queue_update** + + Queue or dequeue updates for all servers assigned to a specific CDN. + + Authentication Required: Yes + + Role(s) Required: admin or oper + + **Request Route Parameters** + + +-----------------+----------+----------------------+ + | Name | Required | Description | + +=================+==========+======================+ + | id | yes | the cdn id. | + +-----------------+----------+----------------------+ + + **Request Properties** + + +--------------+---------+-----------------------------------------------+ + | Name | Type | Description | + +==============+=========+===============================================+ + | action | string | queue or dequeue | + +--------------+---------+-----------------------------------------------+ + + **Request Example** :: + + { + "action": "queue" + } + + + **Response Properties** + + +-----------------+---------+----------------------------------------------------+ + | Name | Type | Description | + +=================+=========+====================================================+ + | action | string | The action processed, queue or dequeue. | + +-----------------+---------+----------------------------------------------------+ + | cdnId | integer | cdn id | + +-----------------+---------+----------------------------------------------------+ + + **Response Example** :: + + { + "response": { + "action": "queue", + "cdn": 1 + } + } + +| + + Health ++++++ http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/42d25dc5/docs/latest/_sources/development/traffic_ops_api/v12/changelog.txt ---------------------------------------------------------------------- diff --git a/docs/latest/_sources/development/traffic_ops_api/v12/changelog.txt b/docs/latest/_sources/development/traffic_ops_api/v12/changelog.txt index 5cedbe0..ff0d72d 100644 --- a/docs/latest/_sources/development/traffic_ops_api/v12/changelog.txt +++ b/docs/latest/_sources/development/traffic_ops_api/v12/changelog.txt @@ -24,12 +24,22 @@ Change Logs /api/1.2/logs +++++++++++++ -**GET /api/1.2/logs.json** +**GET /api/1.2/logs** Authentication Required: Yes Role(s) Required: None + **Request Query Parameters** + + +-----------------+----------+---------------------------------------------------+ + | Name | Required | Description | + +=================+==========+===================================================+ + | ``days`` | no | The number of days of change logs to return. | + +-----------------+----------+---------------------------------------------------+ + | ``limit`` | no | The number of rows to limit the response to. | + +-----------------+----------+---------------------------------------------------+ + **Response Properties** +-----------------+--------+--------------------------------------------------------------------------+ @@ -73,7 +83,7 @@ Change Logs | -**GET /api/1.2/logs/:days/days.json** +**GET /api/1.2/logs/:days/days** Authentication Required: Yes @@ -130,7 +140,7 @@ Change Logs | -**GET /api/1.2/logs/newcount.json** +**GET /api/1.2/logs/newcount** Authentication Required: Yes http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/42d25dc5/docs/latest/_sources/development/traffic_ops_api/v12/configfiles-ats.txt ---------------------------------------------------------------------- diff --git a/docs/latest/_sources/development/traffic_ops_api/v12/configfiles-ats.txt b/docs/latest/_sources/development/traffic_ops_api/v12/configfiles-ats.txt new file mode 100644 index 0000000..1697a5a --- /dev/null +++ b/docs/latest/_sources/development/traffic_ops_api/v12/configfiles-ats.txt @@ -0,0 +1,212 @@ +.. +.. +.. 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-v12-configfiles-ats: + +Config Files and Config File Metadata +=== + +.. _to-api-v12-configfiles-ats-route: + +/api/1.2/servers/:hostname/configfiles/ats +/api/1.2/servers/:host_id/configfiles/ats ++++++++++++++ + +**GET /api/1.2/servers/:hostname/configfiles/ats** +**GET /api/1.2/servers/:host_id/configfiles/ats** + + + Authentication Required: Yes + + Role(s) Required: Operator + + **Request Query Parameters** + + **Response Properties** + + +======================================================================================================+ + | Info Section | + +-------------------+--------+-------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===================+========+=========================================================================+ + | ``profileId`` | string | The ID of the profile assigned to the cache. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``profileName`` | string | The name of the profile assigned to the cache. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``toRevProxyUrl`` | string | The configured reverse proxy cache for configfile requests. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``toURL`` | string | The configured URL for Traffic Ops. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``serverIpv4`` | string | The configured IP address of the cache. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``serverName`` | string | The cache's short form hostname. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``serverId`` | string | The cache's Traffic Ops ID. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``cdnId`` | string | The ID of the cache's assigned CDN. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``cdnName`` | string | The name of the cache's assigned CDN. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``serverTcpPort`` | string | The configured port of the server's used by ATS. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``serverTcpPort`` | string | The configured port of the server's used by ATS. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``serverTcpPort`` | string | The configured port of the server's used by ATS. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``serverTcpPort`` | string | The configured port of the server's used by ATS. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``serverTcpPort`` | string | The configured port of the server's used by ATS. | + +======================================================================================================+ + | configFiles Section | + +-------------------+--------+-------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===================+========+=========================================================================+ + | ``fnameOnDisk`` | string | The filename of the configuration file as stored on the cache. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``location`` | string | The directory location of the configuration file as stored on the cache.| + +-------------------+--------+-------------------------------------------------------------------------+ + | ``apiUri`` | string | The path to generate the configuration file from Traffic Ops. | + +-------------------+--------+-------------------------------------------------------------------------+ + | ``scope`` | string | The scope of the configuration file. | + +-------------------+--------+-------------------------------------------------------------------------+ + + + **Response Example** :: + + { + "info": { + "profileId": 278, + "toRevProxyUrl": "https://to.example.com:81", + "toUrl": "https://to.example.com/", + "serverIpv4": "192.168.1.5", + "serverTcpPort": 80, + "serverName": "cache-ats-01", + "cdnId": 1, + "cdnName": "CDN_1", + "serverId": 21, + "profileName": "EDGE_CDN_1_EXAMPLE" + }, + "configFiles": [ + { + "fnameOnDisk": "remap.config", + "location": "/opt/trafficserver/etc/trafficserver", + "apiUri": "/api/1.2/profiles/EDGE_CDN_1_EXAMPLE/configfiles/ats/remap.config", + "scope": "profiles" + }, + { + "fnameOnDisk": "ssl_multicert.config", + "location": "/opt/trafficserver/etc/trafficserver", + "apiUri": "/api/1.2/cdns/CDN_1/configfiles/ats/ssl_multicert.config", + "scope": "cdns" + }, + { + "fnameOnDisk": "parent.config", + "location": "/opt/trafficserver/etc/trafficserver", + "apiUri": "/api/1.2/servers/cache-ats-01/configfiles/ats/parent.config" + } + ] + } + + +/api/1.2/servers/:hostname/configfiles/ats/:configfile +/api/1.2/servers/:host_id/configfiles/ats/:configfile ++++++++++++++ + +**GET /api/1.2/servers/:hostname/configfiles/ats/:configfile** +**GET /api/1.2/servers/:host_id/configfiles/ats/:configfile** + + + Authentication Required: Yes + + Role(s) Required: Operator + + **Request Query Parameters** + + **Response Properties** + + Returns the requested configuration file for download. If scope used is incorrect for the config file requested, returns a 404 with the correct scope. + + **Response Example** :: + + { + "alerts": [ + { + "level": "error", + "text": "Error - incorrect file scope for route used. Please use the profiles route." + } + ] + } + + +/api/1.2/profiles/:profile_name/configfiles/ats/:configfile +/api/1.2/profiles/:profile_id/configfiles/ats/:configfile ++++++++++++++ + +**GET /api/1.2/profiles/:profile_name/configfiles/ats/:configfile** +**GET /api/1.2/profiles/:profile_id/configfiles/ats/:configfile** + + + Authentication Required: Yes + + Role(s) Required: Operator + + **Request Query Parameters** + + **Response Properties** + + Returns the requested configuration file for download. If scope used is incorrect for the config file requested, returns a 404 with the correct scope. + + **Response Example** :: + + { + "alerts": [ + { + "level": "error", + "text": "Error - incorrect file scope for route used. Please use the cdns route." + } + ] + } + + +/api/1.2/cdns/:cdn_name/configfiles/ats/:configfile +/api/1.2/cdns/:cdn_id/configfiles/ats/:configfile ++++++++++++++ + +**GET /api/1.2/cdns/:cdn_name/configfiles/ats/:configfile** +**GET /api/1.2/cdns/:cdn_id/configfiles/ats/:configfile** + + + Authentication Required: Yes + + Role(s) Required: Operator + + **Request Query Parameters** + + **Response Properties** + + Returns the requested configuration file for download. If scope used is incorrect for the config file requested, returns a 404 with the correct scope. + + **Response Example** :: + + { + "alerts": [ + { + "level": "error", + "text": "Error - incorrect file scope for route used. Please use the servers route." + } + ] + } +