Add v2.0 /endpoints/ api-ref

Change-Id: I5f1b93251f9256f40394fda56b3c3f16227fafe5
Closes-Bug: 1569384
This commit is contained in:
Boris Bobrov 2016-07-14 20:27:38 +03:00 committed by Steve Martinelli
parent 7d96826021
commit 5d42b3e577
8 changed files with 187 additions and 1 deletions

View File

@ -0,0 +1,78 @@
.. -*- rst -*-
=========
Endpoints
=========
List endpoint templates
=======================
.. rest_method:: GET /v2.0/endpoints
Normal response codes: 200
Response Parameters
-------------------
.. rest_parameters:: admin-endpoints_parameters.yaml
- endpoints: endpoints_list
Response Example
----------------
.. literalinclude:: samples/admin/endpoint-list-response.json
:language: javascript
Create endpoint template
========================
.. rest_method:: POST /v2.0/endpoints
Normal response codes: 201
Request
-------
.. rest_parameters:: admin-endpoints_parameters.yaml
- endpoint: endpoint_create
- region: region
- service_id: service_id
- publicurl: publicurl
- adminurl: adminurl
- internalurl: internalurl
Request Example
---------------
.. literalinclude:: samples/admin/endpoint-create-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: admin-endpoints_parameters.yaml
- adminurl: adminurl
- id: id
- internalurl: internalurl
- publicurl: publicurl
- region: region
Delete endpoint template
========================
.. rest_method:: DELETE /v2.0/endpoints/{endpointId}
Normal response codes: 204
Request
-------
.. rest_parameters:: admin-endpoints_parameters.yaml
- endpointId: id_path

View File

@ -0,0 +1,71 @@
# variables in header
# variables in path
id_path:
description: |
Endpoint ID
in: path
required: true
type: string
# variables in query
# variables in body
adminurl:
description: |
Admin URL
in: body
required: true
type: string
endpoint:
description: |
Endpoint object. Contains ``publicURL``, ``adminURL``,
``internalURL``, ``id`` and ``region`` for the endpoint.
in: body
required: true
type: object
endpoint_create:
description: |
Endpoint object, containing ``region``, ``service_id``,
``publicurl``, ``adminurl``, ``internalurl``.
in: body
required: true
type: object
endpoints_list:
description: |
One or more ``endpoint`` objects. Each object
shows the ``adminURL``, ``region``, ``internalURL``, ``id``, and
``publicURL`` for the endpoint.
in: body
required: true
type: list
id:
description: |
Endpoint ID
in: body
required: true
type: string
internalurl:
description: |
Internal URL
in: body
required: true
type: string
publicurl:
description: |
Public URL
in: body
required: true
type: string
region:
description: |
Region of the endpoint
in: body
required: true
type: string
service_id:
description: |
Service ID
in: body
required: true
type: string

View File

@ -25,7 +25,7 @@ Request
Response Example
----------------
.. literalinclude:: samples/admin/endpoints-list-response.json
.. literalinclude:: samples/admin/token-endpoints-list-response.json
:language: javascript

View File

@ -9,4 +9,5 @@
.. include:: admin-tenants.inc
.. include:: admin-tokens.inc
.. include:: admin-users.inc
.. include:: admin-endpoints.inc
.. include:: admin-versions.inc

View File

@ -0,0 +1,9 @@
{
"endpoint": {
"adminurl": null,
"internalurl": null,
"publicurl": "http://host-3:8774/v1.1/$(tenant_id)s",
"region": "RegionOne",
"service_id": "aea0aa3723e34ee3a5ac49ce86d4cc6e"
}
}

View File

@ -0,0 +1,9 @@
{
"endpoint": {
"adminurl": null,
"id": "8f9531231e044e218824b0e58688d263",
"internalurl": null,
"publicurl": "http://host-1:8774/v1.1/$(tenant_id)s",
"region": "RegionOne"
}
}

View File

@ -0,0 +1,18 @@
{
"endpoints": [
{
"adminurl": "http://host-1:8774/v1.1/$(tenant_id)s",
"id": "8f9531231e044e218824b0e58688d262",
"internalurl": "http://host-1:8774/v1.1/$(tenant_id)s",
"publicurl": "http://host-1:8774/v1.1/$(tenant_id)s",
"region": "RegionOne"
},
{
"adminurl": "http://host-1:8774/v1.1/$(tenant_id)s",
"id": "8f9531231e044e218824b0e58688d263",
"internalurl": "http://host-1:8774/v1.1/$(tenant_id)s",
"publicurl": "http://host-1:8774/v1.1/$(tenant_id)s",
"region": "RegionOne"
}
]
}