Creating a User
POST /v2/users/
Request
Route
POST /v2/users
Body
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The UAA guid of the user to create.
|
|
|
- guid-1b769e84-9b04-4a95-aa2f-6d02ab82e999
|
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).
|
|
|
|
{
"guid": "guid-1b769e84-9b04-4a95-aa2f-6d02ab82e999"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/users" -d '{
"guid": "guid-1b769e84-9b04-4a95-aa2f-6d02ab82e999"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTUzIiwiZW1haWwiOiJlbWFpbC0yNUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQxNjYyNTk1fQ.xNU3k_8j3vDmdNkx3ZrjCaoGoNArITh-a8CnQJxVBTE" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "guid-1b769e84-9b04-4a95-aa2f-6d02ab82e999",
"url": "/v2/users/guid-1b769e84-9b04-4a95-aa2f-6d02ab82e999",
"created_at": "2015-08-31T21:49:54Z",
"updated_at": null
},
"entity": {
"admin": false,
"active": false,
"default_space_guid": null,
"spaces_url": "/v2/users/guid-1b769e84-9b04-4a95-aa2f-6d02ab82e999/spaces",
"organizations_url": "/v2/users/guid-1b769e84-9b04-4a95-aa2f-6d02ab82e999/organizations",
"managed_organizations_url": "/v2/users/guid-1b769e84-9b04-4a95-aa2f-6d02ab82e999/managed_organizations",
"billing_managed_organizations_url": "/v2/users/guid-1b769e84-9b04-4a95-aa2f-6d02ab82e999/billing_managed_organizations",
"audited_organizations_url": "/v2/users/guid-1b769e84-9b04-4a95-aa2f-6d02ab82e999/audited_organizations",
"managed_spaces_url": "/v2/users/guid-1b769e84-9b04-4a95-aa2f-6d02ab82e999/managed_spaces",
"audited_spaces_url": "/v2/users/guid-1b769e84-9b04-4a95-aa2f-6d02ab82e999/audited_spaces"
}
}
Headers