Home
Version 3
Users API

Users API

Associate Audited Space with the User

PUT /v2/users/:guid/audited_spaces/:audited_space_guid

Request

Route

PUT /v2/users/uaa-id-237/audited_spaces/a2effb8a-9a8f-4402-b661-6a26dfccf288

Parameters

Name Description Valid Values Example Values
guid The guid of the User
audited_space_guid The guid of the audited space

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIzOCIsImVtYWlsIjoiZW1haWwtMTQ0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjEzNzQ2MzJ9.Zk1OpRpWM2HlBZwO_3IYWsOl5GeQIjMO1Ruxt9Aww0g
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-237/audited_spaces/a2effb8a-9a8f-4402-b661-6a26dfccf288" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIzOCIsImVtYWlsIjoiZW1haWwtMTQ0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjEzNzQ2MzJ9.Zk1OpRpWM2HlBZwO_3IYWsOl5GeQIjMO1Ruxt9Aww0g" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-237",
    "url": "/v2/users/uaa-id-237",
    "created_at": "2016-04-16T01:23:52Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "1348c911-36fc-4c33-8c34-c770b63b80be",
    "default_space_url": "/v2/spaces/1348c911-36fc-4c33-8c34-c770b63b80be",
    "spaces_url": "/v2/users/uaa-id-237/spaces",
    "organizations_url": "/v2/users/uaa-id-237/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-237/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-237/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-237/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-237/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-237/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 718b0360-e731-43e3-93d9-89d88c6ba570
Content-Length: 845
X-Content-Type-Options: nosniff