Creating a User
POST /v2/users/
Fields
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The UAA guid of the user to create.
|
|
|
- guid-ef7e740a-3a65-4948-8218-a16a1007cc89
|
default_space_guid
|
The guid of the default space for apps created by this user.
|
|
|
|
admin
|
Whether the user is an admin (Use UAA instead).
|
|
|
|
Request
Headers
Route
POST /v2/users
Body
{
"guid": "guid-ef7e740a-3a65-4948-8218-a16a1007cc89"
}
cURL
curl "https://api.[your-domain.com]/v2/users" -d '{
"guid": "guid-ef7e740a-3a65-4948-8218-a16a1007cc89"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk5IiwiZW1haWwiOiJlbWFpbC04OEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE2NTI2NzAxfQ.g2lbrEl2hPkqJM_rdF6iA2_5Jk9KBNoJpdUiQLDfkC8" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Headers
Status
201 Created
Body
{
"metadata": {
"guid": "guid-ef7e740a-3a65-4948-8218-a16a1007cc89",
"url": "/v2/users/guid-ef7e740a-3a65-4948-8218-a16a1007cc89",
"created_at": "2014-11-13T23:38:21+00:00",
"updated_at": null
},
"entity": {
"admin": false,
"active": false,
"default_space_guid": null,
"spaces_url": "/v2/users/guid-ef7e740a-3a65-4948-8218-a16a1007cc89/spaces",
"organizations_url": "/v2/users/guid-ef7e740a-3a65-4948-8218-a16a1007cc89/organizations",
"managed_organizations_url": "/v2/users/guid-ef7e740a-3a65-4948-8218-a16a1007cc89/managed_organizations",
"billing_managed_organizations_url": "/v2/users/guid-ef7e740a-3a65-4948-8218-a16a1007cc89/billing_managed_organizations",
"audited_organizations_url": "/v2/users/guid-ef7e740a-3a65-4948-8218-a16a1007cc89/audited_organizations",
"managed_spaces_url": "/v2/users/guid-ef7e740a-3a65-4948-8218-a16a1007cc89/managed_spaces",
"audited_spaces_url": "/v2/users/guid-ef7e740a-3a65-4948-8218-a16a1007cc89/audited_spaces"
}
}