Skip to content

Commit

Permalink
remove /v2.1/{tenant_id} from all urls
Browse files Browse the repository at this point in the history
As discussed at summit, the version part of the URL is not really
relevant, or a thing a user should be filling out themselves, this
should instead be set by the service catalog and extracted from the
token.

This removes it's reference in all documented REST urls, and adds a
new section describing how one gets the base URL for all calls.

Change-Id: I4306b8c3de0225e54f3909dd8a1fb293c4e5944c
  • Loading branch information
sdague committed Jun 3, 2016
1 parent cfd64c9 commit c9f5ad3
Show file tree
Hide file tree
Showing 60 changed files with 380 additions and 694 deletions.
4 changes: 2 additions & 2 deletions api-ref/source/diagnostics.inc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Shows the usage data for a server.
Show Server Diagnostics
=======================

.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/diagnostics
.. rest_method:: GET /servers/{server_id}/diagnostics

Shows basic usage data for a server.

Expand All @@ -26,7 +26,7 @@ Request

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id

- server_id: server_id

Response
Expand Down
11 changes: 2 additions & 9 deletions api-ref/source/extensions.inc
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,14 @@ For information about extensions, see `Extensions
List Extensions
===============

.. rest_method:: GET /v2.1/{tenant_id}/extensions
.. rest_method:: GET /extensions

Lists all extensions to the API.

Normal response codes: 200

Error response codes: unauthorized(401)

Request
-------

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id

Response
--------
Expand All @@ -64,7 +58,7 @@ Lists all extensions to the API.
Show Extension Details
======================

.. rest_method:: GET /v2.1/{tenant_id}/extensions/{alias}
.. rest_method:: GET /extensions/{alias}

Shows details for an extension, by alias.

Expand All @@ -77,7 +71,6 @@ Request

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id
- alias: alias

Response
Expand Down
18 changes: 5 additions & 13 deletions api-ref/source/flavors.inc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ allocated to a server built with this flavor.
List Flavors
============

.. rest_method:: GET /v2.1/{tenant_id}/flavors
.. rest_method:: GET /flavors

Lists all flavors accessible to your project.

Expand All @@ -26,7 +26,6 @@ Request

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id
- sort_key: sort_key
- sort_dir: sort_dir
- limit: limit
Expand Down Expand Up @@ -56,7 +55,7 @@ that was not customized by the site operators.
Create Flavor
=============

.. rest_method:: POST /v2.1/{tenant_id}/flavors
.. rest_method:: POST /flavors

Creates a flavor.

Expand All @@ -73,7 +72,6 @@ Request

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id
- flavor: flavor
- name: flavor_name
- id: flavor_id_body
Expand All @@ -95,7 +93,6 @@ Response

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id
- flavor: flavor
- name: flavor_name
- id: flavor_id_body
Expand All @@ -118,7 +115,7 @@ Response
List Flavors With Details
=========================

.. rest_method:: GET /v2.1/{tenant_id}/flavors/detail
.. rest_method:: GET /flavors/detail

Lists flavors with details.

Expand All @@ -131,7 +128,6 @@ Request

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id
- sort_key: sort_key
- sort_dir: sort_dir
- limit: limit
Expand All @@ -146,7 +142,6 @@ Response

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id
- flavors: flavors
- name: flavor_name
- id: flavor_id_body
Expand All @@ -168,7 +163,7 @@ Response
Show Flavor Details
===================

.. rest_method:: GET /v2.1/{tenant_id}/flavors/{flavor_id}
.. rest_method:: GET /flavors/{flavor_id}

Shows details for a flavor.

Expand All @@ -181,15 +176,13 @@ Request

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id
- flavor_id: flavor_id

Response
--------

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id
- flavor: flavor
- name: flavor_name
- id: flavor_id_body
Expand All @@ -211,7 +204,7 @@ Response
Delete Flavor
=============

.. rest_method:: DELETE /v2.1/{tenant_id}/flavors/{flavor_id}
.. rest_method:: DELETE /flavors/{flavor_id}

Deletes a flavor.

Expand All @@ -228,7 +221,6 @@ Request

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id
- flavor_id: flavor_id

Response
Expand Down
44 changes: 11 additions & 33 deletions api-ref/source/images.inc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ image size in the ``OS-EXT-IMG-SIZE:size`` extended attribute.
List Images
===========

.. rest_method:: GET /v2.1/{tenant_id}/images
.. rest_method:: GET /images

List images.

Expand All @@ -29,13 +29,6 @@ Normal response codes: 200
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404)

Request
-------

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id

Response
--------

Expand All @@ -47,7 +40,7 @@ Response
List Images With Details
========================

.. rest_method:: GET /v2.1/{tenant_id}/images/detail
.. rest_method:: GET /images/detail

List images with details.

Expand All @@ -56,13 +49,6 @@ Normal response codes: 200
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404)

Request
-------

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id

Response
--------

Expand All @@ -75,7 +61,7 @@ Response
Show Image Details
==================

.. rest_method:: GET /v2.1/{tenant_id}/images/{image_id}
.. rest_method:: GET /images/{image_id}

Shows details for an image.

Expand All @@ -88,7 +74,6 @@ Request

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id
- image_id: image_id

Response
Expand All @@ -102,7 +87,7 @@ Response
Delete Image
============

.. rest_method:: DELETE /v2.1/{tenant_id}/images/{image_id}
.. rest_method:: DELETE /images/{image_id}

Deletes an image.

Expand All @@ -115,7 +100,6 @@ Request

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id
- image_id: image_id

Response
Expand All @@ -124,7 +108,7 @@ Response
List Image Metadata
===================

.. rest_method:: GET /v2.1/{tenant_id}/images/{image_id}/metadata
.. rest_method:: GET /images/{image_id}/metadata

List metadata of an image.

Expand All @@ -137,7 +121,6 @@ Request

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id
- image_id: image_id

Response
Expand All @@ -151,7 +134,7 @@ Response
Create Image Metadata
=====================

.. rest_method:: POST /v2.1/{tenant_id}/images/{image_id}/metadata
.. rest_method:: POST /images/{image_id}/metadata

Create an image metadata.

Expand All @@ -165,7 +148,6 @@ Request

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id
- image_id: image_id

**Example Create Image Metadata: JSON request**
Expand All @@ -184,7 +166,7 @@ Response
Update Image Metadata
=====================

.. rest_method:: PUT /v2.1/{tenant_id}/images/{image_id}/metadata
.. rest_method:: PUT /images/{image_id}/metadata

Update an image metadata

Expand All @@ -198,7 +180,6 @@ Request

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id
- image_id: image_id

**Example Update Image Metadata: JSON request**
Expand All @@ -217,7 +198,7 @@ Response
Show Image Metadata Item
========================

.. rest_method:: GET /v2.1/{tenant_id}/images/{image_id}/metadata/{key}
.. rest_method:: GET /images/{image_id}/metadata/{key}

Shows metadata item, by key, for an image.

Expand All @@ -230,7 +211,6 @@ Request

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id
- image_id: image_id
- key: key

Expand All @@ -245,7 +225,7 @@ Response
Create Or Update Image Metadata Item
====================================

.. rest_method:: PUT /v2.1/{tenant_id}/images/{image_id}/metadata/{key}
.. rest_method:: PUT /images/{image_id}/metadata/{key}

Creates or updates a metadata item, by key, for an image.

Expand All @@ -258,7 +238,6 @@ Request

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id
- image_id: image_id
- key: key

Expand All @@ -278,7 +257,7 @@ Response
Delete Image Metadata Item
==========================

.. rest_method:: DELETE /v2.1/{tenant_id}/images/{image_id}/metadata/{key}
.. rest_method:: DELETE /images/{image_id}/metadata/{key}

Deletes a metadata item, by key, for an image.

Expand All @@ -291,9 +270,8 @@ Request

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id
- image_id: image_id
- key: key

Response
--------
--------
1 change: 1 addition & 0 deletions api-ref/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
.. rest_expand_all::

.. include:: versions.inc
.. include:: urls.inc
.. include:: servers.inc
.. include:: servers-multiple-create.inc
.. include:: servers-actions.inc
Expand Down
8 changes: 4 additions & 4 deletions api-ref/source/ips.inc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ address.
List Ips
========

.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/ips
.. rest_method:: GET /servers/{server_id}/ips

Lists IP addresses that are assigned to an instance.

Expand All @@ -28,7 +28,7 @@ Request

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id

- server_id: server_id

Response
Expand All @@ -49,7 +49,7 @@ Response
Show Ip Details
===============

.. rest_method:: GET /v2.1/{tenant_id}/servers/{server_id}/ips/{network_label}
.. rest_method:: GET /servers/{server_id}/ips/{network_label}

Shows IP addresses details for a network label of a server instance.

Expand All @@ -66,7 +66,7 @@ Request

.. rest_parameters:: parameters.yaml

- tenant_id: tenant_id

- server_id: server_id
- network_label: network_label

Expand Down
Loading

0 comments on commit c9f5ad3

Please sign in to comment.