Home
Version 3
Spaces API

Spaces API

Associate Developer with the Space by Username

PUT v2/spaces/:guid/developers

Request

Route

PUT v2/spaces/045650c4-2288-40bf-98af-67250496a3ea/developers

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.eyJ1c2VyX2lkIjoidWFhLWlkLTMxMSIsImVtYWlsIjoiZW1haWwtMjE1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTM4MzcyNzd9.K8oGu0N0dLlrVVfG915Ih7szw7C1UhiTXmdPcdHULFw
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/045650c4-2288-40bf-98af-67250496a3ea/developers" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMxMSIsImVtYWlsIjoiZW1haWwtMjE1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTM4MzcyNzd9.K8oGu0N0dLlrVVfG915Ih7szw7C1UhiTXmdPcdHULFw" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "045650c4-2288-40bf-98af-67250496a3ea",
    "url": "/v2/spaces/045650c4-2288-40bf-98af-67250496a3ea",
    "created_at": "2016-01-19T19:41:17Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-2030",
    "organization_guid": "93776f1c-46da-45f6-9446-7b107c1e67a6",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/93776f1c-46da-45f6-9446-7b107c1e67a6",
    "developers_url": "/v2/spaces/045650c4-2288-40bf-98af-67250496a3ea/developers",
    "managers_url": "/v2/spaces/045650c4-2288-40bf-98af-67250496a3ea/managers",
    "auditors_url": "/v2/spaces/045650c4-2288-40bf-98af-67250496a3ea/auditors",
    "apps_url": "/v2/spaces/045650c4-2288-40bf-98af-67250496a3ea/apps",
    "routes_url": "/v2/spaces/045650c4-2288-40bf-98af-67250496a3ea/routes",
    "domains_url": "/v2/spaces/045650c4-2288-40bf-98af-67250496a3ea/domains",
    "service_instances_url": "/v2/spaces/045650c4-2288-40bf-98af-67250496a3ea/service_instances",
    "app_events_url": "/v2/spaces/045650c4-2288-40bf-98af-67250496a3ea/app_events",
    "events_url": "/v2/spaces/045650c4-2288-40bf-98af-67250496a3ea/events",
    "security_groups_url": "/v2/spaces/045650c4-2288-40bf-98af-67250496a3ea/security_groups"
  }
}

Headers

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