Organizations API

Associate User with the Organization by Username

PUT v2/organizations/:guid/users

Request

Route

PUT v2/organizations/6f0e3308-1340-4682-937e-7b8186f5431e/users

Parameters

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

Body

Name Description Default Valid Values Example Values
username The user's name
origin The UAA origin that the user is registered with uaa
  • ldap
{
  "username": "[email protected]"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0OCIsImVtYWlsIjoiZW1haWwtMTc1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTV9.JtU1FloU857PRC3CAzY02yqIIt-MYf2L1BThUMduT_8
Host: example.org
Content-Type: application/json
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/organizations/6f0e3308-1340-4682-937e-7b8186f5431e/users" -d '{
  "username": "[email protected]"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0OCIsImVtYWlsIjoiZW1haWwtMTc1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTV9.JtU1FloU857PRC3CAzY02yqIIt-MYf2L1BThUMduT_8" \
	-H "Host: example.org" \
	-H "Content-Type: application/json" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "6f0e3308-1340-4682-937e-7b8186f5431e",
    "url": "/v2/organizations/6f0e3308-1340-4682-937e-7b8186f5431e",
    "created_at": "2016-06-08T16:41:35Z",
    "updated_at": "2016-06-08T16:41:26Z"
  },
  "entity": {
    "name": "name-1766",
    "billing_enabled": false,
    "quota_definition_guid": "566e09b9-2b73-4506-be69-97b1cdca0f1c",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/566e09b9-2b73-4506-be69-97b1cdca0f1c",
    "spaces_url": "/v2/organizations/6f0e3308-1340-4682-937e-7b8186f5431e/spaces",
    "domains_url": "/v2/organizations/6f0e3308-1340-4682-937e-7b8186f5431e/domains",
    "private_domains_url": "/v2/organizations/6f0e3308-1340-4682-937e-7b8186f5431e/private_domains",
    "users_url": "/v2/organizations/6f0e3308-1340-4682-937e-7b8186f5431e/users",
    "managers_url": "/v2/organizations/6f0e3308-1340-4682-937e-7b8186f5431e/managers",
    "billing_managers_url": "/v2/organizations/6f0e3308-1340-4682-937e-7b8186f5431e/billing_managers",
    "auditors_url": "/v2/organizations/6f0e3308-1340-4682-937e-7b8186f5431e/auditors",
    "app_events_url": "/v2/organizations/6f0e3308-1340-4682-937e-7b8186f5431e/app_events",
    "space_quota_definitions_url": "/v2/organizations/6f0e3308-1340-4682-937e-7b8186f5431e/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 1e673560-6640-4967-9197-5ed4cae7bbe9
Content-Length: 1300
X-Content-Type-Options: nosniff