Identity API v2.0 extensions (DEPRECATED)

Identity API v2.0 extensions (DEPRECATED)

OS-KSADM admin extension

Supports create, read, update, and delete (CRUD) operations for roles, and services. Requires administrator privileges.

PUT
/v2.0/users/{user_id}/OS-KSADM/enabled

Enable (Disable) user

Enables or disables a user.

Normal response codes: 200 Error response codes: 413,415,405,404,403,401,400,503,409

Request

Name In Type Description
user_id path string The user ID.
enabled body boolean Indicates whether the user should be enabled (true) or disabled(false).

Request Example

{
    "user": {
        "enabled": true
    }
}

Response Parameters

Name In Type Description
user body string The user object.
email body string The user email.
enabled body boolean Indicates whether the user should be enabled (true) or disabled(false).
id body string The user ID.
name body string The user in-real-life name.
username body string The user in-real-life name.
tenantId body string The tenant ID.

Response Example

{
    "user": {
        "id": "3c9530e",
        "name": "admin",
        "email": "[email protected]",
        "username": "admin",
        "enabled": true,
        "tenantId": "1ca8e0"
    }
}
PUT
/v2.0/users/{user_id}/OS-KSADM/password

Set user password

Sets a user’s password

Normal response codes: 200 Error response codes: 413,415,405,404,403,401,400,503,409

Request

Name In Type Description
user_id path string The user ID.
password body string User’s new password

Request Example

{
    "user": {
        "password": "new_password"
    }
}

Response Parameters

Name In Type Description
user body string The user object.
enabled body boolean Indicates whether the user should be enabled (true) or disabled(false).
email body string The user email.
name body string The user in-real-life name.
username body string The user in-real-life name.
id body string The user ID.
tenantId body string The tenant ID.

Response Example

{
    "user": {
        "id": "3c9530e",
        "name": "admin",
        "email": "[email protected]",
        "username": "admin",
        "enabled": true,
        "tenantId": "1ca8e0"
    }
}
PUT
/v2.0/users/{user_id}/OS-KSADM/tenant

Update user tenant

Sets a user’s tenant

Normal response codes: 200

Error response codes: 413, 415, 405, 404, 403, 401, 400, 503, 409

Request

Name In Type Description
user_id path string The user ID.
tenantId body string The tenant ID.

Request Example

{
    "user": {
        "tenantId": "1ca8e0"
    }
}

Response Parameters

Name In Type Description
user body string The user object.
email body string The user email.
enabled body boolean Indicates whether the user should be enabled (true) or disabled(false).
tenant body string The tenant ID.
id body string The user ID.
name body string The user in-real-life name.
username body string The user in-real-life name.
tenantId body string The tenant ID.

Response Example

{
    "user": {
        "id": "3c9530e",
        "name": "admin",
        "email": "[email protected]",
        "username": "admin",
        "enabled": true,
        "tenantId": "1ca8e0"
    }
}
POST
/v2.0/OS-KSADM/services

Create service (admin extension)

Creates a service.

Normal response codes: 201 Error response codes: 413,415,405,404,403,401,400,503,409

Request Example

{
    "OS-KSADM:service": {
        "id": "123",
        "name": "nova",
        "type": "compute",
        "description": "OpenStack Compute Service"
    }
}

Response Parameters

Name In Type Description
Location (Optional) header string  
type body string The type of the service.
description body string Description about the service.
name body string The service name.
id body string The ID of the service.
GET
/v2.0/OS-KSADM/services

List services (admin extension)

Lists all services.

Normal response codes: 200,203 Error response codes: 413,405,404,403,401,400,503

Response Parameters

Name In Type Description
type body string The type of the service.
description body string Description about the service.
name body string The service name.
id body string The ID of the service.

Response Example

