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-227/managed_organizations/b1f82afe-fddd-4290-bb47-22fdef15f3ec

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIyOSIsImVtYWlsIjoiZW1haWwtMTcxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MDR9.FQmx2M3HVy16CBjB9tPGj8yqP1B029AhQXrGCmdWlA0
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-227/managed_organizations/b1f82afe-fddd-4290-bb47-22fdef15f3ec" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIyOSIsImVtYWlsIjoiZW1haWwtMTcxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MDR9.FQmx2M3HVy16CBjB9tPGj8yqP1B029AhQXrGCmdWlA0" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-227",
    "url": "/v2/users/uaa-id-227",
    "created_at": "2016-04-22T19:33:24Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "8128df0c-9e6d-4d50-a55f-09aa30c0c944",
    "default_space_url": "/v2/spaces/8128df0c-9e6d-4d50-a55f-09aa30c0c944",
    "spaces_url": "/v2/users/uaa-id-227/spaces",
    "organizations_url": "/v2/users/uaa-id-227/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-227/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-227/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-227/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-227/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-227/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: f733cd1c-7f8d-46f7-bd72-0733e1998ecd
Content-Length: 845
X-Content-Type-Options: nosniff