Home
Version 3
Users API

Users API

Associate Managed Space with the User

PUT /v2/users/:guid/managed_spaces/:managed_space_guid

Request

Route

PUT /v2/users/uaa-id-260/managed_spaces/6fc2dd9c-b4c1-4836-92cc-5ebf8c105397

Parameters

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

Body

Name Description Default Valid Values Example Values

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2MSIsImVtYWlsIjoiZW1haWwtMTgzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjU5NDg2NzB9.Fh2Sztsckj5qZ1dIqzkUszT2c2DsxWzS3HF-tRSsF9g
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-260/managed_spaces/6fc2dd9c-b4c1-4836-92cc-5ebf8c105397" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2MSIsImVtYWlsIjoiZW1haWwtMTgzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjU5NDg2NzB9.Fh2Sztsckj5qZ1dIqzkUszT2c2DsxWzS3HF-tRSsF9g" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-260",
    "url": "/v2/users/uaa-id-260",
    "created_at": "2015-03-03T00:51:10Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "720eeebd-8327-48e8-b2fc-75beb401519b",
    "default_space_url": "/v2/spaces/720eeebd-8327-48e8-b2fc-75beb401519b",
    "spaces_url": "/v2/users/uaa-id-260/spaces",
    "organizations_url": "/v2/users/uaa-id-260/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-260/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-260/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-260/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-260/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-260/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 12e4d422-6a9c-4532-896d-a2346c3a6675
Content-Length: 845
X-Content-Type-Options: nosniff