Home
Version 3
Spaces API

Spaces API

Associate Auditor with the Space by Username

PUT v2/spaces/:guid/auditors

Request

Route

PUT v2/spaces/dacf8054-0dd0-426f-8d00-2a49442e1ae6/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.eyJ1c2VyX2lkIjoidWFhLWlkLTE2NiIsImVtYWlsIjoiZW1haWwtOTdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NTU1NzkzOX0.j6m6ruodtdoFQbMgb6InHmCmVG3e-a0q0I8-d_7OE0Y
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/dacf8054-0dd0-426f-8d00-2a49442e1ae6/auditors" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2NiIsImVtYWlsIjoiZW1haWwtOTdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NTU1NzkzOX0.j6m6ruodtdoFQbMgb6InHmCmVG3e-a0q0I8-d_7OE0Y" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "dacf8054-0dd0-426f-8d00-2a49442e1ae6",
    "url": "/v2/spaces/dacf8054-0dd0-426f-8d00-2a49442e1ae6",
    "created_at": "2015-10-15T23:52:19Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1360",
    "organization_guid": "fa7f6275-4a13-431e-bec9-45608752383d",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/fa7f6275-4a13-431e-bec9-45608752383d",
    "developers_url": "/v2/spaces/dacf8054-0dd0-426f-8d00-2a49442e1ae6/developers",
    "managers_url": "/v2/spaces/dacf8054-0dd0-426f-8d00-2a49442e1ae6/managers",
    "auditors_url": "/v2/spaces/dacf8054-0dd0-426f-8d00-2a49442e1ae6/auditors",
    "apps_url": "/v2/spaces/dacf8054-0dd0-426f-8d00-2a49442e1ae6/apps",
    "routes_url": "/v2/spaces/dacf8054-0dd0-426f-8d00-2a49442e1ae6/routes",
    "domains_url": "/v2/spaces/dacf8054-0dd0-426f-8d00-2a49442e1ae6/domains",
    "service_instances_url": "/v2/spaces/dacf8054-0dd0-426f-8d00-2a49442e1ae6/service_instances",
    "app_events_url": "/v2/spaces/dacf8054-0dd0-426f-8d00-2a49442e1ae6/app_events",
    "events_url": "/v2/spaces/dacf8054-0dd0-426f-8d00-2a49442e1ae6/events",
    "security_groups_url": "/v2/spaces/dacf8054-0dd0-426f-8d00-2a49442e1ae6/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 1b25a075-ceaa-4f32-a868-f96da174c1c1
Content-Length: 1278
X-Content-Type-Options: nosniff