http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/8582b168/docs/1.1.2/_sources/development/traffic_ops_rest/redis.txt ---------------------------------------------------------------------- diff --git a/docs/1.1.2/_sources/development/traffic_ops_rest/redis.txt b/docs/1.1.2/_sources/development/traffic_ops_rest/redis.txt new file mode 100644 index 0000000..3f4b256 --- /dev/null +++ b/docs/1.1.2/_sources/development/traffic_ops_rest/redis.txt @@ -0,0 +1,472 @@ +.. +.. 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-redis: + +Redis +===== + +.. Note:: The redis documentation needs a thorough review! + + +**GET /api/1.1/traffic_monitor/stats.json** + +Authentication Required: Yes + +Response Content Type: application/json + +**Response Messages** + +:: + + + HTTP Status Code: 200 + Reason: Success + +**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" + ] + ], + "version": "1.1" + } + +| + +**GET /api/1.1/redis/stats.json** + +Authentication Required: Yes + +Response Content Type: application/json + +**Response Messages** + +:: + + + HTTP Status Code: 200 + Reason: Success + +**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 + +**Request Route Parameters** + ++--------------------------+--------+--------------------------------------------+ +| Parameter | Type | Description | ++==========================+========+============================================+ +|``host_name`` | string | | ++--------------------------+--------+--------------------------------------------+ + +**Request Example** + +Response Content Type: application/json + +**Response Messages** + +:: + + + HTTP Status Code: 200 + Reason: Success + +**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: + +**Request Route Parameters** + ++--------------------------+--------+--------------------------------------------+ +| Parameter | Type | Description | ++==========================+========+============================================+ +|``start_date`` | string | | ++--------------------------+--------+--------------------------------------------+ +|``end_date`` | string | | ++--------------------------+--------+--------------------------------------------+ +|``interval`` | string | | ++--------------------------+--------+--------------------------------------------+ + +**Request Example** + +Response Content Type: application/json + +**Response Messages** + +:: + + + HTTP Status Code: 200 + Reason: Success + +**Response Properties** + ++-------------+--------+-------------+ +| Parameter | Type | Description | ++=============+========+=============+ +| ``alerts`` | array | | ++-------------+--------+-------------+ +| ``>level`` | string | | ++-------------+--------+-------------+ +| ``>text`` | string | | ++-------------+--------+-------------+ +| ``version`` | string | | ++-------------+--------+-------------+ + +**Response Example** + + +
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/8582b168/docs/1.1.2/_sources/development/traffic_ops_rest/region.txt ---------------------------------------------------------------------- diff --git a/docs/1.1.2/_sources/development/traffic_ops_rest/region.txt b/docs/1.1.2/_sources/development/traffic_ops_rest/region.txt new file mode 100644 index 0000000..4f12075 --- /dev/null +++ b/docs/1.1.2/_sources/development/traffic_ops_rest/region.txt @@ -0,0 +1,53 @@ +.. +.. 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-region: + +Regions +======= + +**GET /api/1.1/regions.json** + + Authentication Required: + + Response Content Type: application/json + + **Response Properties** + + +----------------------+--------+------------------------------------------------+ + | Parameter | Type | Description | + +======================+========+================================================+ + |``name`` | string | | + +----------------------+--------+------------------------------------------------+ + |``id`` | string | | + +----------------------+--------+------------------------------------------------+ + + **Response Example** :: + + { + "response": [ + { + "name": "Atlanta", + "id": "6" + }, + { + "name": "Beltway", + "id": "1" + } + ], + "version": "1.1" + } + http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/8582b168/docs/1.1.2/_sources/development/traffic_ops_rest/role.txt ---------------------------------------------------------------------- diff --git a/docs/1.1.2/_sources/development/traffic_ops_rest/role.txt b/docs/1.1.2/_sources/development/traffic_ops_rest/role.txt new file mode 100644 index 0000000..c724737 --- /dev/null +++ b/docs/1.1.2/_sources/development/traffic_ops_rest/role.txt @@ -0,0 +1,53 @@ +.. +.. 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-roles: + +Roles +===== + +**GET /api/1.1/roles.json** + + Authentication Required: Yes + + **Response Properties** + + +----------------------+--------+------------------------------------------------+ + | Parameter | Type | Description | + +======================+========+================================================+ + |``name`` | string | | + +----------------------+--------+------------------------------------------------+ + |``id`` | string | | + +----------------------+--------+------------------------------------------------+ + |``privLevel`` | string | | + +----------------------+--------+------------------------------------------------+ + |``description`` | string | | + +----------------------+--------+------------------------------------------------+ + + **Response Example** :: + + { + "response": [ + { + "name": "read-only", + "id": "2", + "privLevel": "10", + "description": "read-only user" + } + ], + "version": "1.1" + } + http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/8582b168/docs/1.1.2/_sources/development/traffic_ops_rest/server.txt ---------------------------------------------------------------------- diff --git a/docs/1.1.2/_sources/development/traffic_ops_rest/server.txt b/docs/1.1.2/_sources/development/traffic_ops_rest/server.txt new file mode 100644 index 0000000..9734aab --- /dev/null +++ b/docs/1.1.2/_sources/development/traffic_ops_rest/server.txt @@ -0,0 +1,426 @@ +.. +.. 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-server: + +Server +====== +**GET /api/1.1/servers.json** + + Retrieves properties of CDN servers. + + Authentication Required: Yes + + **Response Properties** + + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +====================+========+============================================================================================================+ + | ``cachegroup`` | string | The cache group name (see :ref:`to-api-cachegroup`). | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``domainName`` | string | The domain name part of the FQDN of the cache. | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``hostName`` | string | The host name part of the cache. | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``id`` | string | The server id (database row number). | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``iloIpAddress`` | string | The IPv4 address of the lights-out-management port. | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``iloIpGateway`` | string | The IPv4 gateway address of the lights-out-management port. | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``iloIpNetmask`` | string | The IPv4 netmask of the lights-out-management port. | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``iloPassword`` | string | The password of the of the lights-out-management user (displays as ****** unless you are an 'admin' user). | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``iloUsername`` | string | The user name for lights-out-management. | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``interfaceMtu`` | string | The Maximum Transmission Unit (MTU) to configure for ``interfaceName``. | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``interfaceName`` | string | The network interface name used for serving traffic. | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``ip6Address`` | string | The IPv6 address/netmask for ``interfaceName``. | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``ip6Gateway`` | string | The IPv6 gateway for ``interfaceName``. | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``ipAddress`` | string | The IPv4 address for ``interfaceName``. | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``ipGateway`` | string | The IPv4 gateway for ``interfaceName``. | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``ipNetmask`` | string | The IPv4 netmask for ``interfaceName``. | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``lastUpdated`` | string | The Time and Date for the last update for this server. | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``mgmtIpAddress`` | string | The IPv4 address of the management port (optional). | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``mgmtIpGateway`` | string | The IPv4 gateway of the management port (optional). | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``mgmtIpNetmask`` | string | The IPv4 netmask of the management port (optional). | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``physLocation`` | string | The physical location name (see :ref:`to-api-phys-loc`). | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``profile`` | string | The assigned profile name (see :ref:`to-api-profile`). | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``rack`` | string | A string indicating rack location. | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``routerHostName`` | string | The human readable name of the router. | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``routerPortName`` | string | The human readable name of the router port. | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``status`` | string | The Status string (See :ref:`to-api-status`). | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``tcpPort`` | string | The default TCP port on which the main application listens (80 for a cache in most cases). | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``type`` | string | The name of the type of this server (see :ref:`to-api-type`). | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``xmppId`` | string | Deprecated. | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + | ``xmppPasswd`` | string | Deprecated. | + +--------------------+--------+------------------------------------------------------------------------------------------------------------+ + + **Response Example** :: + + { + "response": [ + { + "cachegroup": "us-il-chicago", + "domainName": "chi.kabletown.net", + "hostName": "atsec-chi-00", + "id": "19", + "iloIpAddress": "172.16.2.6", + "iloIpGateway": "172.16.2.1", + "iloIpNetmask": "255.255.255.0", + "iloPassword": "********", + "iloUsername": "", + "interfaceMtu": "9000", + "interfaceName": "bond0", + "ip6Address": "2033:D0D0:3300::2:2/64", + "ip6Gateway": "2033:D0D0:3300::2:1", + "ipAddress": "10.10.2.2", + "ipGateway": "10.10.2.1", + "ipNetmask": "255.255.255.0", + "lastUpdated": "2015-03-08 15:57:32", + "mgmtIpAddress": "", + "mgmtIpGateway": "", + "mgmtIpNetmask": "", + "physLocation": "plocation-chi-1", + "profile": "EDGE1_CDN1_421_SSL", + "rack": "RR 119.02", + "routerHostName": "rtr-chi.kabletown.net", + "routerPortName": "2", + "status": "ONLINE", + "tcpPort": "80", + "type": "EDGE", + "xmppId": "atsec-chi-00-dummyxmpp", + "xmppPasswd": "**********" + }, + { + ... more server data + } + ] + "version": "1.1" + } + + +| + +**GET /api/1.1/servers/summary.json** + + Retrieves a count of CDN servers by type. + + Authentication Required: Yes + + **Response Properties** + + +-----------+--------+---------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+========+=====================================================================+ + | ``count`` | int | The number of servers of this type in this instance of Traffic Ops. | + +-----------+--------+---------------------------------------------------------------------+ + | ``type`` | string | The name of the type of the server count (see :ref:`to-api-type`). | + +-----------+--------+---------------------------------------------------------------------+ + + **Response Example** :: + + { + "response": [ + { + "count": 4, + "type": "CCR" + }, + { + "count": 55, + "type": "EDGE" + }, + { + "type": "MID", + "count": 18 + }, + { + "count": 0, + "type": "REDIS" + }, + { + "count": 4, + "type": "RASCAL" + } + "version": "1.1", + } + +| + +**GET /api/1.1/servers/hostname/:name/details.json** + + Retrieves the details of a server. + + Authentication Required: Yes + + **Request Route Parameters** + + +----------+----------+----------------------------------+ + | Name | Required | Description | + +==========+==========+==================================+ + | ``name`` | yes | The host name part of the cache. | + +----------+----------+----------------------------------+ + + **Response Properties** + + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +======================+========+=============================================================================================================+ + | ``cachegroup`` | string | The cache group name (see :ref:`to-api-cachegroup`). | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``deliveryservices`` | array | Array of strings with the delivery service ids assigned (see :ref:`to-api-ds`). | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``domainName`` | string | The domain name part of the FQDN of the cache. | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``hardwareInfo`` | hash | Hwinfo struct (see :ref:`to-api-hwinfo`). | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``hostName`` | string | The host name part of the cache. | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``id`` | string | The server id (database row number). | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``iloIpAddress`` | string | The IPv4 address of the lights-out-management port. | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``iloIpGateway`` | string | The IPv4 gateway address of the lights-out-management port. | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``iloIpNetmask`` | string | The IPv4 netmask of the lights-out-management port. | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``iloPassword`` | string | The password of the of the lights-out-management user (displays as ****** unless you are an 'admin' user). | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``iloUsername`` | string | The user name for lights-out-management. | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``interfaceMtu`` | string | The Maximum Transmission Unit (MTU) to configure for ``interfaceName``. | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``interfaceName`` | string | The network interface name used for serving traffic. | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``ip6Address`` | string | The IPv6 address/netmask for ``interfaceName``. | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``ip6Gateway`` | string | The IPv6 gateway for ``interfaceName``. | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``ipAddress`` | string | The IPv4 address for ``interfaceName``. | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``ipGateway`` | string | The IPv4 gateway for ``interfaceName``. | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``ipNetmask`` | string | The IPv4 netmask for ``interfaceName``. | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``lastUpdated`` | string | The Time/Date of the last update for this server. | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``mgmtIpAddress`` | string | The IPv4 address of the management port (optional). | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``mgmtIpGateway`` | string | The IPv4 gateway of the management port (optional). | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``mgmtIpNetmask`` | string | The IPv4 netmask of the management port (optional). | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``physLocation`` | string | The physical location name (see :ref:`to-api-phys-loc`). | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``profile`` | string | The assigned profile name (see :ref:`to-api-profile`). | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``rack`` | string | A string indicating rack location. | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``routerHostName`` | string | The human readable name of the router. | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``routerPortName`` | string | The human readable name of the router port. | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``status`` | string | The Status string (See :ref:`to-api-status`). | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``tcpPort`` | string | The default TCP port on which the main application listens (80 for a cache in most cases). | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``type`` | string | The name of the type of this server (see :ref:`to-api-type`). | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``xmppId`` | string | Deprecated. | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + | ``xmppPasswd`` | string | Deprecated. | + +----------------------+--------+-------------------------------------------------------------------------------------------------------------+ + + **Response Example** :: + + { + "response": { + "cachegroup": "us-il-chicago", + "deliveryservices": [ + "1", + "2", + "3", + "4" + ], + "domainName": "chi.kabletown.net", + "hardwareInfo": { + "Physical Disk 0:1:3": "D1S2", + "Physical Disk 0:1:2": "D1S2", + "Physical Disk 0:1:15": "D1S2", + "Power Supply.Slot.2": "04.07.15", + "Physical Disk 0:1:24": "YS08", + "Physical Disk 0:1:1": "D1S2", + "Model": "PowerEdge R720xd", + "Physical Disk 0:1:22": "D1S2", + "Physical Disk 0:1:18": "D1S2", + "Enterprise UEFI Diagnostics": "4217A5", + "Lifecycle Controller": "1.0.8.42", + "Physical Disk 0:1:8": "D1S2", + "Manufacturer": "Dell Inc.", + "Physical Disk 0:1:6": "D1S2", + "SysMemTotalSize": "196608", + "PopulatedDIMMSlots": "24", + "Physical Disk 0:1:20": "D1S2", + "Intel(R) Ethernet 10G 2P X520 Adapter": "13.5.7", + "Physical Disk 0:1:14": "D1S2", + "BACKPLANE FIRMWARE": "1.00", + "Dell OS Drivers Pack, 7.0.0.29, A00": "7.0.0.29", + "Integrated Dell Remote Access Controller": "1.57.57", + "Physical Disk 0:1:5": "D1S2", + "ServiceTag": "D6XPDV1", + "PowerState": "2", + "Physical Disk 0:1:23": "D1S2", + "Physical Disk 0:1:25": "D903", + "BIOS": "1.3.6", + "Physical Disk 0:1:12": "D1S2", + "System CPLD": "1.0.3", + "Physical Disk 0:1:4": "D1S2", + "Physical Disk 0:1:0": "D1S2", + "Power Supply.Slot.1": "04.07.15", + "PERC H710P Mini": "21.0.2-0001", + "PowerCap": "689", + "Physical Disk 0:1:16": "D1S2", + "Physical Disk 0:1:10": "D1S2", + "Physical Disk 0:1:11": "D1S2", + "Lifecycle Controller 2": "1.0.8.42", + "BP12G+EXP 0:1": "1.07", + "Physical Disk 0:1:9": "D1S2", + "Physical Disk 0:1:17": "D1S2", + "Broadcom Gigabit Ethernet BCM5720": "7.2.20", + "Physical Disk 0:1:21": "D1S2", + "Physical Disk 0:1:13": "D1S2", + "Physical Disk 0:1:7": "D1S2", + "Physical Disk 0:1:19": "D1S2" + }, + "hostName": "atsec-chi-00", + "id": "19", + "iloIpAddress": "172.16.2.6", + "iloIpGateway": "172.16.2.1", + "iloIpNetmask": "255.255.255.0", + "iloPassword": "********", + "iloUsername": "", + "interfaceMtu": "9000", + "interfaceName": "bond0", + "ip6Address": "2033:D0D0:3300::2:2/64", + "ip6Gateway": "2033:D0D0:3300::2:1", + "ipAddress": "10.10.2.2", + "ipGateway": "10.10.2.1", + "ipNetmask": "255.255.255.0", + "mgmtIpAddress": "", + "mgmtIpGateway": "", + "mgmtIpNetmask": "", + "physLocation": "plocation-chi-1", + "profile": "EDGE1_CDN1_421_SSL", + "rack": "RR 119.02", + "routerHostName": "rtr-chi.kabletown.net", + "routerPortName": "2", + "status": "ONLINE", + "tcpPort": "80", + "type": "EDGE", + "xmppId": "atsec-chi-00-dummyxmpp", + "xmppPasswd": "X" + + } + "version": "1.1", + + } + +| + +**POST /api/1.1/servercheck** + + Post a server check result to the serverchecks table. + + Authentication Required: Yes + + **Request Route Parameters** + + +----------------------------+----------+-------------+ + | Name | Required | Description | + +============================+==========+=============+ + | ``id`` | yes | | + +----------------------------+----------+-------------+ + | ``host_name`` | yes | | + +----------------------------+----------+-------------+ + | ``servercheck_short_name`` | yes | | + +----------------------------+----------+-------------+ + | ``value`` | yes | | + +----------------------------+----------+-------------+ + + **Request Example** :: + + + { + "id": "", + "host_name": "", + "servercheck_short_name": "", + "value": "" + } + + Response Content Type: application/json + + **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** :: + + + Response Example: + + { + "alerts": + [ + { + "level": "success", + "text": "Server Check was successfully updated." + } + ], + "version": "1.1" + } + http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/8582b168/docs/1.1.2/_sources/development/traffic_ops_rest/static_dns.txt ---------------------------------------------------------------------- diff --git a/docs/1.1.2/_sources/development/traffic_ops_rest/static_dns.txt b/docs/1.1.2/_sources/development/traffic_ops_rest/static_dns.txt new file mode 100644 index 0000000..7729a98 --- /dev/null +++ b/docs/1.1.2/_sources/development/traffic_ops_rest/static_dns.txt @@ -0,0 +1,37 @@ +.. +.. 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-dns: + +Static DNS Entries +================== + +**GET /api/1.1/staticdnsentries.json** + +Authentication Required: Yes + +**Response Properties** + ++----------------------+--------+------------------------------------------------+ +| Parameter | Type | Description | ++======================+========+================================================+ +| TBD | array | | ++----------------------+--------+------------------------------------------------+ + +**Response Example** :: + + TBD + http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/8582b168/docs/1.1.2/_sources/development/traffic_ops_rest/status.txt ---------------------------------------------------------------------- diff --git a/docs/1.1.2/_sources/development/traffic_ops_rest/status.txt b/docs/1.1.2/_sources/development/traffic_ops_rest/status.txt new file mode 100644 index 0000000..8d4b83a --- /dev/null +++ b/docs/1.1.2/_sources/development/traffic_ops_rest/status.txt @@ -0,0 +1,79 @@ +.. +.. 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-status: + +Status +====== + +**GET /api/1.1/statuses.json** + + Retrieves a list of the server status codes available. May be useful when the status is retrieved from other APIs as a number and not a string. + + Authentication Required: Yes + + **Response Properties** + + +-----------------+--------+--------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=================+========+================================================================================+ + | ``lastUpdated`` | string | The Time / Date this server entry was last updated | + +-----------------+--------+--------------------------------------------------------------------------------+ + | ``name`` | string | The string equivalent of the status | + +-----------------+--------+--------------------------------------------------------------------------------+ + | ``id`` | string | The id with which Traffic Ops stores this status, and references it internally | + +-----------------+--------+--------------------------------------------------------------------------------+ + | ``description`` | string | A short description of the status | + +-----------------+--------+--------------------------------------------------------------------------------+ + + **Response Example** :: + + { + "response": [ + { + "description": "Temporary down. Edge: XMPP client will send status OFFLINE to CCR, otherwise similar to REPORTED. Mid: Server will not be included in parent.config files for its edge caches", + "id": "4", + "name": "ADMIN_DOWN", + "lastUpdated": "2013-02-13 16:34:29" + }, + { + "lastUpdated": "2013-02-13 16:34:29", + "name": "CCR_IGNORE", + "id": "5", + "description": "Edge: 12M will not include caches in this state in CCR config files. Mid: N\/A for now" + }, + { + "description": "Edge: Puts server in CCR config file in this state, but CCR will never route traffic to it. Mid: Server will not be included in parent.config files for its edge caches", + "id": "1", + "lastUpdated": "2013-02-13 16:34:29", + "name": "OFFLINE" + }, + { + "id": "2", + "description": "Edge: Puts server in CCR config file in this state, and CCR will always route traffic to it. Mid: Server will be included in parent.config files for its edges", + "lastUpdated": "2013-02-13 16:34:29", + "name": "ONLINE" + }, + { + "id": "3", + "description": "Edge: Puts server in CCR config file in this state, and CCR will adhere to the health protocol. Mid: N\/A for now", + "name": "REPORTED", + "lastUpdated": "2013-02-13 16:34:29" + } + ], + "version": "1.1" + } + http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/8582b168/docs/1.1.2/_sources/development/traffic_ops_rest/system.txt ---------------------------------------------------------------------- diff --git a/docs/1.1.2/_sources/development/traffic_ops_rest/system.txt b/docs/1.1.2/_sources/development/traffic_ops_rest/system.txt new file mode 100644 index 0000000..6e2a209 --- /dev/null +++ b/docs/1.1.2/_sources/development/traffic_ops_rest/system.txt @@ -0,0 +1,74 @@ +.. +.. 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-sys: + +System +====== + +**GET /api/1.1/system/info.json** + + Authentication Required: Yes + + **Response Properties** + + +----------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+ + | Key | Type | Description | + +============================+========+======================================================================================================================================+ + | ``parameters`` | hash | This is a hash with the parameter names that describe the Traffic Ops installation as keys. | + | | | These are all the parameters in the ``GLOBAL`` profile. | + +----------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+ + | ``>tm.toolname`` | string | The name of the Traffic Ops tool. Usually "Traffic Ops". Used in the About screen and in the comments headers of the files generated | + | | | (``# DO NOT EDIT - Generated for atsec-lax-04 by Traffic Ops (https://traffops.kabletown.net/) on Fri Mar 6 05:15:15 UTC 2015``). | + +----------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+ + | ``>tm.instance_name`` | string | The name of the Traffic Ops instance. Can be used when multiple instances are active. Visible in the About page. | + +----------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+ + | ``>traffic_rtr_fwd_proxy`` | string | When collecting stats from Traffic Router, Traffic Ops uses this forward proxy to pull the stats through. | + | | | This can be any of the MID tier caches, or a forward cache specifically deployed for this purpose. Setting | + | | | this variable can significantly lighten the load on the Traffic Router stats system and it is recommended to | + | | | set this parameter on a production system. | + +----------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+ + | ``>tm.url`` | string | The URL for this Traffic Ops instance. Used in the About screen and in the comments headers of the files generated | + | | | (``# DO NOT EDIT - Generated for atsec-lax-04 by Traffic Ops (https://traffops.kabletown.net/) on Fri Mar 6 05:15:15 UTC 2015``). | + +----------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+ + | ``>traffic_mon_fwd_proxy`` | string | When collecting stats from Traffic Monitor, Traffic Ops uses this forward proxy to pull the stats through. | + | | | This can be any of the MID tier caches, or a forward cache specifically deployed for this purpose. Setting | + | | | this variable can significantly lighten the load on the Traffic Monitor system and it is recommended to | + | | | set this parameter on a production system. | + +----------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+ + | ``>tm.logourl`` | string | This is the URL of the logo for Traffic Ops and can be relative if the logo is under traffic_ops/app/public. | + +----------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+ + | ``>tm.infourl`` | string | This is the "for more information go here" URL, which is visible in the About page. | + +----------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------+ + + **Response Example** :: + + { + "response": { + "parameters": { + "tm.toolname": "Traffic Ops", + "tm.infourl": "http:\/\/staging-03.cdnlab.kabletown.net\/tm\/info", + "traffic_mon_fwd_proxy": "http:\/\/proxy.kabletown.net:81", + "traffic_rtr_fwd_proxy": "http:\/\/proxy.kabletown.net:81", + "tm.logourl": "\/images\/tc_logo.png", + "tm.url": "https:\/\/tm.kabletown.net\/", + "tm.instance_name": "Kabletown CDN" + } + }, + "version": "1.1" + } + + http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/8582b168/docs/1.1.2/_sources/development/traffic_ops_rest/to_extension.txt ---------------------------------------------------------------------- diff --git a/docs/1.1.2/_sources/development/traffic_ops_rest/to_extension.txt b/docs/1.1.2/_sources/development/traffic_ops_rest/to_extension.txt new file mode 100644 index 0000000..15696bc --- /dev/null +++ b/docs/1.1.2/_sources/development/traffic_ops_rest/to_extension.txt @@ -0,0 +1,207 @@ +.. +.. 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-ext: + +TO Extensions +============= +**GET /api/1.1/to_extensions.json** + +Retrieves the list of extensions. + +Authentication Required: Yes + +Response Content Type: application/json + +**Return Values** + ++--------------------------+--------+--------------------------------------------+ +| Parameter | Type | Description | ++==========================+========+============================================+ +|``script_file`` | string | | ++--------------------------+--------+--------------------------------------------+ +|``version`` | string | | ++--------------------------+--------+--------------------------------------------+ +|``name`` | string | | ++--------------------------+--------+--------------------------------------------+ +|``description`` | string | | ++--------------------------+--------+--------------------------------------------+ +|``info_url`` | string | | ++--------------------------+--------+--------------------------------------------+ +|``additional_config_json``| string | | ++--------------------------+--------+--------------------------------------------+ +|``isactive`` | string | | ++--------------------------+--------+--------------------------------------------+ +|``id`` | string | | ++--------------------------+--------+--------------------------------------------+ +|``type`` | string | | ++--------------------------+--------+--------------------------------------------+ +|``servercheck_short_name``| string | | ++--------------------------+--------+--------------------------------------------+ + +**Response Example** :: + + + { + âresponseâ: [ + { + script_file: "ping", + version: "1.0.0", + name: "ILO_PING", + description: null, + info_url: "http://foo.com/bar.html", + additional_config_json: "{ "path": "/api/1.1/servers.json", "match": { "type": "EDGE"}, "select": "ilo_ip_address", "cron": "9 * * * *" }", + isactive: "1", + id: "1", + type: "CHECK_EXTENSION_BOOL", + servercheck_short_name: "ILO" + }, + { + script_file: "ping", + version: "1.0.0", + name: "10G_PING", + description: null, + info_url: "http://foo.com/bar.html", + additional_config_json: "{ "path": "/api/1.1/servers.json", "match": { "type": "EDGE"}, "select": "ip_address", "cron": "18 * * * *" }", + isactive: "1", + id: "2", + type: "CHECK_EXTENSION_BOOL", + servercheck_short_name: "10G" + } + ], + âversionâ: "1.1" + } + + +| + +**POST /api/1.1/to_extensions** + + Creates a Traffic Ops extension. + + Authentication Required: Yes + + **Request Parameters** + + +--------------------------+--------+--------------------------------------------+ + | Parameter | Type | Description | + +==========================+========+============================================+ + |``name`` | string | | + +--------------------------+--------+--------------------------------------------+ + |``version`` | string | | + +--------------------------+--------+--------------------------------------------+ + |``info_url`` | string | | + +--------------------------+--------+--------------------------------------------+ + |``script_file`` | string | | + +--------------------------+--------+--------------------------------------------+ + |``isactive`` | string | | + +--------------------------+--------+--------------------------------------------+ + |``additional_config_json``| string | | + +--------------------------+--------+--------------------------------------------+ + |``description`` | string | | + +--------------------------+--------+--------------------------------------------+ + |``servercheck_short_name``| string | | + +--------------------------+--------+--------------------------------------------+ + |``type`` | string | | + +--------------------------+--------+--------------------------------------------+ + + **Request Example** :: + + + { + "name": "ILO_PING", + "version": "1.0.0", + "info_url": "http://foo.com/bar.html", + "script_file": "ping", + "isactive": "1", + "additional_config_json": "{ "path": "/api/1.1/servers.json", "match": { "type": "EDGE"}", + "description": null, + "servercheck_short_name": "ILO" + "type": "CHECK_EXTENSION_BOOL", + } + + Response Content Type: application/json + + + **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": "Check Extension loaded." + } + ], + "version": "1.1" + } + + +| + +**POST /api/1.1/to_extensions/:id/delete** + + Deletes a Traffic Ops extension. + + Authentication Required: Yes + + **Request Route Parameters** + + +--------+----------+-----------------+ + | Name | Required | Description | + +========+==========+=================+ + | ``id`` | yes | TO extension id | + +--------+----------+-----------------+ + + Response Content Type: application/json + + + **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": "Extension deleted." + } + ], + "version": "1.1" + } + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/8582b168/docs/1.1.2/_sources/development/traffic_ops_rest/type.txt ---------------------------------------------------------------------- diff --git a/docs/1.1.2/_sources/development/traffic_ops_rest/type.txt b/docs/1.1.2/_sources/development/traffic_ops_rest/type.txt new file mode 100644 index 0000000..00d322e --- /dev/null +++ b/docs/1.1.2/_sources/development/traffic_ops_rest/type.txt @@ -0,0 +1,94 @@ +.. +.. 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-type: + +Types +===== + +**GET /api/1.1/types.json** + + Authentication Required: Yes + + **Response Properties** + + +----------------------+--------+------------------------------------------------+ + | Parameter | Type | Description | + +======================+========+================================================+ + |``lastUpdated`` | string | | + +----------------------+--------+------------------------------------------------+ + |``useInTable`` | string | | + +----------------------+--------+------------------------------------------------+ + |``name`` | string | | + +----------------------+--------+------------------------------------------------+ + |``id`` | string | | + +----------------------+--------+------------------------------------------------+ + |``description`` | string | | + +----------------------+--------+------------------------------------------------+ + + **Response Example** :: + + { + "response": [ + { + "lastUpdated": "2013-10-23 15:28:31", + "useInTable": "staticdnsentry", + "name": "AAAA_RECORD", + "id": "22", + "description": "Static DNS AAAA entry" + } + ], + "version": "1.1" + } + + +| + + +**GET /api/1.1/types/trimmed.json** + + Authentication Required: Yes + + Response Content Type: application/json + + **Response Properties** + + +----------------------+--------+------------------------------------------------+ + | Parameter | Type | Description | + +======================+========+================================================+ + |``name`` | string | | + +----------------------+--------+------------------------------------------------+ + + **Response Example** :: + + { + "response": [ + { + "name": "AAAA_RECORD" + }, + { + "name": "ACTIVE_DIRECTORY" + }, + { + "name": "A_RECORD" + }, + { + "name": "CCR" + } + ], + "version": "1.1" + } +
