Home
Version 3
Spaces API

Spaces API

Associate Auditor with the Space by Username

PUT v2/spaces/:guid/auditors

Request

Route

PUT v2/spaces/86c5f7d9-5d5d-4500-baa4-d01b131daf9f/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.eyJ1c2VyX2lkIjoidWFhLWlkLTI4IiwiZW1haWwiOiJlbWFpbC0yMEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDUzMzEwOTcxfQ.XMmsXGHPlHFd-8TsNoC_iLG6mgn_hs_0XycU90dnfY0
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/86c5f7d9-5d5d-4500-baa4-d01b131daf9f/auditors" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4IiwiZW1haWwiOiJlbWFpbC0yMEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDUzMzEwOTcxfQ.XMmsXGHPlHFd-8TsNoC_iLG6mgn_hs_0XycU90dnfY0" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "86c5f7d9-5d5d-4500-baa4-d01b131daf9f",
    "url": "/v2/spaces/86c5f7d9-5d5d-4500-baa4-d01b131daf9f",
    "created_at": "2016-01-13T17:29:31Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-62",
    "organization_guid": "2b18cfbf-b518-4b96-8460-17c88d13b8ee",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/2b18cfbf-b518-4b96-8460-17c88d13b8ee",
    "developers_url": "/v2/spaces/86c5f7d9-5d5d-4500-baa4-d01b131daf9f/developers",
    "managers_url": "/v2/spaces/86c5f7d9-5d5d-4500-baa4-d01b131daf9f/managers",
    "auditors_url": "/v2/spaces/86c5f7d9-5d5d-4500-baa4-d01b131daf9f/auditors",
    "apps_url": "/v2/spaces/86c5f7d9-5d5d-4500-baa4-d01b131daf9f/apps",
    "routes_url": "/v2/spaces/86c5f7d9-5d5d-4500-baa4-d01b131daf9f/routes",
    "domains_url": "/v2/spaces/86c5f7d9-5d5d-4500-baa4-d01b131daf9f/domains",
    "service_instances_url": "/v2/spaces/86c5f7d9-5d5d-4500-baa4-d01b131daf9f/service_instances",
    "app_events_url": "/v2/spaces/86c5f7d9-5d5d-4500-baa4-d01b131daf9f/app_events",
    "events_url": "/v2/spaces/86c5f7d9-5d5d-4500-baa4-d01b131daf9f/events",
    "security_groups_url": "/v2/spaces/86c5f7d9-5d5d-4500-baa4-d01b131daf9f/security_groups"
  }
}

Headers

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