From e8eeb433e1fe80f5087909888ec111e6ea80e1f1 Mon Sep 17 00:00:00 2001 From: Henry Nash Date: Mon, 18 Jul 2016 23:40:35 +0100 Subject: [PATCH] Clean up api-ref for domains Change-Id: Ia829c95945ae13e481a773815065bd2372b5895b --- api-ref/source/v3/domains.inc | 68 ++++++++--------- api-ref/source/v3/parameters.yaml | 120 ++++++++++++++++++++++++------ 2 files changed, 128 insertions(+), 60 deletions(-) diff --git a/api-ref/source/v3/domains.inc b/api-ref/source/v3/domains.inc index e37ae3eb40..1c4e75740c 100644 --- a/api-ref/source/v3/domains.inc +++ b/api-ref/source/v3/domains.inc @@ -38,20 +38,20 @@ Request .. rest_parameters:: parameters.yaml - - name: name - - enabled: enabled + - name: domain_name_query + - enabled: domain_enabled_query Response Parameters ------------------- .. rest_parameters:: parameters.yaml - - name: name - - links: links - - enabled: enabled - domains: domains - - id: id - - description: description + - description: domain_description_response_body + - enabled: domain_enabled_response_body + - id: domain_id_response_body + - links: domain_link_response_body + - name: domain_name_response_body Response Example ---------------- @@ -76,10 +76,10 @@ Request .. rest_parameters:: parameters.yaml - domain: domain - - enabled: enabled - - description: description - - name: name - + - enabled: domain_enabled_request_body + - description: domain_description_request_body + - name: domain_name_request_body + Request Example --------------- @@ -92,11 +92,11 @@ Response Parameters .. rest_parameters:: parameters.yaml - domain: domain - - name: name - - links: links - - enabled: enabled - - id: id - - description: description + - description: domain_description_response_body + - enabled: domain_enabled_response_body + - id: domain_id_response_body + - links: domain_link_response_body + - name: domain_name_response_body Show domain details @@ -114,7 +114,7 @@ Request .. rest_parameters:: parameters.yaml - - domain_id: domain_id + - domain_id: domain_id_path Response Parameters ------------------- @@ -122,11 +122,11 @@ Response Parameters .. rest_parameters:: parameters.yaml - domain: domain - - name: name - - links: links - - enabled: enabled - - id: id - - description: description + - description: domain_description_response_body + - enabled: domain_enabled_response_body + - id: domain_id_response_body + - links: domain_link_response_body + - name: domain_name_response_body Response Example ---------------- @@ -150,11 +150,11 @@ Request .. rest_parameters:: parameters.yaml + - domain_id: domain_id_path - domain: domain - - enabled: enabled - - description: description - - name: name - - domain_id: domain_id + - enabled: domain_enabled_update_request_body + - description: domain_description_update_request_body + - name: domain_name_update_request_body Request Example --------------- @@ -168,11 +168,11 @@ Response Parameters .. rest_parameters:: parameters.yaml - domain: domain - - name: name - - links: links - - enabled: enabled - - id: id - - description: description + - description: domain_description_response_body + - enabled: domain_enabled_response_body + - id: domain_id_response_body + - links: domain_link_response_body + - name: domain_name_response_body Response Example ---------------- @@ -195,10 +195,6 @@ When you delete a domain, this call also deletes all entities owned by it, such as users, groups, and projects, and any credentials and granted roles that relate to those entities. -(Since v3.6) The deletion of a non-leaf domain in a domain -hierarchy tree is not allowed and fails with a ``Bad Request -(400)`` response code. - If you try to delete an enabled domain, this call returns the ``Forbidden (403)`` response code. @@ -210,4 +206,4 @@ Request .. rest_parameters:: parameters.yaml - - domain_id: domain_id + - domain_id: domain_id_path diff --git a/api-ref/source/v3/parameters.yaml b/api-ref/source/v3/parameters.yaml index 0b25aa5693..e0d8890f67 100644 --- a/api-ref/source/v3/parameters.yaml +++ b/api-ref/source/v3/parameters.yaml @@ -136,12 +136,26 @@ user_id_path: type: string # variables in query +domain_enabled_query: + description: | + If set to true, then only domains that are enabled will be returned, if set + to false only that are disabled will be returned. Any value other than + ``0``, including no value, will be interpreted as true. + in: query + required: false + type: string domain_id_query: description: | Filters the response by a domain ID. in: query required: false type: string +domain_name_query: + description: | + Filters the response by a domain name. + in: query + required: false + type: string effective_query: description: | Returns the effective assignments, including any assignments gained by @@ -476,7 +490,7 @@ description_9: type: string domain: description: | - A ``domain`` object. + A ``domain`` object, containing: in: body required: true type: object @@ -494,6 +508,56 @@ domain_2: in: body required: false type: object +domain_description_request_body: + description: | + The description of the domain. + in: body + required: false + type: string +domain_description_response_body: + description: | + The description of the domain. + in: body + required: true + type: string +domain_description_update_request_body: + description: | + The new description of the domain. + in: body + required: false + type: string +domain_enabled_request_body: + description: | + If set to ``true``, domain is created enabled. If set to + ``false``, domain is created disabled. The default is ``true``. + + Users can only authorize against an enabled domain (and any of its + projects). In addition, users can only authenticate if the domain that owns + them is also enabled. Disabling a domain prevents both of these things. + in: body + required: false + type: string +domain_enabled_response_body: + description: | + If set to ``true``, domain is enabled. If set to + ``false``, domain is disabled. + in: body + required: true + type: string +domain_enabled_update_request_body: + description: | + If set to ``true``, domain is enabled. If set to + ``false``, domain is disabled. The default is ``true``. + + Users can only authorize against an enabled domain (and any of its + projects). In addition, users can only authenticate if the domain that owns + them is also enabled. Disabling a domain prevents both of these things. + When you disable a domain, all tokens that are authorized for that domain + become no longer valid. If you reenable the domain, these tokens + are not re-enabled. + in: body + required: false + type: string domain_id_1: description: | The ID of the domain that owns the group. If you @@ -534,9 +598,39 @@ domain_id_6: in: body required: true type: string +domain_id_response_body: + description: | + The ID of the domain. + in: body + required: true + type: string +domain_link_response_body: + description: | + The links to the ``domain`` resource. + in: body + required: true + type: object +domain_name_request_body: + description: | + The name of the domain. + in: body + required: true + type: string +domain_name_response_body: + description: | + The name of the domain. + in: body + required: true + type: string +domain_name_update_request_body: + description: | + The new name of the domain. + in: body + required: false + type: string domains: description: | - A ``domains`` object. + A list of ``domain`` objects, each containing: in: body required: true type: array @@ -598,22 +692,6 @@ enabled_10: in: body required: true type: boolean -enabled_12: - description: | - Indicates whether the domain is enabled or - disabled. If set to ``true``, the domain is enabled. Users can - authorize against an enabled domain and any of its projects. Users - that are owned by an enabled domain can authenticate and receive - additional authorization. If set to ``false``, the domain is - disabled. Users cannot authorize against a disabled domain or any - of its projects. Users that are owned by a disabled domain cannot - authenticate or receive additional authorization. All tokens that - are authorized for a disabled domain or its projects become no - longer valid. If you reenable the domain, these tokens are not re- - enabled. - in: body - required: true - type: boolean enabled_13: description: | If set to ``true``, project is enabled. If set to @@ -991,12 +1069,6 @@ links: in: body required: true type: object -links_1: - description: | - The links for the ``domain`` resource. - in: body - required: true - type: object links_10: description: | The links for the ``credentials`` resource.