Home
Version 3
Spaces API

Spaces API

Associate Auditor with the Space by Username

PUT v2/spaces/:guid/auditors

Request

Route

PUT v2/spaces/873193ee-878c-436f-80bd-10d68927937d/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.eyJ1c2VyX2lkIjoidWFhLWlkLTU0IiwiZW1haWwiOiJlbWFpbC0yOUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ5NTMxNTA4fQ.l-Fv3k7g5HQ3hwDYVbPW452E7sdJXqIiFUZ_5GLGoV8
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/873193ee-878c-436f-80bd-10d68927937d/auditors" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTU0IiwiZW1haWwiOiJlbWFpbC0yOUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ5NTMxNTA4fQ.l-Fv3k7g5HQ3hwDYVbPW452E7sdJXqIiFUZ_5GLGoV8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "873193ee-878c-436f-80bd-10d68927937d",
    "url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d",
    "created_at": "2015-11-30T23:38:28Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-101",
    "organization_guid": "5fddaf61-092d-4b33-9490-8350963db89e",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/5fddaf61-092d-4b33-9490-8350963db89e",
    "developers_url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/developers",
    "managers_url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/managers",
    "auditors_url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/auditors",
    "apps_url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/apps",
    "routes_url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/routes",
    "domains_url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/domains",
    "service_instances_url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/service_instances",
    "app_events_url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/app_events",
    "events_url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/events",
    "security_groups_url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/security_groups"
  }
}

Headers

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