Add user Credential

 
MethodURIDescription
POST/v2.0/users/{userId}/OS-RAX-KSKEY/credentials

Adds a credential to a user.

Normal response codes: 201

Error response codes: identityFault (400, 500, ), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), serviceUnavailable (503), badMediaType (415), itemNotFound (404)

 Request

This table shows the header parameters for the add user credential request:

NameTypeDescription

X-Auth-Token

​String

(Required)

A valid authentication token for an administrative user.

This table shows the URI parameters for the add user credential request:

NameTypeDescription

{userId}

​String

The user ID.

 

Example 6.17. Add user Credential: XML request

<?xml version="1.0" encoding="UTF-8"?>
<apiKeyCredentials
    xmlns="http://docs.rackspace.com/identity/api/ext/RAX-KSKEY/v1.0"
    username="testuser"
    apiKey="aaaaa-bbbbb-ccccc-12345678"/>

 

Example 6.18. Add user Credential: JSON request

{
    "RAX-KSKEY:apiKeyCredentials":{
        "username": "test_user",
        "apiKey": "aaaaa-bbbbb-ccccc-12345678"
    }
}

 Response
 

Example 6.19. Add user Credential: XML response

<?xml version="1.0" encoding="UTF-8"?>
<apiKeyCredentials
    xmlns="http://docs.rackspace.com/identity/api/ext/RAX-KSKEY/v1.0"
    username="testuser"
    apiKey="aaaaa-bbbbb-ccccc-12345678"/>

 

Example 6.20. Add user Credential: JSON response

{
    "RAX-KSKEY:apiKeyCredentials":{
        "username": "test_user",
        "apiKey": "aaaaa-bbbbb-ccccc-12345678"
    }
}

Questions? Discuss on ask.openstack.org
Found an error? Report a bug against this page

loading table of contents...