• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Keystone
  5. Project
  6. Querying the List of Projects Accessible to Users

Querying the List of Projects Accessible to Users

Function Description

This interface is used to query the list of projects accessible to users.

URI

URI format

GET /v3/auth/projects

Request

  • Request header parameter description

    Parameter

    Mandatory

    Type

    Description

    X-Auth-Token

    Yes

    String

    An authenticated token of the user.

  • Sample request
    curl -i -k -H 'Accept:application/json' -H 'Content-Type:application/json;charset=utf8' -H "X-Auth-Token:$token" -X GET /v3/auth/projects

Response

  • Response body parameter description

    Parameter

    Mandatory

    Type

    Description

    projects

    Yes

    array

    List of projects.

    links

    Yes

    Object

    Link to a resource.

  • Description for the project format

    Parameter

    Mandatory

    Type

    Description

    description

    Yes

    String

    Project description.

    id

    Yes

    String

    Project ID.

    domain_id

    Yes

    String

    ID of the domain where a project is located.

    name

    Yes

    String

    Project name.

    links

    Yes

    Object

    Links to a project resource.

    is_domain

    Yes

    Boolean

    Is domain or not.

    enabled

    Yes

    Boolean

    Whether a project is available.

    parent_id

    Yes

    String

    Parent ID of the project.

  • Sample response
    {
      "links": {
        "self": "www.example.com/v3/auth/projects",
        "previous": null,
        "next": null
      },
      "projects": [
        {
          "is_domain": false,
          "description": "",
          "links": {
            "self": "www.example.com/v3/projects/9041929bcc6e4bfe85add4e7b96ffdd7"
          },
          "enabled": true,
          "id": "9041929bcc6e4bfe85add4e7b96ffdd7",
          "parent_id": "398998b5392f4150ad48fe456d6de4f1",
          "domain_id": "398998b5392f4150ad48fe456d6de4f1",
          "name": "region"
        },
        {
          "is_domain": false,
          "description": "",
          "links": {
            "self": "www.example.com/v3/projects/ee65ca70d3cf43aaa1ea6492ce15f289"
          },
          "enabled": true,
          "id": "ee65ca70d3cf43aaa1ea6492ce15f289",
          "parent_id": "398998b5392f4150ad48fe456d6de4f1",
          "domain_id": "398998b5392f4150ad48fe456d6de4f1",
          "name": "MOS"
        }
      ]
    }

Status Codes

Status Code

Description

200

The request is successful.

400

The server failed to process the request.

401

You must enter a username and password to access the requested page.

403

You are forbidden to access the requested page.

405

You are not allowed to use the method specified in the request.

413

The request entity is too large.

500

Failed to complete the request because of an internal service error.

503

Failed to complete the request because the service is unavailable.