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-174/managed_organizations/9462a203-5bac-4ce0-a1de-9019e7bd440c

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

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-174/managed_organizations/9462a203-5bac-4ce0-a1de-9019e7bd440c" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE3NiIsImVtYWlsIjoiZW1haWwtMTE2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjkwMzg3MDR9.clhVmoUjwICefTQiqzJOUWVMJmLATdg5ZqmGHslbUQU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-174",
    "url": "/v2/users/uaa-id-174",
    "created_at": "2015-04-07T19:11:44Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "e945cad5-91f4-4a81-8ca9-560bba48859e",
    "default_space_url": "/v2/spaces/e945cad5-91f4-4a81-8ca9-560bba48859e",
    "spaces_url": "/v2/users/uaa-id-174/spaces",
    "organizations_url": "/v2/users/uaa-id-174/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-174/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-174/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-174/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-174/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-174/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 23cd85aa-17cb-43cf-9dc8-a8c3f23fdf44
Content-Length: 845
X-Content-Type-Options: nosniff