Users API

Associate Managed Space with the User

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

Request

Route

PUT /v2/users/uaa-id-268/managed_spaces/b133899a-c3ea-451b-adaa-f8e2174cbfec

Parameters

Name Description Valid Values Example Values
guid The guid of the User
managed_space_guid The guid of the managed space

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2OSIsImVtYWlsIjoiZW1haWwtMTkxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTV9.IFJAqPcWc1dUIE7OaJAD54XRe4w0Bt0KSTkwHAWxPFU
Host: example.org
Content-Type: application/json
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-268/managed_spaces/b133899a-c3ea-451b-adaa-f8e2174cbfec" -d '' -X PUT \
  -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2OSIsImVtYWlsIjoiZW1haWwtMTkxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTV9.IFJAqPcWc1dUIE7OaJAD54XRe4w0Bt0KSTkwHAWxPFU" \
  -H "Host: example.org" \
  -H "Content-Type: application/json" \
  -H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-268",
    "url": "/v2/users/uaa-id-268",
    "created_at": "2016-06-08T16:41:35Z",
    "updated_at": "2016-06-08T16:41:26Z"
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "81d79071-61db-43d7-86d3-8f885d14fd4e",
    "default_space_url": "/v2/spaces/81d79071-61db-43d7-86d3-8f885d14fd4e",
    "spaces_url": "/v2/users/uaa-id-268/spaces",
    "organizations_url": "/v2/users/uaa-id-268/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-268/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-268/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-268/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-268/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-268/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: b2a25d0e-80e7-4a37-aced-d35488b68585
Content-Length: 845
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.user.space_manager_add

Attribute Name Value
id 3
guid 3ae5862c-fb43-49ed-935b-8feb7d0e19e8
created_at 2016-06-08 16:41:40 UTC
updated_at
timestamp 2016-06-08 16:41:40 UTC
type audit.user.space_manager_add
actor uaa-id-360
actor_type user
actee 2a01cf80-9fbf-448f-a7a0-1e415e28771e
actee_type space
metadata
{
  "request": null
}
organization_guid 28960823-1b68-4a2b-8f36-77cc573bccca
space_guid 2a01cf80-9fbf-448f-a7a0-1e415e28771e
actor_name [email protected]
actee_name development