Home
Version 3
Spaces API

Spaces API

Associate Auditor with the Space by Username

PUT v2/spaces/:guid/auditors

Request

Route

PUT v2/spaces/b51728f2-8bb9-49fc-8006-43e86d6495bf/auditors

Parameters

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

Body

Name Description Default Valid Values Example Values
username The user's name
  • user@example.com
{
  "username": "user@example.com"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4NiIsImVtYWlsIjoiZW1haWwtMjc4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTY0NTIyNDR9.5hphVls-N-f14rvtO86DPH69-f19AOe7zWG6jjeR6eU
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/b51728f2-8bb9-49fc-8006-43e86d6495bf/auditors" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4NiIsImVtYWlsIjoiZW1haWwtMjc4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTY0NTIyNDR9.5hphVls-N-f14rvtO86DPH69-f19AOe7zWG6jjeR6eU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "b51728f2-8bb9-49fc-8006-43e86d6495bf",
    "url": "/v2/spaces/b51728f2-8bb9-49fc-8006-43e86d6495bf",
    "created_at": "2016-02-19T02:04:04Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-2464",
    "organization_guid": "8f1e2af5-fb18-4811-b01e-7b0753d2bc02",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/8f1e2af5-fb18-4811-b01e-7b0753d2bc02",
    "developers_url": "/v2/spaces/b51728f2-8bb9-49fc-8006-43e86d6495bf/developers",
    "managers_url": "/v2/spaces/b51728f2-8bb9-49fc-8006-43e86d6495bf/managers",
    "auditors_url": "/v2/spaces/b51728f2-8bb9-49fc-8006-43e86d6495bf/auditors",
    "apps_url": "/v2/spaces/b51728f2-8bb9-49fc-8006-43e86d6495bf/apps",
    "routes_url": "/v2/spaces/b51728f2-8bb9-49fc-8006-43e86d6495bf/routes",
    "domains_url": "/v2/spaces/b51728f2-8bb9-49fc-8006-43e86d6495bf/domains",
    "service_instances_url": "/v2/spaces/b51728f2-8bb9-49fc-8006-43e86d6495bf/service_instances",
    "app_events_url": "/v2/spaces/b51728f2-8bb9-49fc-8006-43e86d6495bf/app_events",
    "events_url": "/v2/spaces/b51728f2-8bb9-49fc-8006-43e86d6495bf/events",
    "security_groups_url": "/v2/spaces/b51728f2-8bb9-49fc-8006-43e86d6495bf/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 
Content-Length: 1278
X-Content-Type-Options: nosniff