Add User

 
MethodURIDescription
POST/v2.0/users

Adds a user.

Normal response codes: 201

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

 Request

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

NameTypeDescription

X-Auth-Token

​String

(Required)

A valid authentication token for an administrative user.

This table shows the body parameters for the add user request:

NameTypeDescription

name

​String

(Optional)

The user name.

 

Example 4.3. Add User: XML request

<?xml version="1.0" encoding="UTF-8"?>
<user xmlns="http://docs.openstack.org/identity/api/v2.0"
      xmlns:OS-KSADM="http://docs.openstack.org/identity/api/ext/OS-KSADM/v1.0"
      enabled="true" email="[email protected]"
      name="jqsmith"
      OS-KSADM:password="secrete"/>

 

Example 4.4. Add User: JSON request

{
  "user": {
    "name": "jqsmith",
    "email": "[email protected]",
    "enabled": true,
    "OS-KSADM:password": "secrete"
  }
}

 Response
 

Example 4.5. Add User: XML response

<?xml version="1.0" encoding="UTF-8"?>
<user xmlns="http://docs.openstack.org/identity/api/v2.0"
      enabled="true" email="[email protected]"
      name="jqsmith" id="u1000"/>

 

Example 4.6. Add User: JSON response

{
  "user": {
    "id": "u1000",
    "name": "jqsmith",
    "email": "[email protected]",
    "enabled": true
  }
}

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

loading table of contents...