Creating a User
POST /v2/users/
Fields
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The UAA guid of the user to create.
|
|
|
- guid-6f1c0845-3d68-4115-842d-67489d312cd2
|
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-6f1c0845-3d68-4115-842d-67489d312cd2"
}
cURL
curl "https://api.[your-domain.com]/v2/users" -d '{
"guid": "guid-6f1c0845-3d68-4115-842d-67489d312cd2"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2MCIsImVtYWlsIjoiZW1haWwtMTg3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQ0NzE3MDB9.aN7nRoqrVtCoMqyTZV4Ftr9As44k7Habo5ywyUHzMac" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Headers
Status
201 Created
Body
{
"metadata": {
"guid": "guid-6f1c0845-3d68-4115-842d-67489d312cd2",
"url": "/v2/users/guid-6f1c0845-3d68-4115-842d-67489d312cd2",
"created_at": "2015-02-13T22:35:00Z",
"updated_at": null
},
"entity": {
"admin": false,
"active": false,
"default_space_guid": null,
"spaces_url": "/v2/users/guid-6f1c0845-3d68-4115-842d-67489d312cd2/spaces",
"organizations_url": "/v2/users/guid-6f1c0845-3d68-4115-842d-67489d312cd2/organizations",
"managed_organizations_url": "/v2/users/guid-6f1c0845-3d68-4115-842d-67489d312cd2/managed_organizations",
"billing_managed_organizations_url": "/v2/users/guid-6f1c0845-3d68-4115-842d-67489d312cd2/billing_managed_organizations",
"audited_organizations_url": "/v2/users/guid-6f1c0845-3d68-4115-842d-67489d312cd2/audited_organizations",
"managed_spaces_url": "/v2/users/guid-6f1c0845-3d68-4115-842d-67489d312cd2/managed_spaces",
"audited_spaces_url": "/v2/users/guid-6f1c0845-3d68-4115-842d-67489d312cd2/audited_spaces"
}
}