Home
Version 3
Spaces API

Spaces API

Associate Developer with the Space by Username (experimental)

PUT v2/spaces/:guid/developers

Request

Route

PUT v2/spaces/67117806-b033-4114-965c-ccff3b5e9dd4/developers

Parameters

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

Headers

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

cURL

curl "https://api.[your-domain.com]v2/spaces/67117806-b033-4114-965c-ccff3b5e9dd4/developers" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE3IiwiZW1haWwiOiJlbWFpbC0xMkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQyNjAxNTI1fQ.uZ7039QzMMlZwhd1ogGtNyYTIbmvKiMPkDzmmbxnJmI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "67117806-b033-4114-965c-ccff3b5e9dd4",
    "url": "/v2/spaces/67117806-b033-4114-965c-ccff3b5e9dd4",
    "created_at": "2015-09-11T18:38:45Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-41",
    "organization_guid": "f8f39a20-a59b-48a4-8044-275a4dec47b2",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/f8f39a20-a59b-48a4-8044-275a4dec47b2",
    "developers_url": "/v2/spaces/67117806-b033-4114-965c-ccff3b5e9dd4/developers",
    "managers_url": "/v2/spaces/67117806-b033-4114-965c-ccff3b5e9dd4/managers",
    "auditors_url": "/v2/spaces/67117806-b033-4114-965c-ccff3b5e9dd4/auditors",
    "apps_url": "/v2/spaces/67117806-b033-4114-965c-ccff3b5e9dd4/apps",
    "routes_url": "/v2/spaces/67117806-b033-4114-965c-ccff3b5e9dd4/routes",
    "domains_url": "/v2/spaces/67117806-b033-4114-965c-ccff3b5e9dd4/domains",
    "service_instances_url": "/v2/spaces/67117806-b033-4114-965c-ccff3b5e9dd4/service_instances",
    "app_events_url": "/v2/spaces/67117806-b033-4114-965c-ccff3b5e9dd4/app_events",
    "events_url": "/v2/spaces/67117806-b033-4114-965c-ccff3b5e9dd4/events",
    "security_groups_url": "/v2/spaces/67117806-b033-4114-965c-ccff3b5e9dd4/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 9aa1a884-5334-4001-b8b4-e96a420dab27
Content-Length: 1276
X-Content-Type-Options: nosniff