Creating a User
POST /v2/users/
Fields
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The UAA guid of the user to create.
|
|
|
- guid-91046a46-f63d-487f-a7ac-4415aec2fdde
|
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-91046a46-f63d-487f-a7ac-4415aec2fdde"
}
cURL
curl "https://api.[your-domain.com]/v2/users" -d '{
"guid": "guid-91046a46-f63d-487f-a7ac-4415aec2fdde"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5MCIsImVtYWlsIjoiZW1haWwtMTM1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjI5OTA4NzR9.0e2QQTiuNZHf8PJHaOIC9Kemw5QbhzaPGEqxIROTVOk" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Headers
Status
201 Created
Body
{
"metadata": {
"guid": "guid-91046a46-f63d-487f-a7ac-4415aec2fdde",
"url": "/v2/users/guid-91046a46-f63d-487f-a7ac-4415aec2fdde",
"created_at": "2015-01-27T19:14:33Z",
"updated_at": null
},
"entity": {
"admin": false,
"active": false,
"default_space_guid": null,
"spaces_url": "/v2/users/guid-91046a46-f63d-487f-a7ac-4415aec2fdde/spaces",
"organizations_url": "/v2/users/guid-91046a46-f63d-487f-a7ac-4415aec2fdde/organizations",
"managed_organizations_url": "/v2/users/guid-91046a46-f63d-487f-a7ac-4415aec2fdde/managed_organizations",
"billing_managed_organizations_url": "/v2/users/guid-91046a46-f63d-487f-a7ac-4415aec2fdde/billing_managed_organizations",
"audited_organizations_url": "/v2/users/guid-91046a46-f63d-487f-a7ac-4415aec2fdde/audited_organizations",
"managed_spaces_url": "/v2/users/guid-91046a46-f63d-487f-a7ac-4415aec2fdde/managed_spaces",
"audited_spaces_url": "/v2/users/guid-91046a46-f63d-487f-a7ac-4415aec2fdde/audited_spaces"
}
}