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-255/managed_organizations/70e85f24-5cc7-4ba7-9fdc-e15b735a9160

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

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-255/managed_organizations/70e85f24-5cc7-4ba7-9fdc-e15b735a9160" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1NyIsImVtYWlsIjoiZW1haWwtMTcyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5Mzd9.IP78no95vkFEexnwig_7zy_f7YGqD1RZCXL8QgZi6io" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-255",
    "url": "/v2/users/uaa-id-255",
    "created_at": "2015-10-07T00:35:37Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "82addb4e-8f6b-44e3-84f6-b5e924f5d291",
    "default_space_url": "/v2/spaces/82addb4e-8f6b-44e3-84f6-b5e924f5d291",
    "spaces_url": "/v2/users/uaa-id-255/spaces",
    "organizations_url": "/v2/users/uaa-id-255/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-255/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-255/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-255/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-255/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-255/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 9f7bd288-c3c9-4d2e-9f3e-a6822785a082
Content-Length: 845
X-Content-Type-Options: nosniff