http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/7e695c12/docs/1.8.1/_sources/development/traffic_ops_api/v11/hwinfo.rst.txt ---------------------------------------------------------------------- diff --git a/docs/1.8.1/_sources/development/traffic_ops_api/v11/hwinfo.rst.txt b/docs/1.8.1/_sources/development/traffic_ops_api/v11/hwinfo.rst.txt new file mode 100644 index 0000000..cc45b38 --- /dev/null +++ b/docs/1.8.1/_sources/development/traffic_ops_api/v11/hwinfo.rst.txt @@ -0,0 +1,67 @@ +.. +.. +.. 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-hwinfo: + +Hardware Info +============= + +.. _to-api-v11-hwinfo-route: + +/api/1.1/hwinfo ++++++++++++++++ + +**GET /api/1.1/hwinfo.json** + + Authentication Required: Yes + + Role(s) Required: None + + **Response Properties** + + +--------------------+--------+----------------------------------------------------------------------+ + | Parameter | Type | Description | + +====================+========+======================================================================+ + | ``serverId`` | string | Local unique identifier for this specific server's hardware info | + +--------------------+--------+----------------------------------------------------------------------+ + | ``serverHostName`` | string | Hostname for this specific server's hardware info | + +--------------------+--------+----------------------------------------------------------------------+ + | ``lastUpdated`` | string | The Time and Date for the last update for this server. | + +--------------------+--------+----------------------------------------------------------------------+ + | ``val`` | string | Freeform value used to track anything about a server's hardware info | + +--------------------+--------+----------------------------------------------------------------------+ + | ``description`` | string | Freeform description for this specific server's hardware info | + +--------------------+--------+----------------------------------------------------------------------+ + + **Response Example** :: + + { + "response": [ + { + "serverId": "odol-atsmid-cen-09", + "lastUpdated": "2014-05-27 09:06:02", + "val": "D1S4", + "description": "Physical Disk 0:1:0" + }, + { + "serverId": "odol-atsmid-cen-09", + "lastUpdated": "2014-05-27 09:06:02", + "val": "D1S4", + "description": "Physical Disk 0:1:1" + } + ], + } +
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/7e695c12/docs/1.8.1/_sources/development/traffic_ops_api/v11/parameter.rst.txt ---------------------------------------------------------------------- diff --git a/docs/1.8.1/_sources/development/traffic_ops_api/v11/parameter.rst.txt b/docs/1.8.1/_sources/development/traffic_ops_api/v11/parameter.rst.txt new file mode 100644 index 0000000..1b83d01 --- /dev/null +++ b/docs/1.8.1/_sources/development/traffic_ops_api/v11/parameter.rst.txt @@ -0,0 +1,136 @@ +.. +.. +.. 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-parameter: + +Parameter +========= + +.. _to-api-v11-parameters-route: + +/api/1.1/parameters ++++++++++++++++++++ + +**GET /api/1.1/parameters.json** + + Authentication Required: Yes + + Role(s) Required: None + + **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": 0, + "value": "foo.bar.net", + "name": "domain_name", + "config_file": "FooConfig.xml" + }, + { + "last_updated": "2012-09-17 21:41:22", + "secure": 0, + "value": "0,1,2,3,4,5,6", + "name": "Drive_Letters", + "config_file": "storage.config" + }, + { + "last_updated": "2012-09-17 21:41:22", + "secure": 0, + "value": "STRING __HOSTNAME__", + "name": "CONFIG proxy.config.proxy_name", + "config_file": "records.config" + } + ], + } + +| + +**GET /api/1.1/parameters/profile/:name.json** + + Authentication Required: Yes + + Role(s) Required: None + + **Request Route Parameters** + + +------------------+----------+-------------+ + | Name | Required | Description | + +==================+==========+=============+ + | ``profile_name`` | yes | | + +------------------+----------+-------------+ + + **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": 0, + "value": "foo.bar.net", + "name": "domain_name", + "config_file": "FooConfig.xml" + }, + { + "last_updated": "2012-09-17 21:41:22", + "secure": 0, + "value": "0,1,2,3,4,5,6", + "name": "Drive_Letters", + "config_file": "storage.config" + }, + { + "last_updated": "2012-09-17 21:41:22", + "secure": 0, + "value": "STRING __HOSTNAME__", + "name": "CONFIG proxy.config.proxy_name", + "config_file": "records.config" + } + ], + } + + http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/7e695c12/docs/1.8.1/_sources/development/traffic_ops_api/v11/phys_location.rst.txt ---------------------------------------------------------------------- diff --git a/docs/1.8.1/_sources/development/traffic_ops_api/v11/phys_location.rst.txt b/docs/1.8.1/_sources/development/traffic_ops_api/v11/phys_location.rst.txt new file mode 100644 index 0000000..6ebaff0 --- /dev/null +++ b/docs/1.8.1/_sources/development/traffic_ops_api/v11/phys_location.rst.txt @@ -0,0 +1,449 @@ +.. +.. +.. 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-phys-loc: + +Physical Location +================= + +.. _to-api-v11-phys-loc-route: + +/api/1.1/phys_locations ++++++++++++++++++++++++ + +**GET /api/1.1/phys_locations** + + Authentication Required: Yes + + Role(s) Required: None + + **Response Properties** + + +----------------------+--------+------------------------------------------------+ + | Parameter | Type | Description | + +======================+========+================================================+ + |``address`` | string | | + +----------------------+--------+------------------------------------------------+ + |``city`` | string | | + +----------------------+--------+------------------------------------------------+ + |``comments`` | string | | + +----------------------+--------+------------------------------------------------+ + |``email`` | string | | + +----------------------+--------+------------------------------------------------+ + |``id`` | string | | + +----------------------+--------+------------------------------------------------+ + |``lastUpdated`` | string | | + +----------------------+--------+------------------------------------------------+ + |``name`` | string | | + +----------------------+--------+------------------------------------------------+ + |``phone`` | string | | + +----------------------+--------+------------------------------------------------+ + |``poc`` | string | | + +----------------------+--------+------------------------------------------------+ + |``region`` | string | | + +----------------------+--------+------------------------------------------------+ + |``regionId`` | string | | + +----------------------+--------+------------------------------------------------+ + |``shortName`` | string | | + +----------------------+--------+------------------------------------------------+ + |``state`` | string | | + +----------------------+--------+------------------------------------------------+ + |``zip`` | string | | + +----------------------+--------+------------------------------------------------+ + + **Response Example** :: + + { + "response": [ + { + "region": "Mile High", + "region": "4", + "poc": "Jane Doe", + "lastUpdated": "2014-10-02 08:22:43", + "name": "Albuquerque", + "comments": "Albuquerque", + "phone": "(123) 555-1111", + "state": "NM", + "email": "jane....@email.com", + "city": "Albuquerque", + "zip": "87107", + "id": "2", + "address": "123 East 3rd St", + "shortName": "Albuquerque" + }, + { + "region": "Mile High", + "region": "4", + "poc": "Jane Doe", + "lastUpdated": "2014-10-02 08:22:43", + "name": "Albuquerque", + "comments": "Albuquerque", + "phone": "(123) 555-1111", + "state": "NM", + "email": "jane....@email.com", + "city": "Albuquerque", + "zip": "87107", + "id": "2", + "address": "123 East 3rd St", + "shortName": "Albuquerque" + } + ] + } + +| + +**GET /api/1.1/phys_locations/trimmed.json** + + Authentication Required: Yes + + Role(s) Required: None + + **Response Properties** + + +----------------------+---------+------------------------------------------------+ + | Parameter | Type | Description | + +======================+=========+================================================+ + |``name`` | string | | + +----------------------+---------+------------------------------------------------+ + + **Response Example** :: + + { + "response": [ + { + "name": "Albuquerque" + }, + { + "name": "Ashburn" + } + ] + } + +| + + +**GET /api/1.1/phys_locations/:id** + + Authentication Required: Yes + + Role(s) Required: None + + **Request Route Parameters** + + +-----------+----------+---------------------------------------------+ + | Name | Required | Description | + +===========+==========+=============================================+ + | ``id`` | yes | Physical location ID. | + +-----------+----------+---------------------------------------------+ + + **Response Properties** + + +----------------------+--------+------------------------------------------------+ + | Parameter | Type | Description | + +======================+========+================================================+ + |``address`` | string | | + +----------------------+--------+------------------------------------------------+ + |``city`` | string | | + +----------------------+--------+------------------------------------------------+ + |``comments`` | string | | + +----------------------+--------+------------------------------------------------+ + |``email`` | string | | + +----------------------+--------+------------------------------------------------+ + |``id`` | string | | + +----------------------+--------+------------------------------------------------+ + |``lastUpdated`` | string | | + +----------------------+--------+------------------------------------------------+ + |``name`` | string | | + +----------------------+--------+------------------------------------------------+ + |``phone`` | string | | + +----------------------+--------+------------------------------------------------+ + |``poc`` | string | | + +----------------------+--------+------------------------------------------------+ + |``region`` | string | | + +----------------------+--------+------------------------------------------------+ + |``regionId`` | string | | + +----------------------+--------+------------------------------------------------+ + |``shortName`` | string | | + +----------------------+--------+------------------------------------------------+ + |``state`` | string | | + +----------------------+--------+------------------------------------------------+ + |``zip`` | string | | + +----------------------+--------+------------------------------------------------+ + + **Response Example** :: + + { + "response": [ + { + "region": "Mile High", + "region": "4", + "poc": "Jane Doe", + "lastUpdated": "2014-10-02 08:22:43", + "name": "Albuquerque", + "comments": "Albuquerque", + "phone": "(123) 555-1111", + "state": "NM", + "email": "jane....@email.com", + "city": "Albuquerque", + "zip": "87107", + "id": "2", + "address": "123 East 3rd St", + "shortName": "Albuquerque" + } + ] + } + +| + +**PUT /api/1.1/phys_locations/:id** + Update a physical location + + Authentication Required: Yes + + Role(s) Required: admin or oper + + **Request Route Parameters** + + +-------------------+----------+------------------------------------------------+ + | Name | Type | Description | + +===================+==========+================================================+ + | ``id`` | int | Physical location id. | + +-------------------+----------+------------------------------------------------+ + + **Request Properties** + + +-------------------+----------+------------------------------------------------+ + | Parameter | Required | Description | + +===================+==========+================================================+ + | ``address`` | yes | Physical location address. | + +-------------------+----------+------------------------------------------------+ + | ``city`` | yes | Physical location city. | + +-------------------+----------+------------------------------------------------+ + | ``comments`` | no | Physical location comments. | + +-------------------+----------+------------------------------------------------+ + | ``email`` | no | Physical location email. | + +-------------------+----------+------------------------------------------------+ + | ``name`` | yes | Physical location name. | + +-------------------+----------+------------------------------------------------+ + | ``phone`` | no | Physical location phone. | + +-------------------+----------+------------------------------------------------+ + | ``poc`` | no | Physical location point of contact. | + +-------------------+----------+------------------------------------------------+ + | ``regionId`` | no | Physical location region ID. | + +-------------------+----------+------------------------------------------------+ + | ``shortName`` | yes | Physical location short name. | + +-------------------+----------+------------------------------------------------+ + | ``state`` | yes | Physical location state. | + +-------------------+----------+------------------------------------------------+ + | ``zip`` | yes | Physical location zip. | + +-------------------+----------+------------------------------------------------+ + + **Request Example** :: + + { + "regionId": "1", + "poc": "Jane Doesssss", + "name": "Albuquerque", + "comments": "Albuquerque", + "phone": "(123) 555-1111", + "state": "NM", + "email": "jane....@email.com", + "city": "Albuquerque", + "zip": "87107", + "address": "123 East 9rd St", + "shortName": "Albuquerque" + } + +| + + + **Response Properties** + + +----------------------+--------+------------------------------------------------+ + | Parameter | Type | Description | + +======================+========+================================================+ + |``address`` | string | | + +----------------------+--------+------------------------------------------------+ + |``city`` | string | | + +----------------------+--------+------------------------------------------------+ + |``comments`` | string | | + +----------------------+--------+------------------------------------------------+ + |``email`` | string | | + +----------------------+--------+------------------------------------------------+ + |``id`` | string | | + +----------------------+--------+------------------------------------------------+ + |``lastUpdated`` | string | | + +----------------------+--------+------------------------------------------------+ + |``name`` | string | | + +----------------------+--------+------------------------------------------------+ + |``phone`` | string | | + +----------------------+--------+------------------------------------------------+ + |``poc`` | string | | + +----------------------+--------+------------------------------------------------+ + |``region`` | string | | + +----------------------+--------+------------------------------------------------+ + |``regionId`` | string | | + +----------------------+--------+------------------------------------------------+ + |``shortName`` | string | | + +----------------------+--------+------------------------------------------------+ + |``state`` | string | | + +----------------------+--------+------------------------------------------------+ + |``zip`` | string | | + +----------------------+--------+------------------------------------------------+ + + + **Response Example** :: + + { + "alerts": [ + { + "level": "success", + "text": "Physical location update was successful." + } + ], + "response": [ + { + "region": "Mile High", + "region": "4", + "poc": "Jane Doe", + "lastUpdated": "2014-10-02 08:22:43", + "name": "Albuquerque", + "comments": "Albuquerque", + "phone": "(123) 555-1111", + "state": "NM", + "email": "jane....@email.com", + "city": "Albuquerque", + "zip": "87107", + "id": "2", + "address": "123 East 3rd St", + "shortName": "Albuquerque" + } + ] + } + +| + + +**POST /api/1.1/regions/:region_name/phys_locations** + Create physical location. + + Authentication Required: Yes + + Role(s) Required: admin or oper + + region_name: the name of the region to create physical location into. + + **Request Route Parameters** + + +-----------------+----------+-----------------------------------+ + | Name | Required | Description | + +=================+==========+===================================+ + | ``region_name`` | yes | The name of the physical location | + +-----------------+----------+-----------------------------------+ + + **Request Properties** + + +-----------------+----------+---------------------------------------------------+ + | Parameter | Required | Description | + +=================+==========+===================================================+ + | ``name`` | yes | The name of the location | + +-----------------+----------+---------------------------------------------------+ + | ``shortName`` | yes | The short name of the location | + +-----------------+----------+---------------------------------------------------+ + | ``address`` | yes | | + +-----------------+----------+---------------------------------------------------+ + | ``city`` | yes | | + +-----------------+----------+---------------------------------------------------+ + | ``state`` | yes | | + +-----------------+----------+---------------------------------------------------+ + | ``zip`` | yes | | + +-----------------+----------+---------------------------------------------------+ + | ``phone`` | no | | + +-----------------+----------+---------------------------------------------------+ + | ``poc`` | no | Point of contact | + +-----------------+----------+---------------------------------------------------+ + | ``email`` | no | | + +-----------------+----------+---------------------------------------------------+ + | ``comments`` | no | | + +-----------------+----------+---------------------------------------------------+ + + **Request Example** :: + + { + "name" : "my physical location1", + "shortName" : "myphylocation1", + "address" : "", + "city" : "Shanghai", + "state": "SH", + "zip": "200000", + "comments": "this is physical location1" + } + +| + + **Response Properties** + + +-----------------+--------+---------------------------------------------------+ + | Parameter | Type | Description | + +=================+========+===================================================+ + | ``id`` | string | The id of the physical location created. | + +-----------------+--------+---------------------------------------------------+ + | ``name`` | string | The name of the location | + +-----------------+--------+---------------------------------------------------+ + | ``shortName`` | string | The short name of the location | + +-----------------+--------+---------------------------------------------------+ + | ``regionName`` | string | The region name the physical location belongs to. | + +-----------------+--------+---------------------------------------------------+ + | ``regionId`` | string | | + +-----------------+--------+---------------------------------------------------+ + | ``address`` | string | | + +-----------------+--------+---------------------------------------------------+ + | ``city`` | string | | + +-----------------+--------+---------------------------------------------------+ + | ``state`` | string | | + +-----------------+--------+---------------------------------------------------+ + | ``zip`` | string | | + +-----------------+--------+---------------------------------------------------+ + | ``phone`` | string | | + +-----------------+--------+---------------------------------------------------+ + | ``poc`` | string | Point of contact | + +-----------------+--------+---------------------------------------------------+ + | ``email`` | string | | + +-----------------+--------+---------------------------------------------------+ + | ``comments`` | string | | + +-----------------+--------+---------------------------------------------------+ + + **Response Example** :: + + { + "response": { + 'shortName': 'myphylocati', + 'regionName': 'myregion1', + 'name': 'my physical location1', + 'poc': '', + 'phone': '', + 'comments': 'this is physical location1', + 'state': 'SH', + 'email': '', + 'zip': '20000', + 'region_id': '20', + 'city': 'Shanghai', + 'address': '', + 'id': '200' + } + } + +| + http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/7e695c12/docs/1.8.1/_sources/development/traffic_ops_api/v11/profile.rst.txt ---------------------------------------------------------------------- diff --git a/docs/1.8.1/_sources/development/traffic_ops_api/v11/profile.rst.txt b/docs/1.8.1/_sources/development/traffic_ops_api/v11/profile.rst.txt new file mode 100644 index 0000000..5c37690 --- /dev/null +++ b/docs/1.8.1/_sources/development/traffic_ops_api/v11/profile.rst.txt @@ -0,0 +1,129 @@ +.. +.. +.. 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-profile: + +Profiles +======== + +.. _to-api-v11-profiles-route: + +/api/1.1/profiles ++++++++++++++++++ + +**GET /api/1.1/profiles** + + Authentication Required: Yes + + Role(s) Required: None + + **Response Properties** + + +-----------------+--------+----------------------------------------------------+ + | Parameter | Type | Description | + +=================+========+====================================================+ + | ``lastUpdated`` | array | The Time / Date this server entry was last updated | + +-----------------+--------+----------------------------------------------------+ + | ``name`` | string | The name for the profile | + +-----------------+--------+----------------------------------------------------+ + | ``id`` | string | Primary key | + +-----------------+--------+----------------------------------------------------+ + | ``description`` | string | The description for the profile | + +-----------------+--------+----------------------------------------------------+ + + **Response Example** :: + + { + "response": [ + { + "lastUpdated": "2012-10-08 19:34:45", + "name": "CCR_TOP", + "id": "8", + "description": "Content Router for top.foobar.net" + } + ] + } + +| + +**GET /api/1.1/profiles/trimmed** + + Authentication Required: Yes + + Role(s) Required: None + + **Response Properties** + + +-----------------+--------+----------------------------------------------------+ + | Parameter | Type | Description | + +=================+========+====================================================+ + | ``name`` | string | The name for the profile | + +-----------------+--------+----------------------------------------------------+ + + **Response Example** :: + + { + "response": [ + { + "name": "CCR_TOP" + } + ] + } + +| + +**GET /api/1.1/profiles/:id** + + Authentication Required: Yes + + Role(s) Required: None + + **Request Route Parameters** + + +-----------------+------------+------------------------------------------------+ + | Parameter | Required | Description | + +=================+============+================================================+ + | ``id`` | yes | The ID of the profile. | + +-----------------+------------+------------------------------------------------+ + + **Response Properties** + + +-----------------+--------+----------------------------------------------------+ + | Parameter | Type | Description | + +=================+========+====================================================+ + | ``lastUpdated`` | array | The Time / Date this server entry was last updated | + +-----------------+--------+----------------------------------------------------+ + | ``name`` | string | The name for the profile | + +-----------------+--------+----------------------------------------------------+ + | ``id`` | string | Primary key | + +-----------------+--------+----------------------------------------------------+ + | ``description`` | string | The description for the profile | + +-----------------+--------+----------------------------------------------------+ + + **Response Example** :: + + { + "response": [ + { + "lastUpdated": "2012-10-08 19:34:45", + "name": "CCR_TOP", + "id": "8", + "description": "Content Router for top.foobar.net" + } + ] + } + +| + http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/7e695c12/docs/1.8.1/_sources/development/traffic_ops_api/v11/region.rst.txt ---------------------------------------------------------------------- diff --git a/docs/1.8.1/_sources/development/traffic_ops_api/v11/region.rst.txt b/docs/1.8.1/_sources/development/traffic_ops_api/v11/region.rst.txt new file mode 100644 index 0000000..faddbb1 --- /dev/null +++ b/docs/1.8.1/_sources/development/traffic_ops_api/v11/region.rst.txt @@ -0,0 +1,235 @@ +.. +.. +.. 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-region: + +Regions +======= + +.. _to-api-v11-regions-route: + +/api/1.1/regions +++++++++++++++++ + +**GET /api/1.1/regions** + + Authentication Required: Yes + + Role(s) Required: None + + **Response Properties** + + +----------------------+--------+------------------------------------------------+ + | Parameter | Type | Description | + +======================+========+================================================+ + |``id`` | string | Region ID. | + +----------------------+--------+------------------------------------------------+ + |``name`` | string | Region name. | + +----------------------+--------+------------------------------------------------+ + |``division`` | string | Division ID. | + +----------------------+--------+------------------------------------------------+ + |``divisionName`` | string | Division name. | + +----------------------+--------+------------------------------------------------+ + + **Response Example** :: + + { + "response": [ + { + "id": "6", + "name": "Atlanta", + "division": "2", + "divisionName": "West" + }, + { + "id": "7", + "name": "Denver", + "division": "2", + "divisionName": "West" + }, + ] + } + + +**GET /api/1.1/regions/:id** + + Authentication Required: Yes + + Role(s) Required: None + + **Request Route Parameters** + + +-----------+----------+---------------------------------------------+ + | Name | Required | Description | + +===========+==========+=============================================+ + | ``id`` | yes | Region id. | + +-----------+----------+---------------------------------------------+ + + **Response Properties** + + +----------------------+--------+------------------------------------------------+ + | Parameter | Type | Description | + +======================+========+================================================+ + |``id`` | string | Region ID. | + +----------------------+--------+------------------------------------------------+ + |``name`` | string | Region name. | + +----------------------+--------+------------------------------------------------+ + |``division`` | string | Division ID. | + +----------------------+--------+------------------------------------------------+ + |``divisionName`` | string | Division name. | + +----------------------+--------+------------------------------------------------+ + + **Response Example** :: + + { + "response": [ + { + "id": "6", + "name": "Atlanta", + "division": "2", + "divisionName": "West" + } + ] + } + + +**PUT /api/1.1/regions/:id** + Update a region + + Authentication Required: Yes + + Role(s) Required: admin or oper + + **Request Route Parameters** + + +-------------------+----------+------------------------------------------------+ + | Name | Type | Description | + +===================+==========+================================================+ + | ``id`` | int | Region id. | + +-------------------+----------+------------------------------------------------+ + + **Request Properties** + + +----------------+----------+--------------------------+ + | Parameter | Required | Description | + +================+==========+==========================+ + | ``name`` | yes | The name of the region | + +----------------+----------+--------------------------+ + | ``division`` | yes | The division Id | + +----------------+----------+--------------------------+ + + **Request Example** :: + + { + "name": "myregion1", + "division": "4" + } + +| + + **Response Properties** + + +----------------------+--------+------------------------------------------------+ + | Parameter | Type | Description | + +======================+========+================================================+ + |``division`` | string | | + +----------------------+--------+------------------------------------------------+ + |``divisionName`` | string | | + +----------------------+--------+------------------------------------------------+ + |``name`` | string | | + +----------------------+--------+------------------------------------------------+ + |``id`` | string | | + +----------------------+--------+------------------------------------------------+ + |``lastUpdated`` | string | | + +----------------------+--------+------------------------------------------------+ + + **Response Example** :: + + { + "alerts": [ + { + "level": "success", + "text": "Region update was successful." + } + ], + "response": { + "id": "1", + "lastUpdated": "2014-03-18 08:57:39", + "name": "myregion1", + "division": "4", + "divisionName": "mydivision1" + } + } +| + +**POST /api/1.1/divisions/:division_name/regions** + Create Region + + Authentication Required: Yes + + Role(s) Required: admin or oper + + division_name - The name of division to create new region into. + + ** Request Route Parameters** + + +-------------------+----------+------------------------------------------------+ + | Name | Required | Description | + +===================+==========+================================================+ + | ``division_name`` | yes | The name of division will create new region in | + +-------------------+----------+------------------------------------------------+ + + **Request Properties** + + +-------------------+----------+------------------------------------------+ + | Parameter | Required | Description | + +===================+==========+==========================================+ + | ``name`` | yes | The name of the region | + +-------------------+----------+------------------------------------------+ + + **Request Example** :: + + { + "name": "myregion1", + } + +| + + **Response Properties** + + +-------------------+--------+-------------------------------------------+ + | Parameter | Type | Description | + +===================+========+===========================================+ + | ``name`` | string | name of region created | + +-------------------+--------+-------------------------------------------+ + | ``id`` | string | id of region created | + +-------------------+--------+-------------------------------------------+ + | ``divisionName`` | string | the division name the region belongs to. | + +-------------------+--------+-------------------------------------------+ + | ``divisionId`` | string | the id of division the region belongs to. | + +-------------------+--------+-------------------------------------------+ + + **Response Example** :: + + { + "response": { + 'divisionName': 'mydivision1', + 'divsionId': '4', + 'name': 'myregion1', + 'id': '19' + } + } + +| http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/7e695c12/docs/1.8.1/_sources/development/traffic_ops_api/v11/role.rst.txt ---------------------------------------------------------------------- diff --git a/docs/1.8.1/_sources/development/traffic_ops_api/v11/role.rst.txt b/docs/1.8.1/_sources/development/traffic_ops_api/v11/role.rst.txt new file mode 100644 index 0000000..bf3337c --- /dev/null +++ b/docs/1.8.1/_sources/development/traffic_ops_api/v11/role.rst.txt @@ -0,0 +1,58 @@ +.. +.. +.. 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-roles: + +Roles +===== + +.. _to-api-v11-roles-route: + +/api/1.1/roles +++++++++++++++ + +**GET /api/1.1/roles.json** + + Authentication Required: Yes + + Role(s) Required: None + + **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" + } + ], + } +