"Fossies" - the Fresh Open Source Software Archive

Member "keystone-18.0.0/api-ref/source/v3/projects.inc" (14 Oct 2020, 8419 Bytes) of package /linux/misc/openstack/keystone-18.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) fasm source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "projects.inc" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 17.0.0_vs_18.0.0.

    1 .. -*- rst -*-
    2 
    3 ==========
    4  Projects
    5 ==========
    6 
    7 A project is the base unit of resource ownership. Resources are owned by a
    8 specific project. A project is owned by a specific domain.
    9 
   10 (Since Identity API v3.4) You can create a hierarchy of projects by setting a
   11 ``parent_id`` when you create a project. All projects in a hierarchy must be
   12 owned by the same domain.
   13 
   14 (Since Identity API v3.6) Projects may, in addition to acting as containers for
   15 OpenStack resources, act as a domain (by setting the attribute ``is_domain`` to
   16 ``true``), in which case it provides a namespace in which users, groups and
   17 other projects can be created. In fact, a domain created using the
   18 ``POST /domains`` API will actually be represented as a project with
   19 ``is_domain`` set to ``true`` with no parent (``parent_id`` is null).
   20 
   21 Given this, all projects are considered part of a project hierarchy. Projects
   22 created in a domain prior to v3.6 are represented as a two-level hierarchy,
   23 with a project that has ``is_domain`` set to ``true`` as the root and all other
   24 projects referencing the root as their parent.
   25 
   26 A project acting as a domain can potentially also act as a container for
   27 OpenStack resources, although this depends on whether the policy rule for the
   28 relevant resource creation allows this.
   29 
   30 .. note::
   31 
   32   A project's name must be unique within a domain and no more than 64 characters.
   33   A project's name must be able to be sent within valid JSON, which could be any
   34   UTF-8 character. However, this is constrained to the given backend where project
   35   names are stored. For instance, MySQL's restrictions states that UTF-8 support
   36   is constrained to the characters in the Basic Multilingual Plane (BMP).
   37   Supplementary characters are not permitted. Note that this last restriction is
   38   generally true for all ``names`` within resources of the Identity API.
   39   Creating a project without using a domain scoped token, i.e. using a project
   40   scoped token or a system scoped token, and also without specifying a domain or
   41   domain_id, the project will automatically be created on the default domain.
   42 
   43 
   44 List projects
   45 =============
   46 
   47 .. rest_method::  GET /v3/projects
   48 
   49 Lists projects.
   50 
   51 Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/projects``
   52 
   53 Request
   54 -------
   55 
   56 Parameters
   57 ~~~~~~~~~~
   58 
   59 .. rest_parameters:: parameters.yaml
   60 
   61    - domain_id: domain_id_query
   62    - enabled: project_enabled_query
   63    - is_domain: is_domain_query
   64    - name: project_name_query
   65    - parent_id: parent_id_query
   66 
   67 Response
   68 --------
   69 
   70 Parameters
   71 ~~~~~~~~~~
   72 
   73 .. rest_parameters:: parameters.yaml
   74 
   75    - links: link_collection
   76    - projects: projects
   77    - is_domain: is_domain_response_body
   78    - description: project_description_response_body
   79    - domain_id: project_domain_id_response_body
   80    - enabled: project_enabled_response_body
   81    - id: project_id
   82    - links: link_response_body
   83    - name: project_name_response_body
   84    - parent_id: project_parent_id_response_body
   85    - tags: response_body_project_tags_required
   86 
   87 Status Codes
   88 ~~~~~~~~~~~~
   89 
   90 .. rest_status_code:: success status.yaml
   91 
   92    - 200
   93 
   94 .. rest_status_code:: error status.yaml
   95 
   96    - 400
   97    - 401
   98    - 403
   99 
  100 Example
  101 ~~~~~~~
  102 
  103 .. literalinclude:: ./samples/admin/projects-list-response.json
  104    :language: javascript
  105 
  106 
  107 Create project
  108 ==============
  109 
  110 .. rest_method::  POST /v3/projects
  111 
  112 Creates a project, where the project may act as a domain.
  113 
  114 Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/projects``
  115 
  116 Request
  117 -------
  118 
  119 Parameters
  120 ~~~~~~~~~~
  121 
  122 .. rest_parameters:: parameters.yaml
  123 
  124    - project: project
  125    - name: project_name_request_body
  126    - is_domain: is_domain_request_body
  127    - description: project_description_request_body
  128    - domain_id: project_domain_id_request_body
  129    - enabled: project_enabled_request_body
  130    - parent_id: project_parent_id_request_body
  131    - tags: project_tags_request_body
  132    - options: request_project_options_body_not_required
  133 
  134 Examples
  135 ~~~~~~~~
  136 
  137 Sample for creating a regular project:
  138 
  139 .. literalinclude:: ./samples/admin/project-create-request.json
  140    :language: javascript
  141 
  142 Sample for creating a project that also acts as a domain:
  143 
  144 .. literalinclude:: ./samples/admin/project-create-domain-request.json
  145    :language: javascript
  146 
  147 Response
  148 --------
  149 
  150 Parameters
  151 ~~~~~~~~~~
  152 
  153 .. rest_parameters:: parameters.yaml
  154 
  155    - project: project
  156    - is_domain: is_domain_response_body
  157    - description: project_description_response_body
  158    - domain_id: project_domain_id_response_body
  159    - enabled: project_enabled_response_body
  160    - id: project_id
  161    - links: link_response_body
  162    - name: project_name_response_body
  163    - parent_id: project_parent_id_response_body
  164    - options: response_project_options_body_required
  165 
  166 Status Codes
  167 ~~~~~~~~~~~~
  168 
  169 .. rest_status_code:: success status.yaml
  170 
  171    - 201
  172 
  173 .. rest_status_code:: error status.yaml
  174 
  175    - 400
  176    - 401
  177    - 403
  178    - 409
  179 
  180 Show project details
  181 ====================
  182 
  183 .. rest_method::  GET /v3/projects/{project_id}
  184 
  185 Shows details for a project.
  186 
  187 Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/project``
  188 
  189 Request
  190 -------
  191 
  192 Parameters
  193 ~~~~~~~~~~
  194 
  195 .. rest_parameters:: parameters.yaml
  196 
  197    - project_id: project_id_path
  198    - parents_as_list: parents_as_list
  199    - subtree_as_list: subtree_as_list
  200    - parents_as_ids: parents_as_ids
  201    - subtree_as_ids: subtree_as_ids
  202    - include_limits: include_limits
  203 
  204 Response
  205 --------
  206 
  207 Parameters
  208 ~~~~~~~~~~
  209 
  210 .. rest_parameters:: parameters.yaml
  211 
  212    - project: project
  213    - is_domain: is_domain_response_body
  214    - description: project_description_response_body
  215    - domain_id: project_domain_id_response_body
  216    - enabled: project_enabled_response_body
  217    - id: project_id
  218    - links: link_response_body
  219    - name: project_name_response_body
  220    - parent_id: project_parent_id_response_body
  221    - options: response_project_options_body_required
  222 
  223 Status Codes
  224 ~~~~~~~~~~~~
  225 
  226 .. rest_status_code:: success status.yaml
  227 
  228    - 200
  229 
  230 .. rest_status_code:: error status.yaml
  231 
  232    - 400
  233    - 401
  234    - 403
  235    - 404
  236 
  237 Example
  238 ~~~~~~~
  239 
  240 .. literalinclude:: ./samples/admin/project-show-response.json
  241    :language: javascript
  242 
  243 Example with ``parents_as_list``
  244 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  245 
  246 .. literalinclude:: ./samples/admin/project-show-parents-response.json
  247    :language: javascript
  248 
  249 Example with ``subtree_as_list``
  250 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  251 
  252 .. literalinclude:: ./samples/admin/project-show-subtree-response.json
  253    :language: javascript
  254 
  255 
  256 Update project
  257 ==============
  258 
  259 .. rest_method::  PATCH /v3/projects/{project_id}
  260 
  261 Updates a project.
  262 
  263 Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/project``
  264 
  265 Request
  266 -------
  267 
  268 Parameters
  269 ~~~~~~~~~~
  270 
  271 .. rest_parameters:: parameters.yaml
  272 
  273    - project_id: project_id_path
  274    - project: project
  275    - name: project_name_update_request_body
  276    - is_domain: is_domain_request_body
  277    - description: project_description_request_body
  278    - domain_id: project_domain_id_update_request_body
  279    - enabled: project_enabled_update_request_body
  280    - tags: project_tags_request_body
  281    - options: request_project_options_body_not_required
  282 
  283 Example
  284 ~~~~~~~
  285 
  286 .. literalinclude:: ./samples/admin/project-update-request.json
  287    :language: javascript
  288 
  289 Response
  290 --------
  291 
  292 Parameters
  293 ~~~~~~~~~~
  294 
  295 .. rest_parameters:: parameters.yaml
  296 
  297    - project: project
  298    - is_domain: is_domain_response_body
  299    - description: project_description_response_body
  300    - domain_id: project_domain_id_response_body
  301    - enabled: project_enabled_response_body
  302    - id: project_id
  303    - name: project_name_response_body
  304    - links: link_response_body
  305    - parent_id: project_parent_id_response_body
  306    - options: response_project_options_body_required
  307 
  308 
  309 Status Codes
  310 ~~~~~~~~~~~~
  311 
  312 .. rest_status_code:: success status.yaml
  313 
  314    - 200
  315 
  316 .. rest_status_code:: error status.yaml
  317 
  318    - 400
  319    - 401
  320    - 403
  321    - 404
  322    - 409
  323 
  324 Example
  325 ~~~~~~~
  326 
  327 .. literalinclude:: ./samples/admin/project-update-response.json
  328    :language: javascript
  329 
  330 
  331 Delete project
  332 ==============
  333 
  334 .. rest_method::  DELETE /v3/projects/{project_id}
  335 
  336 Deletes a project.
  337 
  338 Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/project``
  339 
  340 Request
  341 -------
  342 
  343 Parameters
  344 ~~~~~~~~~~
  345 
  346 .. rest_parameters:: parameters.yaml
  347 
  348    - project_id: project_id_path
  349 
  350 Response
  351 --------
  352 
  353 Status Codes
  354 ~~~~~~~~~~~~
  355 
  356 .. rest_status_code:: success status.yaml
  357 
  358    - 204
  359 
  360 .. rest_status_code:: error status.yaml
  361 
  362    - 400
  363    - 401
  364    - 403
  365    - 404