Home
Version 3
Spaces API

Spaces API

Associate Auditor with the Space by Username

PUT v2/spaces/:guid/auditors

Request

Route

PUT v2/spaces/9ce59219-d2e7-4d45-875c-cb25b85af7fd/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.eyJ1c2VyX2lkIjoidWFhLWlkLTExOCIsImVtYWlsIjoiZW1haWwtODBAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2MTM3NDYyN30.rDcadAeyX4P7L8ZjOS1YLk0mcG_I5joDJ6RMAwCi_6k
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/9ce59219-d2e7-4d45-875c-cb25b85af7fd/auditors" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExOCIsImVtYWlsIjoiZW1haWwtODBAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2MTM3NDYyN30.rDcadAeyX4P7L8ZjOS1YLk0mcG_I5joDJ6RMAwCi_6k" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "9ce59219-d2e7-4d45-875c-cb25b85af7fd",
    "url": "/v2/spaces/9ce59219-d2e7-4d45-875c-cb25b85af7fd",
    "created_at": "2016-04-16T01:23:47Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-260",
    "organization_guid": "452e46df-cd3f-46a2-a4da-e56396f1a5db",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/452e46df-cd3f-46a2-a4da-e56396f1a5db",
    "developers_url": "/v2/spaces/9ce59219-d2e7-4d45-875c-cb25b85af7fd/developers",
    "managers_url": "/v2/spaces/9ce59219-d2e7-4d45-875c-cb25b85af7fd/managers",
    "auditors_url": "/v2/spaces/9ce59219-d2e7-4d45-875c-cb25b85af7fd/auditors",
    "apps_url": "/v2/spaces/9ce59219-d2e7-4d45-875c-cb25b85af7fd/apps",
    "routes_url": "/v2/spaces/9ce59219-d2e7-4d45-875c-cb25b85af7fd/routes",
    "domains_url": "/v2/spaces/9ce59219-d2e7-4d45-875c-cb25b85af7fd/domains",
    "service_instances_url": "/v2/spaces/9ce59219-d2e7-4d45-875c-cb25b85af7fd/service_instances",
    "app_events_url": "/v2/spaces/9ce59219-d2e7-4d45-875c-cb25b85af7fd/app_events",
    "events_url": "/v2/spaces/9ce59219-d2e7-4d45-875c-cb25b85af7fd/events",
    "security_groups_url": "/v2/spaces/9ce59219-d2e7-4d45-875c-cb25b85af7fd/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 309ce70f-9ae5-462a-9d85-72ffe8feb39a
Content-Length: 1277
X-Content-Type-Options: nosniff