Home
Version 3
Spaces API

Spaces API

Associate Developer with the Space by Username

PUT v2/spaces/:guid/developers

Request

Route

PUT v2/spaces/a30144f2-46b3-4827-9e13-3e019b593c83/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.eyJ1c2VyX2lkIjoidWFhLWlkLTIzNCIsImVtYWlsIjoiZW1haWwtMTU0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjM2MTg3MTd9.x9_VtlYsSotNZuc_J2MiFUlH3wCcdWviNGPDUKfVSHw
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/a30144f2-46b3-4827-9e13-3e019b593c83/developers" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIzNCIsImVtYWlsIjoiZW1haWwtMTU0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjM2MTg3MTd9.x9_VtlYsSotNZuc_J2MiFUlH3wCcdWviNGPDUKfVSHw" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "a30144f2-46b3-4827-9e13-3e019b593c83",
    "url": "/v2/spaces/a30144f2-46b3-4827-9e13-3e019b593c83",
    "created_at": "2016-05-12T00:45:17Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1569",
    "organization_guid": "49a180d3-5a76-4a85-a986-0debb58af122",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/49a180d3-5a76-4a85-a986-0debb58af122",
    "developers_url": "/v2/spaces/a30144f2-46b3-4827-9e13-3e019b593c83/developers",
    "managers_url": "/v2/spaces/a30144f2-46b3-4827-9e13-3e019b593c83/managers",
    "auditors_url": "/v2/spaces/a30144f2-46b3-4827-9e13-3e019b593c83/auditors",
    "apps_url": "/v2/spaces/a30144f2-46b3-4827-9e13-3e019b593c83/apps",
    "routes_url": "/v2/spaces/a30144f2-46b3-4827-9e13-3e019b593c83/routes",
    "domains_url": "/v2/spaces/a30144f2-46b3-4827-9e13-3e019b593c83/domains",
    "service_instances_url": "/v2/spaces/a30144f2-46b3-4827-9e13-3e019b593c83/service_instances",
    "app_events_url": "/v2/spaces/a30144f2-46b3-4827-9e13-3e019b593c83/app_events",
    "events_url": "/v2/spaces/a30144f2-46b3-4827-9e13-3e019b593c83/events",
    "security_groups_url": "/v2/spaces/a30144f2-46b3-4827-9e13-3e019b593c83/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 52207cff-e434-4edd-b695-f868696fcd16
Content-Length: 1278
X-Content-Type-Options: nosniff