Home
Version 3
Users API

Users API

Associate Space with the User

PUT /v2/users/:guid/spaces/:space_guid

Fields

Name Description Default Valid Values Example Values

Parameters

Name Description Valid Values Example Values
guid The guid of the User

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2NiIsImVtYWlsIjoiZW1haWwtMTkwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQ0NzE3MDB9.Lw5YlJ0sCVtBFp8LPbxpFwZNnDfrZ-QAupg3aC8Yk7Y
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/users/uaa-id-265/spaces/275fc1cf-7ddb-4537-928c-e960068a28d7

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-265/spaces/275fc1cf-7ddb-4537-928c-e960068a28d7" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2NiIsImVtYWlsIjoiZW1haWwtMTkwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQ0NzE3MDB9.Lw5YlJ0sCVtBFp8LPbxpFwZNnDfrZ-QAupg3aC8Yk7Y" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 805a25d3-f5fe-4746-95d0-db59a6606a0a
Content-Length: 845
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-265",
    "url": "/v2/users/uaa-id-265",
    "created_at": "2015-02-13T22:35:00Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "275fc1cf-7ddb-4537-928c-e960068a28d7",
    "default_space_url": "/v2/spaces/275fc1cf-7ddb-4537-928c-e960068a28d7",
    "spaces_url": "/v2/users/uaa-id-265/spaces",
    "organizations_url": "/v2/users/uaa-id-265/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-265/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-265/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-265/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-265/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-265/audited_spaces"
  }
}