• Identity and Access Management

iam
  1. Help Center
  2. Identity and Access Management
  3. API Reference
  4. Agency Management
  5. Querying an Agency List Based on the Specified Conditions

Querying an Agency List Based on the Specified Conditions

Function Description

This interface is used to query an agency list based on the specified conditions.

URI

  • URI format

    GET /v3.0/OS-AGENCY/agencies{?domain_id,name}

  • Query parameter description

    Parameter

    Mandatory

    Type

    Description

    domain_id

    Yes

    String

    ID of the current domain.

    name

    No

    String

    Name of an agency.

Request

  • Request header parameter description

    Parameter

    Mandatory

    Type

    Description

    Content-Type

    Yes

    String

    Fill application/json;charset=utf8 in this field.

    X-Auth-Token

    Yes

    String

    Authenticated token with the Security Administrator permission.

  • Sample request
    curl -i -k -H "X-Auth-Token:$token" -H 'Content-Type:application/json;charset=utf8' -X GET https://sample.domain.com/v3.0/OS-AGENCY/agencies?domain_id=0ae9c6993a2e47bb8c4c7a9bb8278d61

Response

  • Response body parameter description

    Parameter

    Mandatory

    Type

    Description

    agencies

    Yes

    JSONArray

    List of agencies.

  • Description for the agency format

    Parameter

    Mandatory

    Type

    Description

    id

    Yes

    String

    ID of an agency.

    name

    Yes

    String

    Name of an agency.

    domain_id

    Yes

    String

    ID of the current domain.

    trust_domain_id

    Yes

    String

    ID of the delegated domain.

    trust_domain_name

    Yes

    String

    Name of the delegated domain.

    description

    Yes

    String

    Description of an agency.

    duration

    Yes

    String

    Validity period of an agency. The default value is null, indicating that the agency is permanently valid.

    expire_time

    Yes

    String

    Expiration time of an agency.

    create_time

    Yes

    String

    Time when an agency is created.

  • Sample response (request successful)
    {
      "agencies": [
        {
          "trust_domain_name": "exampledomain",
          "description": " testsfdas ",
          "trust_domain_id": "b3f266d0c08544a0859740de8b84e850",
          "id": "afca8ddf2e92469a8fd26a635da5206f",
          "duration": null,
          "create_time": "2017-01-04T09:09:15.000000",
          "expire_time": null,
          "domain_id": "0ae9c6993a2e47bb8c4c7a9bb8278d61",
          "name": "exampleagency"
        }
      ]
    }
  • Sample response (request failed)
    {
      "error": {
        "message": "You are not authorized to perform the requested action: identity:list_agencies",
        "code": 403,
        "title": "Forbidden"
      }
    }

Status Codes

Status Code

Description

200

The request is successful.

401

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

403

You are forbidden to access the requested page.

404

The server could not find the requested page.

500

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