Organizations API

Associate User with the Organization

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

Request

Route

PUT /v2/organizations/11a9079f-93c0-490a-9ef5-9d5127d2d23d/users/uaa-id-241

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MiIsImVtYWlsIjoiZW1haWwtMTcyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTR9.qMf3Bp1FgsNEwrFeZ2HEnavAsdFfPrzH1AImTtyCjvE
Host: example.org
Content-Type: application/json
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/organizations/11a9079f-93c0-490a-9ef5-9d5127d2d23d/users/uaa-id-241" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MiIsImVtYWlsIjoiZW1haWwtMTcyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTR9.qMf3Bp1FgsNEwrFeZ2HEnavAsdFfPrzH1AImTtyCjvE" \
	-H "Host: example.org" \
	-H "Content-Type: application/json" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "11a9079f-93c0-490a-9ef5-9d5127d2d23d",
    "url": "/v2/organizations/11a9079f-93c0-490a-9ef5-9d5127d2d23d",
    "created_at": "2016-06-08T16:41:34Z",
    "updated_at": "2016-06-08T16:41:26Z"
  },
  "entity": {
    "name": "name-1760",
    "billing_enabled": false,
    "quota_definition_guid": "11c2c607-5d4b-4d95-8b66-01094b6d6d46",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/11c2c607-5d4b-4d95-8b66-01094b6d6d46",
    "spaces_url": "/v2/organizations/11a9079f-93c0-490a-9ef5-9d5127d2d23d/spaces",
    "domains_url": "/v2/organizations/11a9079f-93c0-490a-9ef5-9d5127d2d23d/domains",
    "private_domains_url": "/v2/organizations/11a9079f-93c0-490a-9ef5-9d5127d2d23d/private_domains",
    "users_url": "/v2/organizations/11a9079f-93c0-490a-9ef5-9d5127d2d23d/users",
    "managers_url": "/v2/organizations/11a9079f-93c0-490a-9ef5-9d5127d2d23d/managers",
    "billing_managers_url": "/v2/organizations/11a9079f-93c0-490a-9ef5-9d5127d2d23d/billing_managers",
    "auditors_url": "/v2/organizations/11a9079f-93c0-490a-9ef5-9d5127d2d23d/auditors",
    "app_events_url": "/v2/organizations/11a9079f-93c0-490a-9ef5-9d5127d2d23d/app_events",
    "space_quota_definitions_url": "/v2/organizations/11a9079f-93c0-490a-9ef5-9d5127d2d23d/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 041711f7-b117-494b-91f5-292ac95f7bbd
Content-Length: 1300
X-Content-Type-Options: nosniff