Home
Version 3
Organizations API

Organizations API

Associate User with the Organization

PUT /v2/organizations/:guid/users/:user_guid

Request

Route

PUT /v2/organizations/ab605c25-efd2-4e9f-81c2-39f6888c2443/users/uaa-id-26

Parameters

Name Description Valid Values Example Values
guid The guid of the Organization
user_guid The guid of the user

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3IiwiZW1haWwiOiJlbWFpbC0xOUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDYxOTU4MzkwfQ.AAc9pJ5ozjA3kTr-Wrmer40ZuzZ8hqzd8Z3Var_LGVY
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/organizations/ab605c25-efd2-4e9f-81c2-39f6888c2443/users/uaa-id-26" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3IiwiZW1haWwiOiJlbWFpbC0xOUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDYxOTU4MzkwfQ.AAc9pJ5ozjA3kTr-Wrmer40ZuzZ8hqzd8Z3Var_LGVY" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "ab605c25-efd2-4e9f-81c2-39f6888c2443",
    "url": "/v2/organizations/ab605c25-efd2-4e9f-81c2-39f6888c2443",
    "created_at": "2016-04-22T19:33:10Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-60",
    "billing_enabled": false,
    "quota_definition_guid": "a043b12d-c5b2-4e35-88f0-d76203d4b961",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/a043b12d-c5b2-4e35-88f0-d76203d4b961",
    "spaces_url": "/v2/organizations/ab605c25-efd2-4e9f-81c2-39f6888c2443/spaces",
    "domains_url": "/v2/organizations/ab605c25-efd2-4e9f-81c2-39f6888c2443/domains",
    "private_domains_url": "/v2/organizations/ab605c25-efd2-4e9f-81c2-39f6888c2443/private_domains",
    "users_url": "/v2/organizations/ab605c25-efd2-4e9f-81c2-39f6888c2443/users",
    "managers_url": "/v2/organizations/ab605c25-efd2-4e9f-81c2-39f6888c2443/managers",
    "billing_managers_url": "/v2/organizations/ab605c25-efd2-4e9f-81c2-39f6888c2443/billing_managers",
    "auditors_url": "/v2/organizations/ab605c25-efd2-4e9f-81c2-39f6888c2443/auditors",
    "app_events_url": "/v2/organizations/ab605c25-efd2-4e9f-81c2-39f6888c2443/app_events",
    "space_quota_definitions_url": "/v2/organizations/ab605c25-efd2-4e9f-81c2-39f6888c2443/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 5c6fbb03-c24a-4f47-8cb9-8244e5c3f359
Content-Length: 1298
X-Content-Type-Options: nosniff