• Identity and Access Management

iam
  1. Help Center
  2. Identity and Access Management
  3. API Reference
  4. Custom Role Management
  5. Deleting Custom Roles

Deleting Custom Roles

Function Description

This interface is used to delete a custom role.

URI

  • URI format

    DELETE /v3.0/OS-ROLE/roles/{role_id}

  • URI parameter description

    Parameter

    Mandatory

    Type

    Description

    role_id

    Yes

    String

    ID of a role.

Request

  • Request header parameter description

    Parameter

    Mandatory

    Type

    Description

    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 DELETE https://10.22.44.158:31943/v3.0/OS-ROLE/roles/9698542758bc422088c0c3eabfc30d12

Response

  • Error response body parameter description

    Parameter

    Mandatory

    Type

    Description

    error

    Yes

    Dict

    Response failed

    message

    Yes

    String

    Error details

    code

    Yes

    Int

    Status code

    title

    Yes

    String

    Error type

  • Sample response (failed response)
{
    "error": {
        "message": "The request you have made requires authentication.",
        "code": 401,
        "title": "Unauthorized"
    }
}

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.

500

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