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-389/managed_spaces/28924240-9f0f-4886-9a82-f482d75fe585

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

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-389/managed_spaces/28924240-9f0f-4886-9a82-f482d75fe585" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM5MCIsImVtYWlsIjoiZW1haWwtMjkxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzIzMTM2Mjd9.UrIYjBpjG5TmndNkJyBqhkbsm_AK9DcqT-BCHVc_aBA" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-389",
    "url": "/v2/users/uaa-id-389",
    "created_at": "2015-05-15T16:53:47Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "7710de65-de2f-45ee-8a6b-afb563a887d2",
    "default_space_url": "/v2/spaces/7710de65-de2f-45ee-8a6b-afb563a887d2",
    "spaces_url": "/v2/users/uaa-id-389/spaces",
    "organizations_url": "/v2/users/uaa-id-389/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-389/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-389/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-389/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-389/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-389/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: b52d2278-b059-4a83-809d-a81cfd80cf63
Content-Length: 845
X-Content-Type-Options: nosniff