Home
Version 3
Spaces API

Spaces API

Associate Auditor with the Space by Username

PUT v2/spaces/:guid/auditors

Request

Route

PUT v2/spaces/798a23ff-90df-4e68-a7a1-51bedc970114/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.eyJ1c2VyX2lkIjoidWFhLWlkLTI2MiIsImVtYWlsIjoiZW1haWwtMTk0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MDV9.d_XdctRkhqQYcvm9zdC_AkH7fU0_0NU8qBWoUOoWL6w
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/798a23ff-90df-4e68-a7a1-51bedc970114/auditors" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2MiIsImVtYWlsIjoiZW1haWwtMTk0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MDV9.d_XdctRkhqQYcvm9zdC_AkH7fU0_0NU8qBWoUOoWL6w" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "798a23ff-90df-4e68-a7a1-51bedc970114",
    "url": "/v2/spaces/798a23ff-90df-4e68-a7a1-51bedc970114",
    "created_at": "2016-04-22T19:33:25Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-976",
    "organization_guid": "f27a53d3-ce65-451b-885d-88733e8bf5b7",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/f27a53d3-ce65-451b-885d-88733e8bf5b7",
    "developers_url": "/v2/spaces/798a23ff-90df-4e68-a7a1-51bedc970114/developers",
    "managers_url": "/v2/spaces/798a23ff-90df-4e68-a7a1-51bedc970114/managers",
    "auditors_url": "/v2/spaces/798a23ff-90df-4e68-a7a1-51bedc970114/auditors",
    "apps_url": "/v2/spaces/798a23ff-90df-4e68-a7a1-51bedc970114/apps",
    "routes_url": "/v2/spaces/798a23ff-90df-4e68-a7a1-51bedc970114/routes",
    "domains_url": "/v2/spaces/798a23ff-90df-4e68-a7a1-51bedc970114/domains",
    "service_instances_url": "/v2/spaces/798a23ff-90df-4e68-a7a1-51bedc970114/service_instances",
    "app_events_url": "/v2/spaces/798a23ff-90df-4e68-a7a1-51bedc970114/app_events",
    "events_url": "/v2/spaces/798a23ff-90df-4e68-a7a1-51bedc970114/events",
    "security_groups_url": "/v2/spaces/798a23ff-90df-4e68-a7a1-51bedc970114/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: c270160f-3849-4ac4-8164-d4aee2bef030
Content-Length: 1277
X-Content-Type-Options: nosniff