{
    "OS-KSADM:services": [
        {
            "id": "123",
            "name": "nova",
            "type": "compute",
            "description": "OpenStack Compute Service"
        },
        {
            "id": "234",
            "name": "glance",
            "type": "image",
            "description": "OpenStack Image Service"
        }
    ],
    "OS-KSADM:services_links": []
}
GET
/v2.0/OS-KSADM/services/{service_id}

Shows service information by ID

Shows information for a service, by ID.

Normal response codes: 200,203 Error response codes: 413,405,404,403,401,400,503

Request

Name In Type Description
service_id path string The service ID.

Response Parameters

Name In Type Description
type body string The type of the service.
description body string Description about the service.
name body string The service name.
id body string The ID of the service.

Response Example

{
    "OS-KSADM:service": {
        "id": "123",
        "name": "nova",
        "type": "compute",
        "description": "OpenStack Compute Service"
    }
}
GET
/v2.0/OS-KSADM/services/{serviceName}

Show service information by name

Shows information for a service, by name.

Normal response codes: 200,203 Error response codes: 413,405,404,403,401,400,503

Response Parameters

Name In Type Description
serviceName path string The service name.
type body string The type of the service.
description body string Description about the service.
name body string The service name.
id body string The ID of the service.

Response Example

{
    "OS-KSADM:service": {
        "id": "123",
        "name": "nova",
        "type": "compute",
        "description": "OpenStack Compute Service"
    }
}
DELETE
/v2.0/OS-KSADM/services/{service_id}

Delete service (admin extension)

Deletes a service.

Normal response codes: 204 Error response codes: 413,415,405,404,403,401,400,503,409

Request

Name In Type Description
service_id path string The service ID.
POST
/v2.0/OS-KSADM/roles

Create a role

Creates a role.

Normal response codes: 201 Error response codes: 413,415,405,404,403,401,400,503,409

Request Example

{
    "role": {
        "id": "123",
        "name": "Guest",
        "description": "Guest Access"
    }
}

Response Parameters

Name In Type Description
Location (Optional) header string  
GET
/v2.0/OS-KSADM/roles

List all roles

Lists all roles.

Normal response codes: 200,203 Error response codes: 413,405,404,403,401,400,503

Response Parameters

Name In Type Description
role_links body object Role links.
roles body string A roles object.
description body string The role description.
name body string The role name.
id body integer The role ID.

Response Example

{
    "roles": [
        {
            "id": "123",
            "name": "compute:admin",
            "description": "Nova Administrator"
        }
    ],
    "roles_links": []
}
GET
/v2.0/OS-KSADM/roles/{role_id}

Show a role

Shows details for a role.

Normal response codes: 200,203 Error response codes: 413,415,405,404,403,401,400,503,409

Request

Name In Type Description
role_id path string The role ID.

Response Parameters

Name In Type Description
Location (Optional) header string  
description body string The role description.
name body string The role name.
id body integer The role ID.

Response Example

{
    "role": {
        "id": "123",
        "name": "Guest",
        "description": "Guest Access"
    }
}
GET
/v2.0/OS-KSADM/roles/{role_name}

Show role information by name

Shows information for a role, by name.

Normal response codes: 200,203 Error response codes: 413,415,405,404,403,401,400,503,409

Response Parameters

Name In Type Description
Location (Optional) header string  
role_name path string The role name.
description body string The role description.
name body string The role name.
id body integer The role ID.

Response Example

{
    "role": {
        "id": "123",
        "name": "Guest",
        "description": "Guest Access"
    }
}
DELETE
/v2.0/OS-KSADM/roles/{role_id}

Delete a role

Deletes a role.

Normal response codes: 204 Error response codes: 413,415,405,404,403,401,400,503,409

Request

Name In Type Description
role_id path string The role ID.
PUT
/v2.0/tenants/{tenant_id}/users/{user_id}/roles/OS-KSADM/{role_id}

Grant roles to user on tenant

Grants a role to a user for a tenant.

Normal response codes: 201 Error response codes: 413,415,405,404,403,401,400,503,409

Request

