Home
Version 3
Spaces API

Spaces API

Associate Auditor with the Space by Username

PUT v2/spaces/:guid/auditors

Request

Route

PUT v2/spaces/d6ff63f6-2707-4499-921e-c8d8cb119529/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.eyJ1c2VyX2lkIjoidWFhLWlkLTEzOCIsImVtYWlsIjoiZW1haWwtNzNAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NDI2MDY0MH0.2Kzo2_DN9Me3gS-rz_p22-_BPDxo3F5bD0IsQmYOntY
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/d6ff63f6-2707-4499-921e-c8d8cb119529/auditors" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzOCIsImVtYWlsIjoiZW1haWwtNzNAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NDI2MDY0MH0.2Kzo2_DN9Me3gS-rz_p22-_BPDxo3F5bD0IsQmYOntY" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "d6ff63f6-2707-4499-921e-c8d8cb119529",
    "url": "/v2/spaces/d6ff63f6-2707-4499-921e-c8d8cb119529",
    "created_at": "2015-09-30T23:30:40Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1212",
    "organization_guid": "85c4ad43-c6d9-45bc-8bdc-b77f1ff47bc3",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/85c4ad43-c6d9-45bc-8bdc-b77f1ff47bc3",
    "developers_url": "/v2/spaces/d6ff63f6-2707-4499-921e-c8d8cb119529/developers",
    "managers_url": "/v2/spaces/d6ff63f6-2707-4499-921e-c8d8cb119529/managers",
    "auditors_url": "/v2/spaces/d6ff63f6-2707-4499-921e-c8d8cb119529/auditors",
    "apps_url": "/v2/spaces/d6ff63f6-2707-4499-921e-c8d8cb119529/apps",
    "routes_url": "/v2/spaces/d6ff63f6-2707-4499-921e-c8d8cb119529/routes",
    "domains_url": "/v2/spaces/d6ff63f6-2707-4499-921e-c8d8cb119529/domains",
    "service_instances_url": "/v2/spaces/d6ff63f6-2707-4499-921e-c8d8cb119529/service_instances",
    "app_events_url": "/v2/spaces/d6ff63f6-2707-4499-921e-c8d8cb119529/app_events",
    "events_url": "/v2/spaces/d6ff63f6-2707-4499-921e-c8d8cb119529/events",
    "security_groups_url": "/v2/spaces/d6ff63f6-2707-4499-921e-c8d8cb119529/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: f965c063-815b-44be-bbb3-36b4ac1aa546
Content-Length: 1278
X-Content-Type-Options: nosniff