Home
Version 3
Spaces API

Spaces API

Associate Auditor with the Space by Username

PUT v2/spaces/:guid/auditors

Request

Route

PUT v2/spaces/856d019f-6286-4870-b996-6502d61c348f/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.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NCIsImVtYWlsIjoiZW1haWwtMTYxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDgwMzg5NTh9.rWQy8uZp6gHNUsP-GnXareMjCMufWJ0uDnLGlDUIjFo
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/856d019f-6286-4870-b996-6502d61c348f/auditors" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NCIsImVtYWlsIjoiZW1haWwtMTYxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDgwMzg5NTh9.rWQy8uZp6gHNUsP-GnXareMjCMufWJ0uDnLGlDUIjFo" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "856d019f-6286-4870-b996-6502d61c348f",
    "url": "/v2/spaces/856d019f-6286-4870-b996-6502d61c348f",
    "created_at": "2015-11-13T17:02:38Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1452",
    "organization_guid": "781d9b06-a8c9-426f-9ecb-ce727434e227",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/781d9b06-a8c9-426f-9ecb-ce727434e227",
    "developers_url": "/v2/spaces/856d019f-6286-4870-b996-6502d61c348f/developers",
    "managers_url": "/v2/spaces/856d019f-6286-4870-b996-6502d61c348f/managers",
    "auditors_url": "/v2/spaces/856d019f-6286-4870-b996-6502d61c348f/auditors",
    "apps_url": "/v2/spaces/856d019f-6286-4870-b996-6502d61c348f/apps",
    "routes_url": "/v2/spaces/856d019f-6286-4870-b996-6502d61c348f/routes",
    "domains_url": "/v2/spaces/856d019f-6286-4870-b996-6502d61c348f/domains",
    "service_instances_url": "/v2/spaces/856d019f-6286-4870-b996-6502d61c348f/service_instances",
    "app_events_url": "/v2/spaces/856d019f-6286-4870-b996-6502d61c348f/app_events",
    "events_url": "/v2/spaces/856d019f-6286-4870-b996-6502d61c348f/events",
    "security_groups_url": "/v2/spaces/856d019f-6286-4870-b996-6502d61c348f/security_groups"
  }
}

Headers

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