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-226/managed_organizations/16c7871b-1f4e-4813-8a40-c22027a3b479

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.eyJ1c2VyX2lkIjoidWFhLWlkLTIyOCIsImVtYWlsIjoiZW1haWwtMTM5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjEzNzQ2MzF9.Br6LJAGVJsHQH1fI7knz-3Ol4ex0kdBHfyP8zE6PAg8
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-226/managed_organizations/16c7871b-1f4e-4813-8a40-c22027a3b479" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIyOCIsImVtYWlsIjoiZW1haWwtMTM5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjEzNzQ2MzF9.Br6LJAGVJsHQH1fI7knz-3Ol4ex0kdBHfyP8zE6PAg8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-226",
    "url": "/v2/users/uaa-id-226",
    "created_at": "2016-04-16T01:23:51Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "51cd57ac-c76a-460c-9e38-8dee7769e353",
    "default_space_url": "/v2/spaces/51cd57ac-c76a-460c-9e38-8dee7769e353",
    "spaces_url": "/v2/users/uaa-id-226/spaces",
    "organizations_url": "/v2/users/uaa-id-226/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-226/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-226/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-226/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-226/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-226/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 6e60fe93-a200-4326-85d1-a8c26199ac0d
Content-Length: 845
X-Content-Type-Options: nosniff