Home
Version 3
Spaces API

Spaces API

Associate Manager with the Space by Username (experimental)

PUT v2/spaces/:guid/managers

Request

Route

PUT v2/spaces/1b9289c1-da08-4e1b-b037-a97c2e3d3dad/managers

Parameters

Name Description Valid Values Example Values
guid The guid of the Space
manager_guid The guid of the manager
{
  "username": "user@example.com"
}

Headers

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

cURL

curl "https://api.[your-domain.com]v2/spaces/1b9289c1-da08-4e1b-b037-a97c2e3d3dad/managers" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM1IiwiZW1haWwiOiJlbWFpbC0yMEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQyNjAxNTI2fQ.aDXykjfIWWhF5hKely7xRJ0PD2p8YjOAMbVEuFE0IzY" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "1b9289c1-da08-4e1b-b037-a97c2e3d3dad",
    "url": "/v2/spaces/1b9289c1-da08-4e1b-b037-a97c2e3d3dad",
    "created_at": "2015-09-11T18:38:46Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-70",
    "organization_guid": "19128d97-7797-4a93-a158-918cf9a4729d",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/19128d97-7797-4a93-a158-918cf9a4729d",
    "developers_url": "/v2/spaces/1b9289c1-da08-4e1b-b037-a97c2e3d3dad/developers",
    "managers_url": "/v2/spaces/1b9289c1-da08-4e1b-b037-a97c2e3d3dad/managers",
    "auditors_url": "/v2/spaces/1b9289c1-da08-4e1b-b037-a97c2e3d3dad/auditors",
    "apps_url": "/v2/spaces/1b9289c1-da08-4e1b-b037-a97c2e3d3dad/apps",
    "routes_url": "/v2/spaces/1b9289c1-da08-4e1b-b037-a97c2e3d3dad/routes",
    "domains_url": "/v2/spaces/1b9289c1-da08-4e1b-b037-a97c2e3d3dad/domains",
    "service_instances_url": "/v2/spaces/1b9289c1-da08-4e1b-b037-a97c2e3d3dad/service_instances",
    "app_events_url": "/v2/spaces/1b9289c1-da08-4e1b-b037-a97c2e3d3dad/app_events",
    "events_url": "/v2/spaces/1b9289c1-da08-4e1b-b037-a97c2e3d3dad/events",
    "security_groups_url": "/v2/spaces/1b9289c1-da08-4e1b-b037-a97c2e3d3dad/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: b40b829e-b5a8-4f1c-80e8-a39471737e3c
Content-Length: 1276
X-Content-Type-Options: nosniff