Home
Version 3
Spaces API

Spaces API

Associate Auditor with the Space by Username

PUT v2/spaces/:guid/auditors

Request

Route

PUT v2/spaces/c6afcf0e-8be0-47d8-838a-098ddddc4a6e/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.eyJ1c2VyX2lkIjoidWFhLWlkLTYwIiwiZW1haWwiOiJlbWFpbC0zMEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDU0NDUxNjA3fQ.GxqGesVv9GvXZ2N-zngGFeMN-bduF43wnzCuuvZYlpU
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/c6afcf0e-8be0-47d8-838a-098ddddc4a6e/auditors" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTYwIiwiZW1haWwiOiJlbWFpbC0zMEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDU0NDUxNjA3fQ.GxqGesVv9GvXZ2N-zngGFeMN-bduF43wnzCuuvZYlpU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "c6afcf0e-8be0-47d8-838a-098ddddc4a6e",
    "url": "/v2/spaces/c6afcf0e-8be0-47d8-838a-098ddddc4a6e",
    "created_at": "2016-01-26T22:20:07Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-125",
    "organization_guid": "1b5b6a14-4c38-42b6-ad9b-5d72d1ffaad0",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/1b5b6a14-4c38-42b6-ad9b-5d72d1ffaad0",
    "developers_url": "/v2/spaces/c6afcf0e-8be0-47d8-838a-098ddddc4a6e/developers",
    "managers_url": "/v2/spaces/c6afcf0e-8be0-47d8-838a-098ddddc4a6e/managers",
    "auditors_url": "/v2/spaces/c6afcf0e-8be0-47d8-838a-098ddddc4a6e/auditors",
    "apps_url": "/v2/spaces/c6afcf0e-8be0-47d8-838a-098ddddc4a6e/apps",
    "routes_url": "/v2/spaces/c6afcf0e-8be0-47d8-838a-098ddddc4a6e/routes",
    "domains_url": "/v2/spaces/c6afcf0e-8be0-47d8-838a-098ddddc4a6e/domains",
    "service_instances_url": "/v2/spaces/c6afcf0e-8be0-47d8-838a-098ddddc4a6e/service_instances",
    "app_events_url": "/v2/spaces/c6afcf0e-8be0-47d8-838a-098ddddc4a6e/app_events",
    "events_url": "/v2/spaces/c6afcf0e-8be0-47d8-838a-098ddddc4a6e/events",
    "security_groups_url": "/v2/spaces/c6afcf0e-8be0-47d8-838a-098ddddc4a6e/security_groups"
  }
}

Headers

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