Home
Version 3
Organizations API

Organizations API

Associate User with the Organization

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

Request

Route

PUT /v2/organizations/31a8d9d6-27a5-45e3-800c-8287190325f0/users/uaa-id-172

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE3MyIsImVtYWlsIjoiZW1haWwtMTQxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4Mzl9.zns65y2GYbGO9xsuoPh4w9rEB8fr3xZlTOuYGpN6GYk
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/organizations/31a8d9d6-27a5-45e3-800c-8287190325f0/users/uaa-id-172" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE3MyIsImVtYWlsIjoiZW1haWwtMTQxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4Mzl9.zns65y2GYbGO9xsuoPh4w9rEB8fr3xZlTOuYGpN6GYk" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "31a8d9d6-27a5-45e3-800c-8287190325f0",
    "url": "/v2/organizations/31a8d9d6-27a5-45e3-800c-8287190325f0",
    "created_at": "2015-11-03T00:53:59Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-841",
    "billing_enabled": false,
    "quota_definition_guid": "57de044c-f58c-45a8-ab66-206a1994bd74",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/57de044c-f58c-45a8-ab66-206a1994bd74",
    "spaces_url": "/v2/organizations/31a8d9d6-27a5-45e3-800c-8287190325f0/spaces",
    "domains_url": "/v2/organizations/31a8d9d6-27a5-45e3-800c-8287190325f0/domains",
    "private_domains_url": "/v2/organizations/31a8d9d6-27a5-45e3-800c-8287190325f0/private_domains",
    "users_url": "/v2/organizations/31a8d9d6-27a5-45e3-800c-8287190325f0/users",
    "managers_url": "/v2/organizations/31a8d9d6-27a5-45e3-800c-8287190325f0/managers",
    "billing_managers_url": "/v2/organizations/31a8d9d6-27a5-45e3-800c-8287190325f0/billing_managers",
    "auditors_url": "/v2/organizations/31a8d9d6-27a5-45e3-800c-8287190325f0/auditors",
    "app_events_url": "/v2/organizations/31a8d9d6-27a5-45e3-800c-8287190325f0/app_events",
    "space_quota_definitions_url": "/v2/organizations/31a8d9d6-27a5-45e3-800c-8287190325f0/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: c6977526-2931-46a5-84a2-85c0db89d343
Content-Length: 1299
X-Content-Type-Options: nosniff