Name In Type Description
user_id path string The user ID.
role_id path string The role ID.
tenant_id path string The tenant ID.
DELETE
/v2.0/tenants/{tenant_id}/users/{user_id}/roles/OS-KSADM/{role_id}

Revoke role from user on tenant

Revokes a role from a user for a tenant.

Normal response codes: 204 Error response codes: 413,415,405,404,403,401,400,503,409

Request

Name In Type Description
user_id path string The user ID.
role_id path string The role ID.
tenant_id path string The tenant ID.

OS-KSEC2 admin extension

Supports Amazon Elastic Compute (EC2) style authentication.

POST
/v2.0/users/{userId}/OS-KSADM/credentials

Grant credential to user

Grants a credential to a user.

Normal response codes: 201

Error response codes: 413,415,405,404,403,401,400,503,409,

Request

Name In Type Description
userId path string The user ID.

Request Example

{
    "OS-KSEC2-ec2Credentials": {
        "username": "test_user",
        "secret": "secretsecret",
        "signature": "bbb"
    }
}
GET
/v2.0/users/{userId}/OS-KSADM/credentials

List credentials (EC2 extension)

Lists credentials.

Normal response codes: 200

Error response codes: 413,405,404,403,401,400,503,

Request

Name In Type Description
userId path string The user ID.

Response Example

{
    "credentials": [
        {
            "passwordCredentials": {
                "username": "test_user",
                "password": "secretsecret"
            }
        },
        {
            "OS-KSEC2-ec2Credentials": {
                "username": "test_user",
                "secret": "secretsecret",
                "signature": "bbb"
            }
        }
    ],
    "credentials_links": []
}
POST
/v2.0/users/{userId}/OS-KSADM/credentials/OS-KSEC2:ec2Credentials

Update user credentials

Updates credentials for a user.

Normal response codes: 200

Error response codes: 415,405,404,403,401,400,503,409,

Request

Name In Type Description
userId path string The user ID.

Request Example

{
    "OS-KSEC2-ec2Credentials": {
        "username": "test_user",
        "secret": "secretsecret",
        "signature": "bbb"
    }
}

Response Example

{
    "OS-KSEC2-ec2Credentials": {
        "username": "test_user",
        "secret": "secretsecret",
        "signature": "bbb"
    }
}
DELETE
/v2.0/users/{userId}/OS-KSADM/credentials/OS-KSEC2:ec2Credentials

Delete user credentials

Deletes user credentials.

Normal response codes: 204

Error response codes: 413,415,405,404,403,401,400,503,409,

Request

Name In Type Description
userId path string The user ID.
GET
/v2.0/users/{userId}/OS-KSADM/credentials/OS-KSEC2:ec2Credentials

Get user credentials

Gets user credentials.

Normal response codes: 200

Error response codes: 413,405,404,403,401,400,503,

Request

Name In Type Description
userId path string The user ID.

Response Example

{
    "OS-KSEC2-ec2Credentials": {
        "username": "test_user",
        "secret": "secretsecret",
        "signature": "bbb"
    }
}
GET
/v2.0/users/{userId}/OS-KSADM/credentials/OS-KSEC2:ec2Credentials/{type}

List credentials by type

Lists credentials by type.

Normal response codes: 200

Error response codes: 413,405,404,403,401,400,503,

Request

Name In Type Description
userId path string The user ID.
type path string The credential type.

Response Example

{
    "credentials": [
        {
            "passwordCredentials": {
                "username": "test_user",
                "password": "secretsecret"
            }
        }
    ],
    "credentials_links": []
}

OS-KSCRUD extension

Supports password changing for a user by themselves

PATCH
/v2.0/OS-KSCRUD/users/{userId}

Change user’s own password

Changes user’s own password and returns the new token

Normal response codes: 200

Request

Name In Type Description
userId path string The user ID.
user body string The user object.
original_password body string User’s old password
password body string User’s new password
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.