Add v2.0 /endpoints/ api-ref
Change-Id: I5f1b93251f9256f40394fda56b3c3f16227fafe5 Closes-Bug: 1569384
This commit is contained in:
parent
7d96826021
commit
5d42b3e577
|
@ -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
|
|
@ -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
|
|
@ -25,7 +25,7 @@ Request
|
|||
Response Example
|
||||
----------------
|
||||
|
||||
.. literalinclude:: samples/admin/endpoints-list-response.json
|
||||
.. literalinclude:: samples/admin/token-endpoints-list-response.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
|
|
|
@ -9,4 +9,5 @@
|
|||
.. include:: admin-tenants.inc
|
||||
.. include:: admin-tokens.inc
|
||||
.. include:: admin-users.inc
|
||||
.. include:: admin-endpoints.inc
|
||||
.. include:: admin-versions.inc
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"endpoint": {
|
||||
"adminurl": null,
|
||||
"internalurl": null,
|
||||
"publicurl": "http://host-3:8774/v1.1/$(tenant_id)s",
|
||||
"region": "RegionOne",
|
||||
"service_id": "aea0aa3723e34ee3a5ac49ce86d4cc6e"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"endpoint": {
|
||||
"adminurl": null,
|
||||
"id": "8f9531231e044e218824b0e58688d263",
|
||||
"internalurl": null,
|
||||
"publicurl": "http://host-1:8774/v1.1/$(tenant_id)s",
|
||||
"region": "RegionOne"
|
||||
}
|
||||
}
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue