• Identity and Access Management

iam
  1. Help Center
  2. Identity and Access Management
  3. API Reference
  4. Agency Management
  5. Granting Permissions to an Agency on a Project

Granting Permissions to an Agency on a Project

Function Description

This interface is used to grant permissions to an agency on a project.

URI

  • URI format

    PUT /v3.0/OS-AGENCY/projects/{project_id}/agencies/{agency_id}/roles/{role_id}

  • URI parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    ID of a project under the current domain.

    agency_id

    Yes

    String

    ID of an agency.

    role_id

    Yes

    String

    ID of a role.

    NOTE:

    The role name corresponding to role_id in a request body is controlled by a blacklist. The role name cannot be secu_admin or te_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 PUT https://sample.domain.com/v3.0/OS-AGENCY/projects/0945241c5ebc4660bac540d48f2a2c14/agencies/37f90258b820472bbc8a0f4f0bfd720d/roles/0f3a2d418ed747fa8be46e92757be9ff

Response

  • No response: indicates that the response is successful.
  • Sample response (request failed)
    {
       "error" : {
           "message" : "Could not find role: 0f3a2d418ed747fa8be46e92757be9ddff",
           "code" : 404,
           "title" : "Not Found"
         }
    }

Status Codes

Status Code

Description

204

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.