Associate Space with the User
PUT /v2/users/:guid/spaces/:space_guid
Request
Route
PUT /v2/users/uaa-id-152/spaces/953babfd-e232-4346-86dd-9b56c3145ea0
Parameters
Name |
Description |
Valid Values |
Example Values |
guid
|
The guid of the User
|
|
|
space_guid
|
The guid of the space
|
|
|
Headers
cURL
curl "https://api.[your-domain.com]/v2/users/uaa-id-152/spaces/953babfd-e232-4346-86dd-9b56c3145ea0" -d '' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1MyIsImVtYWlsIjoiZW1haWwtMTE2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjA1MDY2NDV9.ijMSpLqpUDNt5QDEH_7C7VsEGsnvEo99q_3JFrRSAtA" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "uaa-id-152",
"url": "/v2/users/uaa-id-152",
"created_at": "2016-04-06T00:17:24Z",
"updated_at": null
},
"entity": {
"admin": false,
"active": false,
"default_space_guid": "953babfd-e232-4346-86dd-9b56c3145ea0",
"default_space_url": "/v2/spaces/953babfd-e232-4346-86dd-9b56c3145ea0",
"spaces_url": "/v2/users/uaa-id-152/spaces",
"organizations_url": "/v2/users/uaa-id-152/organizations",
"managed_organizations_url": "/v2/users/uaa-id-152/managed_organizations",
"billing_managed_organizations_url": "/v2/users/uaa-id-152/billing_managed_organizations",
"audited_organizations_url": "/v2/users/uaa-id-152/audited_organizations",
"managed_spaces_url": "/v2/users/uaa-id-152/managed_spaces",
"audited_spaces_url": "/v2/users/uaa-id-152/audited_spaces"
}
}
Headers