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.eyJ1c2VyX2lkIjoidWFhLWlkLTkyIiwiZW1haWwiOiJlbWFpbC02NUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI0MTM3MzY1fQ.oIpyqyAnbZJgisIJjw8e_MaZTnye3zGsa4xUgImsfTg
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/users/uaa-id-91/spaces/aa846a67-dbd1-4c18-a936-b9bbc7532423

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-91/spaces/aa846a67-dbd1-4c18-a936-b9bbc7532423" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTkyIiwiZW1haWwiOiJlbWFpbC02NUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI0MTM3MzY1fQ.oIpyqyAnbZJgisIJjw8e_MaZTnye3zGsa4xUgImsfTg" \
	-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: 93026237-ba01-4d54-b683-e45147e7a470
Content-Length: 836
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-91",
    "url": "/v2/users/uaa-id-91",
    "created_at": "2015-02-10T01:42:45Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "aa846a67-dbd1-4c18-a936-b9bbc7532423",
    "default_space_url": "/v2/spaces/aa846a67-dbd1-4c18-a936-b9bbc7532423",
    "spaces_url": "/v2/users/uaa-id-91/spaces",
    "organizations_url": "/v2/users/uaa-id-91/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-91/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-91/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-91/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-91/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-91/audited_spaces"
  }
}