Home
Version 3
Spaces API

Spaces API

Associate Auditor with the Space by Username

PUT v2/spaces/:guid/auditors

Request

Route

PUT v2/spaces/21b2509c-28a5-4eac-8be2-81f6f2403d81/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.eyJ1c2VyX2lkIjoidWFhLWlkLTY5IiwiZW1haWwiOiJlbWFpbC00MEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ0NzgyOTIxfQ.DzsS81HhcJlPic7MRa14hw7aCENj0bbac54Bn9GdI0Q
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/21b2509c-28a5-4eac-8be2-81f6f2403d81/auditors" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTY5IiwiZW1haWwiOiJlbWFpbC00MEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ0NzgyOTIxfQ.DzsS81HhcJlPic7MRa14hw7aCENj0bbac54Bn9GdI0Q" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "21b2509c-28a5-4eac-8be2-81f6f2403d81",
    "url": "/v2/spaces/21b2509c-28a5-4eac-8be2-81f6f2403d81",
    "created_at": "2015-10-07T00:35:21Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-146",
    "organization_guid": "275052a9-d10a-4e64-9c1f-5219fb5788fe",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/275052a9-d10a-4e64-9c1f-5219fb5788fe",
    "developers_url": "/v2/spaces/21b2509c-28a5-4eac-8be2-81f6f2403d81/developers",
    "managers_url": "/v2/spaces/21b2509c-28a5-4eac-8be2-81f6f2403d81/managers",
    "auditors_url": "/v2/spaces/21b2509c-28a5-4eac-8be2-81f6f2403d81/auditors",
    "apps_url": "/v2/spaces/21b2509c-28a5-4eac-8be2-81f6f2403d81/apps",
    "routes_url": "/v2/spaces/21b2509c-28a5-4eac-8be2-81f6f2403d81/routes",
    "domains_url": "/v2/spaces/21b2509c-28a5-4eac-8be2-81f6f2403d81/domains",
    "service_instances_url": "/v2/spaces/21b2509c-28a5-4eac-8be2-81f6f2403d81/service_instances",
    "app_events_url": "/v2/spaces/21b2509c-28a5-4eac-8be2-81f6f2403d81/app_events",
    "events_url": "/v2/spaces/21b2509c-28a5-4eac-8be2-81f6f2403d81/events",
    "security_groups_url": "/v2/spaces/21b2509c-28a5-4eac-8be2-81f6f2403d81/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 694fc189-bdba-44bf-b43f-9a7b8cfa6940
Content-Length: 1277
X-Content-Type-Options: nosniff