Spaces API

Associate Manager with the Space by Username

PUT v2/spaces/:guid/managers

Request

Route

PUT v2/spaces/31a74bcf-88c7-4cb2-bdbd-435a190f5c6e/managers

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
origin The UAA origin that the user is registered with
  • ldap
{
  "username": "[email protected]"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4OSIsImVtYWlsIjoiZW1haWwtMjY5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg5MDF9.yViJCLReQHIJsxmjfvFfkjp_XptoKAMtTiLb3m8AwRc
Host: example.org
Content-Type: application/json
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/31a74bcf-88c7-4cb2-bdbd-435a190f5c6e/managers" -d '{
  "username": "[email protected]"
}' -X PUT \
  -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4OSIsImVtYWlsIjoiZW1haWwtMjY5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg5MDF9.yViJCLReQHIJsxmjfvFfkjp_XptoKAMtTiLb3m8AwRc" \
  -H "Host: example.org" \
  -H "Content-Type: application/json" \
  -H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "31a74bcf-88c7-4cb2-bdbd-435a190f5c6e",
    "url": "/v2/spaces/31a74bcf-88c7-4cb2-bdbd-435a190f5c6e",
    "created_at": "2016-06-08T16:41:41Z",
    "updated_at": "2016-06-08T16:41:26Z"
  },
  "entity": {
    "name": "name-2110",
    "organization_guid": "fb0a97ae-7dbc-478a-9bf7-e7869ac3d117",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/fb0a97ae-7dbc-478a-9bf7-e7869ac3d117",
    "developers_url": "/v2/spaces/31a74bcf-88c7-4cb2-bdbd-435a190f5c6e/developers",
    "managers_url": "/v2/spaces/31a74bcf-88c7-4cb2-bdbd-435a190f5c6e/managers",
    "auditors_url": "/v2/spaces/31a74bcf-88c7-4cb2-bdbd-435a190f5c6e/auditors",
    "apps_url": "/v2/spaces/31a74bcf-88c7-4cb2-bdbd-435a190f5c6e/apps",
    "routes_url": "/v2/spaces/31a74bcf-88c7-4cb2-bdbd-435a190f5c6e/routes",
    "domains_url": "/v2/spaces/31a74bcf-88c7-4cb2-bdbd-435a190f5c6e/domains",
    "service_instances_url": "/v2/spaces/31a74bcf-88c7-4cb2-bdbd-435a190f5c6e/service_instances",
    "app_events_url": "/v2/spaces/31a74bcf-88c7-4cb2-bdbd-435a190f5c6e/app_events",
    "events_url": "/v2/spaces/31a74bcf-88c7-4cb2-bdbd-435a190f5c6e/events",
    "security_groups_url": "/v2/spaces/31a74bcf-88c7-4cb2-bdbd-435a190f5c6e/security_groups",
    "staging_security_groups_url": "/v2/spaces/31a74bcf-88c7-4cb2-bdbd-435a190f5c6e/staging_security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 61caf710-59bd-4d1c-a975-7e18fff1fbbc
Content-Length: 1278
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.user.space_manager_add

Attribute Name Value
id 3
guid 3ae5862c-fb43-49ed-935b-8feb7d0e19e8
created_at 2016-06-08 16:41:40 UTC
updated_at
timestamp 2016-06-08 16:41:40 UTC
type audit.user.space_manager_add
actor uaa-id-360
actor_type user
actee 2a01cf80-9fbf-448f-a7a0-1e415e28771e
actee_type space
metadata
{
  "request": null
}
organization_guid 28960823-1b68-4a2b-8f36-77cc573bccca
space_guid 2a01cf80-9fbf-448f-a7a0-1e415e28771e
actor_name [email protected]
actee_name development