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-01abd6a7-2e1d-4e30-9cf9-7340c1fa76ff
|
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-01abd6a7-2e1d-4e30-9cf9-7340c1fa76ff"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/users" -d '{
"guid": "guid-01abd6a7-2e1d-4e30-9cf9-7340c1fa76ff"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5OSIsImVtYWlsIjoiZW1haWwtMjI5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDUzNjIzMTR9.1yUqM1cePUV7UUc8nHC5jNx0Sqk8IghjTKQmMdcFom4" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "guid-01abd6a7-2e1d-4e30-9cf9-7340c1fa76ff",
"url": "/v2/users/guid-01abd6a7-2e1d-4e30-9cf9-7340c1fa76ff",
"created_at": "2015-10-13T17:31:54Z",
"updated_at": null
},
"entity": {
"admin": false,
"active": false,
"default_space_guid": null,
"spaces_url": "/v2/users/guid-01abd6a7-2e1d-4e30-9cf9-7340c1fa76ff/spaces",
"organizations_url": "/v2/users/guid-01abd6a7-2e1d-4e30-9cf9-7340c1fa76ff/organizations",
"managed_organizations_url": "/v2/users/guid-01abd6a7-2e1d-4e30-9cf9-7340c1fa76ff/managed_organizations",
"billing_managed_organizations_url": "/v2/users/guid-01abd6a7-2e1d-4e30-9cf9-7340c1fa76ff/billing_managed_organizations",
"audited_organizations_url": "/v2/users/guid-01abd6a7-2e1d-4e30-9cf9-7340c1fa76ff/audited_organizations",
"managed_spaces_url": "/v2/users/guid-01abd6a7-2e1d-4e30-9cf9-7340c1fa76ff/managed_spaces",
"audited_spaces_url": "/v2/users/guid-01abd6a7-2e1d-4e30-9cf9-7340c1fa76ff/audited_spaces"
}
}
Headers