Home
Version 3
Users API

Users API

Associate Space with the User

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

Request

Route

PUT /v2/users/uaa-id-269/spaces/35e42668-d7d5-4b3a-852a-ddd822f666bc

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3MCIsImVtYWlsIjoiZW1haWwtMTc4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5Mzd9.uoPPpSZ2FBBeqoItJBYEHqXLVd6iVUpxA-22VVs_uA0
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-269/spaces/35e42668-d7d5-4b3a-852a-ddd822f666bc" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3MCIsImVtYWlsIjoiZW1haWwtMTc4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5Mzd9.uoPPpSZ2FBBeqoItJBYEHqXLVd6iVUpxA-22VVs_uA0" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-269",
    "url": "/v2/users/uaa-id-269",
    "created_at": "2015-10-07T00:35:37Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "35e42668-d7d5-4b3a-852a-ddd822f666bc",
    "default_space_url": "/v2/spaces/35e42668-d7d5-4b3a-852a-ddd822f666bc",
    "spaces_url": "/v2/users/uaa-id-269/spaces",
    "organizations_url": "/v2/users/uaa-id-269/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-269/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-269/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-269/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-269/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-269/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 6b9c2a1d-41cb-4af4-90bc-3efd072901d2
Content-Length: 845
X-Content-Type-Options: nosniff