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-364/managed_spaces/207f1cbb-f5bf-4196-93b8-5f84b8c4d7f9

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

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-364/managed_spaces/207f1cbb-f5bf-4196-93b8-5f84b8c4d7f9" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM2NSIsImVtYWlsIjoiZW1haWwtMjg1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzE2NDY2NDd9.gHhp0uXfXkI-ugjDk0KPz1DwY9QPSGv9JvEdPpATit8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-364",
    "url": "/v2/users/uaa-id-364",
    "created_at": "2015-05-07T23:37:27Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "18943e15-1f19-4ec4-89c9-31a9fb1627b7",
    "default_space_url": "/v2/spaces/18943e15-1f19-4ec4-89c9-31a9fb1627b7",
    "spaces_url": "/v2/users/uaa-id-364/spaces",
    "organizations_url": "/v2/users/uaa-id-364/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-364/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-364/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-364/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-364/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-364/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 3e9c7013-8564-421f-b02a-99edfcf2f8b3
Content-Length: 845
X-Content-Type-Options: nosniff