From acf8c99e9b50310545e0477af711acc088cd1925 Mon Sep 17 00:00:00 2001 From: junboli Date: Thu, 22 Mar 2018 18:38:36 +0800 Subject: [PATCH] Use rest_status_code for api-ref response codes Rather than our freeform way of listing response codes in our api-ref, we should be using the os-api-ref extension option to get nicely formatted response code listings. https://docs.openstack.org/os-api-ref/latest/usage.html#rest-status-code Change-Id: Ibafafa2f9c3b301b5cdd9b1cb3b8b6d678faa731 --- api-ref/source/availability-zones.inc | 14 +- api-ref/source/extensions.inc | 14 +- api-ref/source/limits.inc | 14 +- api-ref/source/os-share-manage.inc | 34 +++- api-ref/source/quota-classes.inc | 23 ++- api-ref/source/quota-sets.inc | 70 ++++++-- api-ref/source/scheduler-stats.inc | 28 ++- api-ref/source/security-services.inc | 93 ++++++++-- api-ref/source/share-actions.inc | 143 ++++++++++++--- api-ref/source/share-export-locations.inc | 32 +++- api-ref/source/share-group-snapshots.inc | 118 +++++++++--- api-ref/source/share-group-types.inc | 154 +++++++++++++--- api-ref/source/share-groups.inc | 98 ++++++++-- .../share-instance-export-locations.inc | 32 +++- api-ref/source/share-instances.inc | 60 +++++-- api-ref/source/share-metadata.inc | 64 +++++-- api-ref/source/share-migration.inc | 51 +++++- api-ref/source/share-networks.inc | 128 ++++++++++--- api-ref/source/share-replicas.inc | 151 ++++++++++++---- api-ref/source/share-servers.inc | 47 ++++- api-ref/source/share-types.inc | 170 ++++++++++++++---- api-ref/source/shares.inc | 117 +++++++++--- api-ref/source/snapshot-instances.inc | 59 ++++-- api-ref/source/snapshots.inc | 156 +++++++++++++--- api-ref/source/status.yaml | 59 ++++++ api-ref/source/user-messages.inc | 46 ++++- api-ref/source/versions.inc | 14 +- 27 files changed, 1649 insertions(+), 340 deletions(-) create mode 100644 api-ref/source/status.yaml diff --git a/api-ref/source/availability-zones.inc b/api-ref/source/availability-zones.inc index 850a68623b..a6ab28d6fb 100644 --- a/api-ref/source/availability-zones.inc +++ b/api-ref/source/availability-zones.inc @@ -20,8 +20,18 @@ List availability zones Lists all availability zones. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 Request ------- diff --git a/api-ref/source/extensions.inc b/api-ref/source/extensions.inc index fe1c12ba27..0cf2bc7491 100644 --- a/api-ref/source/extensions.inc +++ b/api-ref/source/extensions.inc @@ -14,8 +14,18 @@ List extensions Lists all extensions. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 Request ------- diff --git a/api-ref/source/limits.inc b/api-ref/source/limits.inc index 8a292b6b72..8ece2b9fae 100644 --- a/api-ref/source/limits.inc +++ b/api-ref/source/limits.inc @@ -37,8 +37,18 @@ List share limits Lists share limits. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 Request ------- diff --git a/api-ref/source/os-share-manage.inc b/api-ref/source/os-share-manage.inc index 97a862ae78..8a25871a1b 100644 --- a/api-ref/source/os-share-manage.inc +++ b/api-ref/source/os-share-manage.inc @@ -24,9 +24,20 @@ action to other roles. This API was removed in API version 2.7; please see share actions for the new version of the API to utilize this feature. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- @@ -111,9 +122,20 @@ snapshots and share replicas before attempting to unmanage a share. This API was removed in API version 2.7; please see share actions for the new version of the API to utilize this feature. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- diff --git a/api-ref/source/quota-classes.inc b/api-ref/source/quota-classes.inc index 410b36a5b0..cf07f06102 100644 --- a/api-ref/source/quota-classes.inc +++ b/api-ref/source/quota-classes.inc @@ -14,10 +14,17 @@ Show quota classes for a project Shows quota class set for a project. If no specific value for the quota class resource exists, then the default value will be reported. -Normal response codes: 200 +Response codes +-------------- -Error response codes: forbidden(403), itemNotFound(404) +.. rest_status_code:: success status.yaml + - 200 + +.. rest_status_code:: error status.yaml + + - 403 + - 404 Request ------- @@ -58,10 +65,18 @@ Update quota classes for a project Updates quota class set for a project. If the ``quota_class_name`` key does not exist, then the API will create one. -Normal response codes: 200 +Response codes +-------------- -Error response codes: badRequest(400), forbidden(403), itemNotFound(404) +.. rest_status_code:: success status.yaml + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 403 + - 404 Request ------- diff --git a/api-ref/source/quota-sets.inc b/api-ref/source/quota-sets.inc index 2660ec58be..814e92a604 100644 --- a/api-ref/source/quota-sets.inc +++ b/api-ref/source/quota-sets.inc @@ -30,8 +30,18 @@ Show default quota set Shows default quotas for a tenant. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 Request ------- @@ -75,8 +85,18 @@ If you specify the optional ``user_id`` query parameter, you get the quotas for this user in the tenant. If you omit this parameter, you get the quotas for the project. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 Request ------- @@ -121,8 +141,18 @@ If you specify the optional ``user_id`` query parameter, you get the quotas for this user in the tenant. If you omit this parameter, you get the quotas for the project. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 Request ------- @@ -167,8 +197,18 @@ If you specify the optional ``user_id`` query parameter, you update the quotas for this user in the tenant. If you omit this parameter, you update the quotas for the project. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 Request ------- @@ -228,8 +268,18 @@ If you specify the optional ``user_id`` query parameter, you delete the quotas for this user in the tenant. If you omit this parameter, you delete the quotas for the project. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 Request ------- diff --git a/api-ref/source/scheduler-stats.inc b/api-ref/source/scheduler-stats.inc index 21378925b1..d0b5389a58 100644 --- a/api-ref/source/scheduler-stats.inc +++ b/api-ref/source/scheduler-stats.inc @@ -16,8 +16,18 @@ List back-end storage pools Lists all back-end storage pools. If search options are provided, the pool list that is returned is filtered with these options. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 Request ------- @@ -56,8 +66,18 @@ List back-end storage pools with details Lists all back-end storage pools with details. If search options are provided, the pool list that is returned is filtered with these options. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 Request ------- diff --git a/api-ref/source/security-services.inc b/api-ref/source/security-services.inc index 701b937905..dbe1973fb5 100644 --- a/api-ref/source/security-services.inc +++ b/api-ref/source/security-services.inc @@ -39,8 +39,18 @@ List security services Lists all security services. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 Request ------- @@ -73,8 +83,18 @@ List security services with details Lists all security services with details. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 Request ------- @@ -116,9 +136,19 @@ Show security service details Shows details for a security service. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -161,9 +191,19 @@ Create security service Creates a security service. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -unprocessableEntity(422) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 422 Request ------- @@ -224,9 +264,20 @@ the ``name`` and ``description`` attributes. A security service in ``active`` state is attached to a share network with an associated share server. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), unprocessableEntity(422) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 422 Request ------- @@ -283,9 +334,19 @@ Delete security service Deletes a security service. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- diff --git a/api-ref/source/share-actions.inc b/api-ref/source/share-actions.inc index 9b5c95e7e5..e0e97f0d88 100644 --- a/api-ref/source/share-actions.inc +++ b/api-ref/source/share-actions.inc @@ -72,10 +72,19 @@ methods: Grants access to a share. -Normal response codes: 202 +Response codes +-------------- -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -126,10 +135,19 @@ The shared file systems service stores each access rule in its database and assigns it a unique ID. This ID can be used to revoke access after access has been requested. -Normal response codes: 202 +Response codes +-------------- -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -156,10 +174,19 @@ List access rules Lists access rules for a share. The Access ID returned is necessary to deny access. -Normal response codes: 200 +Response codes +-------------- -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -209,9 +236,19 @@ Administrator only. Explicitly updates the state of a share. Use the ``policy.json`` file to grant permissions for this action to other roles. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -240,9 +277,19 @@ Administrator only. Force-deletes a share in any state. Use the ``policy.json`` file to grant permissions for this action to other roles. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -267,9 +314,19 @@ Extend share Increases the size of a share. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -295,9 +352,19 @@ Shrink share Shrinks the size of a share. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -323,9 +390,20 @@ Unmanage share This API is available in versions later than or equal to 2.7 -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- @@ -351,9 +429,20 @@ Revert share to snapshot Reverts a share to the specified snapshot, which must be the most recent one known to manila. This API is available in versions later than or equal to 2.27. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- diff --git a/api-ref/source/share-export-locations.inc b/api-ref/source/share-export-locations.inc index 32ab63f7f1..170af05bcb 100644 --- a/api-ref/source/share-export-locations.inc +++ b/api-ref/source/share-export-locations.inc @@ -17,9 +17,19 @@ List export locations Lists all export locations for a share. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -54,9 +64,19 @@ Show single export location Show details of an export location belonging to a share. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- diff --git a/api-ref/source/share-group-snapshots.inc b/api-ref/source/share-group-snapshots.inc index 2d70d95329..c0b3733195 100644 --- a/api-ref/source/share-group-snapshots.inc +++ b/api-ref/source/share-group-snapshots.inc @@ -29,8 +29,17 @@ List share group snapshots Lists all share group snapshots. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 Request ------- @@ -72,8 +81,17 @@ List share group snapshots with details Lists all share group snapshots with details. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 Request ------- @@ -121,8 +139,17 @@ List share group snapshots members Lists all share group snapshots members. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 Request ------- @@ -161,8 +188,18 @@ Show share group snapshot details Shows details for a share group snapshot. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 404 Request ------- @@ -201,10 +238,20 @@ Create share group snapshot Creates a snapshot from a share. +Response codes +-------------- -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), unprocessableEntity(422) +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 422 Request ------- @@ -254,9 +301,19 @@ Administrator only. Explicitly updates the state of a share group snapshot. Use the ``policy.json`` file to grant permissions for this action to other roles. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -281,9 +338,20 @@ Update share group snapshot Updates a share group snapshot. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), unprocessableEntity(422) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 422 Request ------- @@ -330,9 +398,19 @@ Delete share group snapshot Deletes a share group snapshot. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- diff --git a/api-ref/source/share-group-types.inc b/api-ref/source/share-group-types.inc index bb20120150..7baddb5130 100644 --- a/api-ref/source/share-group-types.inc +++ b/api-ref/source/share-group-types.inc @@ -41,7 +41,12 @@ List share group types Lists all share group types. -Normal response codes: 200 +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 Request ------- @@ -75,9 +80,19 @@ List default share group types Lists default share group types. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -111,9 +126,19 @@ List share group types extra specs Lists the extra specifications for a share group type. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -144,9 +169,20 @@ Create share group type Creates a share group type. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- @@ -192,9 +228,19 @@ Shows access details for a share group type. You can view access details for private share group types only. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -226,9 +272,20 @@ Set extra spec for share group type Sets an extra specification for the share group type. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- @@ -266,9 +323,19 @@ Unset an group spec Unsets an extra specification for the share type. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -289,9 +356,20 @@ Adds share group type access for a project. You can add access to private share group types only. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- @@ -318,9 +396,19 @@ Removes share group type access from a project. You can remove access from private share group types only. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -345,9 +433,19 @@ Delete share group type Deletes a share group type. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- diff --git a/api-ref/source/share-groups.inc b/api-ref/source/share-groups.inc index a57181c194..f58b513152 100644 --- a/api-ref/source/share-groups.inc +++ b/api-ref/source/share-groups.inc @@ -30,8 +30,18 @@ List share groups Lists all share groups. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 Request ------- @@ -82,9 +92,19 @@ Show share group details Shows details for a share group. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -128,9 +148,21 @@ Create share group Creates a share group. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409), unprocessableEntity(422) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 + - 422 Request ------- @@ -189,9 +221,19 @@ Administrator only. Explicitly updates the state of a share group. Use the ``policy.json`` file to grant permissions for this action to other roles. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -217,9 +259,20 @@ Update share group Updates a share group. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), unprocessableEntity(422) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 422 Request ------- @@ -271,9 +324,20 @@ Delete share group Deletes a share group. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- diff --git a/api-ref/source/share-instance-export-locations.inc b/api-ref/source/share-instance-export-locations.inc index c2e7ca903a..0fec455d38 100644 --- a/api-ref/source/share-instance-export-locations.inc +++ b/api-ref/source/share-instance-export-locations.inc @@ -19,9 +19,19 @@ List export locations .. rest_method:: GET /v2/{tenant_id}/share_instances/{share_instance_id}/export_locations -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -55,9 +65,19 @@ Show single export location .. rest_method:: GET /v2/{tenant_id}/share_instances/{share_instance_id}/export_locations/{export_location_id} -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- diff --git a/api-ref/source/share-instances.inc b/api-ref/source/share-instances.inc index 58c2f004a6..687e073363 100644 --- a/api-ref/source/share-instances.inc +++ b/api-ref/source/share-instances.inc @@ -16,8 +16,18 @@ List share instances Lists all share instances. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 Request ------- @@ -60,9 +70,19 @@ Show share instance details Shows details for a share instance. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -107,10 +127,19 @@ Administrator only. Explicitly updates the state of a share instance. Use the ``policy.json`` file to grant permissions for this action to other roles. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -138,10 +167,19 @@ Administrator only. Force-deletes a share instance. Use the ``policy.json`` file to grant permissions for this action to other roles. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- diff --git a/api-ref/source/share-metadata.inc b/api-ref/source/share-metadata.inc index ccd6e7de39..298f60d5d3 100644 --- a/api-ref/source/share-metadata.inc +++ b/api-ref/source/share-metadata.inc @@ -14,9 +14,19 @@ Show share metadata Shows the metadata for a share. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -47,9 +57,20 @@ Set share metadata Sets the metadata on a share. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- @@ -87,10 +108,19 @@ Update share metadata Updates the metadata for a share. +Response codes +-------------- -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -131,9 +161,19 @@ Un-sets the metadata on a share. To unset a metadata key value, specify only the key name in the URI. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- diff --git a/api-ref/source/share-migration.inc b/api-ref/source/share-migration.inc index e887d8c537..e7859b0ef5 100644 --- a/api-ref/source/share-migration.inc +++ b/api-ref/source/share-migration.inc @@ -33,9 +33,20 @@ ends must set the ``driver_handles_share_servers`` parameter to action is not supported. You can configure a back end in the ``manila.conf`` file. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- @@ -58,9 +69,20 @@ Start Migration (Since version 2.15) Initiates share migration. This API will initiate the share data copy to the new host. The copy operation is non-disruptive. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- @@ -83,9 +105,20 @@ Complete Migration (Since version 2.15) Completes share migration. This API will initiate the switch-over from the source to destination share. This operation is disruptive. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- diff --git a/api-ref/source/share-networks.inc b/api-ref/source/share-networks.inc index 9d93306049..37d229ad1c 100644 --- a/api-ref/source/share-networks.inc +++ b/api-ref/source/share-networks.inc @@ -44,8 +44,18 @@ List share networks Lists all share networks. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 Request ------- @@ -79,8 +89,18 @@ List share networks with details Lists all share networks with details. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 Request ------- @@ -123,9 +143,19 @@ Show share network details Shows details for a share network. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -168,9 +198,20 @@ Create share network Creates a share network. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -entityTooLarge(413), unprocessableEntity(422) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 413 + - 422 Request ------- @@ -221,9 +262,20 @@ Add security service to share network Adds a security service to a share network. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- @@ -274,9 +326,19 @@ Remove security service from share network Removes a security service from a share network. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request @@ -329,9 +391,20 @@ Updates a share network. Note that if the share network is used by any share server, you can update only the ``name`` and ``description`` attributes. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), unprocessableEntity(422) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 422 Request ------- @@ -383,9 +456,20 @@ Delete share network Deletes a share network. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- diff --git a/api-ref/source/share-replicas.inc b/api-ref/source/share-replicas.inc index f9457dda50..154e4190e4 100644 --- a/api-ref/source/share-replicas.inc +++ b/api-ref/source/share-replicas.inc @@ -59,10 +59,19 @@ Create share replica Create a share replica for the share. -Normal response codes: 202 +Response codes +-------------- -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -111,10 +120,19 @@ Promote share replica Promotes a replica to ``active`` replica state. -Normal response codes: 202 +Response codes +-------------- -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -132,10 +150,19 @@ Resync share replica Resync a replica with its ``active`` mirror. -Normal response codes: 202 +Response codes +-------------- -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -153,10 +180,19 @@ List share replicas Lists share replicas. -Normal response codes: 200 +Response codes +-------------- -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -190,10 +226,19 @@ List share replicas with details Lists share replicas with details. -Normal response codes: 200 +Response codes +-------------- -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -233,10 +278,19 @@ Show share replica Show a share replica. -Normal response codes: 200 +Response codes +-------------- -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -280,10 +334,19 @@ Administrator only. Explicitly updates the ``status`` of a share replica. Use the ``policy.json`` file to grant permissions for this action to other roles. -Normal response codes: 202 +Response codes +-------------- -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -312,10 +375,19 @@ Administrator only. Explicitly updates the ``replica state`` of a share replica. Use the ``policy.json`` file to grant permissions for this action to other roles. -Normal response codes: 202 +Response codes +-------------- -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -341,10 +413,20 @@ Delete share replica Deletes a share replica. -Normal response codes: 202 +Response codes +-------------- -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 .. note:: @@ -369,10 +451,19 @@ Administrator only. Force-deletes a share replica in any state. Use the ``policy.json`` file to grant permissions for this action to other roles. -Normal response codes: 202 +Response codes +-------------- -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 .. note:: diff --git a/api-ref/source/share-servers.inc b/api-ref/source/share-servers.inc index 573a35be13..dd1884ef18 100644 --- a/api-ref/source/share-servers.inc +++ b/api-ref/source/share-servers.inc @@ -47,8 +47,18 @@ List share servers Lists all share servers. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 Request ------- @@ -84,9 +94,19 @@ Show share server details Shows details for a share server. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -128,9 +148,20 @@ Deletes a share server. An administrator can delete an active share server only if it contains no dependent shares. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- diff --git a/api-ref/source/share-types.inc b/api-ref/source/share-types.inc index 23b4ea7691..82cac99eea 100644 --- a/api-ref/source/share-types.inc +++ b/api-ref/source/share-types.inc @@ -92,7 +92,12 @@ List share types Lists all share types. -Normal response codes: 200 +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 Request ------- @@ -133,9 +138,19 @@ List default share types Lists default share types. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -172,9 +187,19 @@ Show share type detail Shows details for a specified share type. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -216,9 +241,19 @@ List extra specs Lists the extra specifications for a share type. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -255,9 +290,20 @@ Create share type Creates a share type. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- @@ -318,9 +364,19 @@ Shows access details for a share type. You can view access details for private share types only. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -357,9 +413,20 @@ keys it uses. For details, see `Capabilities and Extra-Specs `_ and documentation for your driver. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- @@ -397,9 +464,19 @@ Unset an extra spec Unsets an extra specification for the share type. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -420,9 +497,20 @@ Adds share type access for a project. You can add access to private share types only. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- @@ -449,9 +537,19 @@ Removes share type access from a project. You can remove access from private share types only. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -476,9 +574,19 @@ Delete share type Deletes a share type. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- diff --git a/api-ref/source/shares.inc b/api-ref/source/shares.inc index 1ec7e43c71..fd81fa2735 100644 --- a/api-ref/source/shares.inc +++ b/api-ref/source/shares.inc @@ -89,8 +89,18 @@ List shares Lists all shares. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 Request ------- @@ -145,9 +155,20 @@ List shares with details Lists all shares, with details. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- @@ -227,9 +248,19 @@ Show share details Shows details for a share. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -286,9 +317,21 @@ Create share Creates a share. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409), unprocessableEntity(422) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 + - 422 Request ------- @@ -366,9 +409,21 @@ Manage share Configures Shared File Systems to manage a share. This API is available for API versions later than or equal to 2.7 -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409), unprocessableEntity(422) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 + - 422 Request ------- @@ -450,9 +505,20 @@ You can update these attributes: If you try to update other attributes, they retain their previous values. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), unprocessableEntity(422) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 422 Request ------- @@ -518,9 +584,20 @@ Delete share Deletes a share. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- diff --git a/api-ref/source/snapshot-instances.inc b/api-ref/source/snapshot-instances.inc index ca98787714..3038304098 100644 --- a/api-ref/source/snapshot-instances.inc +++ b/api-ref/source/snapshot-instances.inc @@ -23,8 +23,18 @@ List share snapshot instances Lists all share snapshot instances. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 Request ------- @@ -57,8 +67,18 @@ List share snapshot instances with details Lists all share snapshot instances with details. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 Request ------- @@ -97,9 +117,19 @@ Show share snapshot instance details Shows details for a share snapshot instance. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -141,10 +171,19 @@ Administrator only. Explicitly updates the state of a share snapshot instance. Use the ``policy.json`` file to grant permissions for this action to other roles. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- diff --git a/api-ref/source/snapshots.inc b/api-ref/source/snapshots.inc index 4fcd610ed9..85aebf9d4e 100644 --- a/api-ref/source/snapshots.inc +++ b/api-ref/source/snapshots.inc @@ -46,8 +46,17 @@ List share snapshots Lists all share snapshots. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 Request ------- @@ -80,8 +89,17 @@ List share snapshots with details Lists all share snapshots with details. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 Request ------- @@ -121,8 +139,18 @@ Show share snapshot details Shows details for a share snapshot. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 404 Request ------- @@ -162,9 +190,20 @@ Create share snapshot Creates a snapshot from a share. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), unprocessableEntity(422) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 422 Request ------- @@ -215,9 +254,20 @@ Manage share snapshot (Since API v2.12) Configures Shared File Systems to manage a share snapshot. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- @@ -269,9 +319,20 @@ Unmanage share snapshot (Since API v2.12) Configures Shared File Systems to stop managing a share snapshot. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), conflict(409) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 409 Request ------- @@ -303,9 +364,19 @@ Administrator only. Explicitly updates the state of a share snapshot. Use the ``policy.json`` file to grant permissions for this action to other roles. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -333,9 +404,19 @@ Administrator only. Force-deletes a share snapshot in any state. Use the ``policy.json`` file to grant permissions for this action to other roles. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -371,9 +452,20 @@ You can update these attributes: If you try to update other attributes, they retain their previous values. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404), unprocessableEntity(422) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 + - 422 Request ------- @@ -420,9 +512,19 @@ Delete share snapshot Deletes a share snapshot. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- diff --git a/api-ref/source/status.yaml b/api-ref/source/status.yaml new file mode 100644 index 0000000000..9927a18564 --- /dev/null +++ b/api-ref/source/status.yaml @@ -0,0 +1,59 @@ + 200: + default: | + Request was successful. + 201: + default: | + Request has been fulfilled and new resource created. + 202: + default: | + Request is accepted, but processing may take some time. + 203: + default: | + Returned information is not full set, but a subset. + 204: + default: | + Request fulfilled but service does not return anything. + 300: + default: | + The resource corresponds to more than one representation. + 400: + default: | + Some content in the request was invalid. + 401: + default: | + User must authenticate before making a request. + 403: + default: | + Policy does not allow current user to do this operation. + 404: + default: | + The requested resource could not be found. + 405: + default: | + Method is not valid for this endpoint and resource. + 409: + default: | + This resource has an action in progress that would conflict with this request. + 413: + default: | + This operation cannot be completed. + 415: + default: | + The entity of the request is in a format not supported by the requested + resource for the method. + 422: + default: | + The entity of the request is in a format not processable by the requested + resource for the method. + 500: + default: | + Something went wrong with the service which prevents it from fulfilling + the request. + 501: + default: | + The service does not have the functionality required to fulfill this + request. + 503: + default: | + The service cannot handle the request right now. + diff --git a/api-ref/source/user-messages.inc b/api-ref/source/user-messages.inc index f34e22620d..8daa9aca70 100644 --- a/api-ref/source/user-messages.inc +++ b/api-ref/source/user-messages.inc @@ -25,8 +25,18 @@ List user messages Lists all user messages. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 Request ------- @@ -75,9 +85,19 @@ Show user message details Shows details for a user message. -Normal response codes: 200 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- @@ -116,9 +136,19 @@ Delete message Deletes a user message. -Normal response codes: 202 -Error response codes: badRequest(400), unauthorized(401), forbidden(403), -itemNotFound(404) +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 403 + - 404 Request ------- diff --git a/api-ref/source/versions.inc b/api-ref/source/versions.inc index dca29acd44..9dadfb4e52 100644 --- a/api-ref/source/versions.inc +++ b/api-ref/source/versions.inc @@ -32,7 +32,12 @@ the deployment. Links to more specific information will be provided for each API version, as well as information about supported min and max microversions. -Normal Response Codes: 300 +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 300 Response -------- @@ -74,7 +79,12 @@ This gets the details of a specific API at it's root. Nearly all this information exists at the API root, so this is mostly a redundant operation. -Normal Response Codes: 200 +Response codes +-------------- + +.. rest_status_code:: success status.yaml + + - 200 Request -------