Home
Version 3
Spaces API

Spaces API

Associate Auditor with the Space by Username

PUT v2/spaces/:guid/auditors

Request

Route

PUT v2/spaces/93c8fce2-4a1d-42fa-adbf-570cce2f23e6/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.eyJ1c2VyX2lkIjoidWFhLWlkLTIzMyIsImVtYWlsIjoiZW1haWwtMTcxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjA1MDY2NTF9.KCoNY_2vnEr6pi_5Zf4CcV5g6nKFjUvbUw6IUkxb0Zs
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/93c8fce2-4a1d-42fa-adbf-570cce2f23e6/auditors" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIzMyIsImVtYWlsIjoiZW1haWwtMTcxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjA1MDY2NTF9.KCoNY_2vnEr6pi_5Zf4CcV5g6nKFjUvbUw6IUkxb0Zs" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "93c8fce2-4a1d-42fa-adbf-570cce2f23e6",
    "url": "/v2/spaces/93c8fce2-4a1d-42fa-adbf-570cce2f23e6",
    "created_at": "2016-04-06T00:17:31Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-929",
    "organization_guid": "399f2297-caf7-4f0f-8053-10a2016245c0",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/399f2297-caf7-4f0f-8053-10a2016245c0",
    "developers_url": "/v2/spaces/93c8fce2-4a1d-42fa-adbf-570cce2f23e6/developers",
    "managers_url": "/v2/spaces/93c8fce2-4a1d-42fa-adbf-570cce2f23e6/managers",
    "auditors_url": "/v2/spaces/93c8fce2-4a1d-42fa-adbf-570cce2f23e6/auditors",
    "apps_url": "/v2/spaces/93c8fce2-4a1d-42fa-adbf-570cce2f23e6/apps",
    "routes_url": "/v2/spaces/93c8fce2-4a1d-42fa-adbf-570cce2f23e6/routes",
    "domains_url": "/v2/spaces/93c8fce2-4a1d-42fa-adbf-570cce2f23e6/domains",
    "service_instances_url": "/v2/spaces/93c8fce2-4a1d-42fa-adbf-570cce2f23e6/service_instances",
    "app_events_url": "/v2/spaces/93c8fce2-4a1d-42fa-adbf-570cce2f23e6/app_events",
    "events_url": "/v2/spaces/93c8fce2-4a1d-42fa-adbf-570cce2f23e6/events",
    "security_groups_url": "/v2/spaces/93c8fce2-4a1d-42fa-adbf-570cce2f23e6/security_groups"
  }
}

Headers

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