Home
Version 3
Spaces API

Spaces API

Associate Developer with the Space by Username

PUT v2/spaces/:guid/developers

Request

Route

PUT v2/spaces/955349e3-d964-4d98-8da5-84d5ff60b4ba/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.eyJ1c2VyX2lkIjoidWFhLWlkLTE4NSIsImVtYWlsIjoiZW1haWwtMTA2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NDB9.Wm63V1RM7VlLmenFlZ96Zj1vvs1KgsDJOfs6ffMumc0
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/955349e3-d964-4d98-8da5-84d5ff60b4ba/developers" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4NSIsImVtYWlsIjoiZW1haWwtMTA2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NDB9.Wm63V1RM7VlLmenFlZ96Zj1vvs1KgsDJOfs6ffMumc0" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "955349e3-d964-4d98-8da5-84d5ff60b4ba",
    "url": "/v2/spaces/955349e3-d964-4d98-8da5-84d5ff60b4ba",
    "created_at": "2015-10-15T23:52:20Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1394",
    "organization_guid": "2284a912-1531-48af-9abd-9eec5d7e1f3c",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/2284a912-1531-48af-9abd-9eec5d7e1f3c",
    "developers_url": "/v2/spaces/955349e3-d964-4d98-8da5-84d5ff60b4ba/developers",
    "managers_url": "/v2/spaces/955349e3-d964-4d98-8da5-84d5ff60b4ba/managers",
    "auditors_url": "/v2/spaces/955349e3-d964-4d98-8da5-84d5ff60b4ba/auditors",
    "apps_url": "/v2/spaces/955349e3-d964-4d98-8da5-84d5ff60b4ba/apps",
    "routes_url": "/v2/spaces/955349e3-d964-4d98-8da5-84d5ff60b4ba/routes",
    "domains_url": "/v2/spaces/955349e3-d964-4d98-8da5-84d5ff60b4ba/domains",
    "service_instances_url": "/v2/spaces/955349e3-d964-4d98-8da5-84d5ff60b4ba/service_instances",
    "app_events_url": "/v2/spaces/955349e3-d964-4d98-8da5-84d5ff60b4ba/app_events",
    "events_url": "/v2/spaces/955349e3-d964-4d98-8da5-84d5ff60b4ba/events",
    "security_groups_url": "/v2/spaces/955349e3-d964-4d98-8da5-84d5ff60b4ba/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 37b36b46-83e4-4e77-8d56-a5dfcc98815c
Content-Length: 1278
X-Content-Type-Options: nosniff