This API is used to create a user under a domain.
POST /v3/users
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. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Yes |
Object |
User information. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
A username with 5 to 32 characters. The username can contain special characters, but only hyphens (-), underscores (_), and periods (.) are allowed. It cannot start with a digit. |
domain_id |
No |
String |
ID of the domain where a user is located. |
enabled |
No |
Boolean |
Whether a user is enabled. true (default value) indicates that the user is enabled. false indicates that the user is disabled. |
password |
No |
String |
Password of the user. The password must meet the following requirements:
|
default_project_id |
No |
String |
Default project ID of a user. |
description |
No |
String |
Description of the user. |
POST https://sample.domain.com/v3/users { "user": { "name": "IAMUser", "domain_id": "d78cbac186b744899480f25bd02...", "enabled": true, "password": "IAMPassword@", "description": "IAMDescription" } }
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
user |
Yes |
JSON object |
User object. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enabled |
Yes |
Boolean |
Whether a user is enabled. true (default value) indicates that the user is enabled. false indicates that the user is disabled. |
id |
Yes |
String |
User ID. |
domain_id |
Yes |
String |
ID of the domain where a user is located. |
name |
Yes |
String |
Username. |
links |
Yes |
JSON object |
User resource link. |
default_project_id |
No |
String |
Default project ID of a user. |
password_expires_at |
Yes |
String |
UTC when the password will expire. null indicates that the password has unlimited validity. |
{ "user": { "name": "jamesdoe", "links": { "self": "https://sample.domain.com/v3/users/614d1d2fb86940faab8f350bf1b9dbac" }, "domain_id": "88b16b6440684467b8825d7d96e154d8", "enabled": true, "id": "614d1d2fb86940faab8f350bf1b9dbac", "default_project_id": "acf2ffabba974fae8f30378ffde2cfa6", "password_expires_at": null } }
Status Code |
Description |
---|---|
201 |
The user is successfully created. |
400 |
The server failed to process the request. |
401 |
Authentication failed. |
403 |
Access denied. |
404 |
The requested resource cannot be found. |
405 |
The method specified in the request is not allowed for the requested resource. |
409 |
A resource conflict occurs. |
413 |
The request entity is too large. |
500 |
Internal server error. |
503 |
Service unavailable. |