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-62/managed_organizations/7b3ccc6d-6c8b-4212-a9b0-beca105ead5a

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.eyJ1c2VyX2lkIjoidWFhLWlkLTY0IiwiZW1haWwiOiJlbWFpbC01MUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI2MTg3NzM5fQ.5lo1zEx9pE1uChTwYLgy4bJ7cljqhV8QDq-DCXaWqko
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-62/managed_organizations/7b3ccc6d-6c8b-4212-a9b0-beca105ead5a" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTY0IiwiZW1haWwiOiJlbWFpbC01MUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI2MTg3NzM5fQ.5lo1zEx9pE1uChTwYLgy4bJ7cljqhV8QDq-DCXaWqko" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-62",
    "url": "/v2/users/uaa-id-62",
    "created_at": "2015-03-05T19:15:39Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "fa1b7a51-54d9-4b79-a270-56ff0ae46e8a",
    "default_space_url": "/v2/spaces/fa1b7a51-54d9-4b79-a270-56ff0ae46e8a",
    "spaces_url": "/v2/users/uaa-id-62/spaces",
    "organizations_url": "/v2/users/uaa-id-62/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-62/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-62/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-62/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-62/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-62/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 4f7ec0f6-cc53-4d57-83d0-366b7bfcd25a
Content-Length: 836
X-Content-Type-Options: nosniff