Home
Version 3
Spaces API

Spaces API

Associate Auditor with the Space by Username (experimental)

PUT v2/spaces/:guid/auditors

Request

Route

PUT v2/spaces/a574decd-ed57-4cdf-a5d1-d4951f31c34e/auditors

Parameters

Name Description Valid Values Example Values
guid The guid of the Space
auditor_guid The guid of the auditor
{
  "username": "user@example.com"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTUwIiwiZW1haWwiOiJlbWFpbC0yNUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQyNjAxNTI2fQ.0DOD_HfhMjkGF-SyeLkpgITG5CD5saIgPwhFNfojDDU
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/a574decd-ed57-4cdf-a5d1-d4951f31c34e/auditors" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTUwIiwiZW1haWwiOiJlbWFpbC0yNUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQyNjAxNTI2fQ.0DOD_HfhMjkGF-SyeLkpgITG5CD5saIgPwhFNfojDDU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "a574decd-ed57-4cdf-a5d1-d4951f31c34e",
    "url": "/v2/spaces/a574decd-ed57-4cdf-a5d1-d4951f31c34e",
    "created_at": "2015-09-11T18:38:46Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-85",
    "organization_guid": "d9900538-31fd-47e4-b507-0395d9744573",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/d9900538-31fd-47e4-b507-0395d9744573",
    "developers_url": "/v2/spaces/a574decd-ed57-4cdf-a5d1-d4951f31c34e/developers",
    "managers_url": "/v2/spaces/a574decd-ed57-4cdf-a5d1-d4951f31c34e/managers",
    "auditors_url": "/v2/spaces/a574decd-ed57-4cdf-a5d1-d4951f31c34e/auditors",
    "apps_url": "/v2/spaces/a574decd-ed57-4cdf-a5d1-d4951f31c34e/apps",
    "routes_url": "/v2/spaces/a574decd-ed57-4cdf-a5d1-d4951f31c34e/routes",
    "domains_url": "/v2/spaces/a574decd-ed57-4cdf-a5d1-d4951f31c34e/domains",
    "service_instances_url": "/v2/spaces/a574decd-ed57-4cdf-a5d1-d4951f31c34e/service_instances",
    "app_events_url": "/v2/spaces/a574decd-ed57-4cdf-a5d1-d4951f31c34e/app_events",
    "events_url": "/v2/spaces/a574decd-ed57-4cdf-a5d1-d4951f31c34e/events",
    "security_groups_url": "/v2/spaces/a574decd-ed57-4cdf-a5d1-d4951f31c34e/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 6d69eb9f-4316-4173-a53e-48f8262d5508
Content-Length: 1276
X-Content-Type-Options: nosniff