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-245/managed_organizations/c8fd2fa1-1fdf-4f0b-8af1-828a9279f2f4

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

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-245/managed_organizations/c8fd2fa1-1fdf-4f0b-8af1-828a9279f2f4" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NyIsImVtYWlsIjoiZW1haWwtMTc3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjU5NDg2Njl9.tBfrcaWFnIbUQ6iIo9KQdQuEgkU446v62tS_GtMA27s" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-245",
    "url": "/v2/users/uaa-id-245",
    "created_at": "2015-03-03T00:51:09Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "18c2f0fa-7f9b-46c8-99fb-33820470cc1a",
    "default_space_url": "/v2/spaces/18c2f0fa-7f9b-46c8-99fb-33820470cc1a",
    "spaces_url": "/v2/users/uaa-id-245/spaces",
    "organizations_url": "/v2/users/uaa-id-245/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-245/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-245/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-245/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-245/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-245/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 88109a01-958c-4773-b5fb-57b190a56f59
Content-Length: 845
X-Content-Type-Options: nosniff