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-193/managed_organizations/1bda7cf6-7a06-4ca0-a3bf-6577c0e90ddf

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

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-193/managed_organizations/1bda7cf6-7a06-4ca0-a3bf-6577c0e90ddf" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5NSIsImVtYWlsIjoiZW1haWwtMTM4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE3OTd9.xAA18zMuVL2cmDq1uFNYY_zOaZhlVV91Z9ll7zSSfaw" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-193",
    "url": "/v2/users/uaa-id-193",
    "created_at": "2015-07-27T22:43:17Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "9ab50a11-3515-4bb6-a1b9-a9ac5e493102",
    "default_space_url": "/v2/spaces/9ab50a11-3515-4bb6-a1b9-a9ac5e493102",
    "spaces_url": "/v2/users/uaa-id-193/spaces",
    "organizations_url": "/v2/users/uaa-id-193/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-193/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-193/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-193/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-193/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-193/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 644a0ad0-9e0d-4ad7-85bc-daf8db54f545
Content-Length: 845
X-Content-Type-Options: nosniff