Home
Version 3
Users API

Users API

Associate Managed Organization with the User

PUT /v2/users/:guid/managed_organizations/:managed_organization_guid

Request

Route

PUT /v2/users/uaa-id-382/managed_organizations/f032fbeb-b0a8-42a3-a28f-619c01869c10

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.eyJ1c2VyX2lkIjoidWFhLWlkLTM4NCIsImVtYWlsIjoiZW1haWwtMjg4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzIzMTM2Mjd9.oWn0YfjFiqDUInPCkF0INip5N_ONHq7-K06RbG-3J84
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-382/managed_organizations/f032fbeb-b0a8-42a3-a28f-619c01869c10" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4NCIsImVtYWlsIjoiZW1haWwtMjg4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzIzMTM2Mjd9.oWn0YfjFiqDUInPCkF0INip5N_ONHq7-K06RbG-3J84" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-382",
    "url": "/v2/users/uaa-id-382",
    "created_at": "2015-05-15T16:53:47Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "2297fd29-8c17-4df0-9cb2-b103aa6262d3",
    "default_space_url": "/v2/spaces/2297fd29-8c17-4df0-9cb2-b103aa6262d3",
    "spaces_url": "/v2/users/uaa-id-382/spaces",
    "organizations_url": "/v2/users/uaa-id-382/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-382/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-382/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-382/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-382/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-382/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 3dfcf7d5-4065-46a3-a395-6ae9fe10dc84
Content-Length: 845
X-Content-Type-Options: nosniff