Users API

Associate Managed Organization with the User

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

Request

Route

PUT /v2/users/uaa-id-287/managed_organizations/97e1bd4a-828e-4edf-b140-506533d4008e

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.eyJ1c2VyX2lkIjoidWFhLWlkLTI4OSIsImVtYWlsIjoiZW1haWwtMjAwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTZ9.ZjR1Q__yzHcajlxOLmAvPVfy6kgZV4rVTIOU6lkY9-Q
Host: example.org
Content-Type: application/json
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-287/managed_organizations/97e1bd4a-828e-4edf-b140-506533d4008e" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4OSIsImVtYWlsIjoiZW1haWwtMjAwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTZ9.ZjR1Q__yzHcajlxOLmAvPVfy6kgZV4rVTIOU6lkY9-Q" \
	-H "Host: example.org" \
	-H "Content-Type: application/json" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-287",
    "url": "/v2/users/uaa-id-287",
    "created_at": "2016-06-08T16:41:36Z",
    "updated_at": "2016-06-08T16:41:26Z"
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "2becd2d1-62ee-472e-a66f-bea5d9f0dc53",
    "default_space_url": "/v2/spaces/2becd2d1-62ee-472e-a66f-bea5d9f0dc53",
    "spaces_url": "/v2/users/uaa-id-287/spaces",
    "organizations_url": "/v2/users/uaa-id-287/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-287/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-287/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-287/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-287/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-287/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 81484ddf-e3d7-4b2c-8464-f60913066e26
Content-Length: 845
X-Content-Type-Options: nosniff