Home
Version 3
Users API

Users API

Associate Managed Space with the User

PUT /v2/users/:guid/managed_spaces/:managed_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.eyJ1c2VyX2lkIjoidWFhLWlkLTEzMSIsImVtYWlsIjoiZW1haWwtODNAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNDEzNzM2Nn0.bG_5dGpYGTjXfAlq0jRr4ADmJ7WFsoM5XTvzyN8Gabs
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/users/uaa-id-130/managed_spaces/0f29b977-b05c-4edf-9c93-2294939b786a

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-130/managed_spaces/0f29b977-b05c-4edf-9c93-2294939b786a" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzMSIsImVtYWlsIjoiZW1haWwtODNAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNDEzNzM2Nn0.bG_5dGpYGTjXfAlq0jRr4ADmJ7WFsoM5XTvzyN8Gabs" \
	-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: 1e18db1f-5833-4772-8bc2-c7b1111d974d
Content-Length: 845
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-130",
    "url": "/v2/users/uaa-id-130",
    "created_at": "2015-02-10T01:42:46Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "cb4ca685-ccbf-4bea-87d4-d2c2c1c6f329",
    "default_space_url": "/v2/spaces/cb4ca685-ccbf-4bea-87d4-d2c2c1c6f329",
    "spaces_url": "/v2/users/uaa-id-130/spaces",
    "organizations_url": "/v2/users/uaa-id-130/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-130/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-130/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-130/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-130/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-130/audited_spaces"
  }
}