Home
Version 3
Spaces API

Spaces API

Associate Developer with the Space by Username

PUT v2/spaces/:guid/developers

Request

Route

PUT v2/spaces/41cf9a95-7d8c-4af8-8b29-af39ba825419/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.eyJ1c2VyX2lkIjoidWFhLWlkLTQxMCIsImVtYWlsIjoiZW1haWwtMjc4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg5MDJ9.0gBe42MAK2jM9jy0EZz_2DoLAccCYokeULzaePgAhC4
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/41cf9a95-7d8c-4af8-8b29-af39ba825419/developers" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQxMCIsImVtYWlsIjoiZW1haWwtMjc4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg5MDJ9.0gBe42MAK2jM9jy0EZz_2DoLAccCYokeULzaePgAhC4" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "41cf9a95-7d8c-4af8-8b29-af39ba825419",
    "url": "/v2/spaces/41cf9a95-7d8c-4af8-8b29-af39ba825419",
    "created_at": "2016-06-08T16:41:42Z",
    "updated_at": "2016-06-08T16:41:26Z"
  },
  "entity": {
    "name": "name-2142",
    "organization_guid": "f88230a1-913c-417e-b0e2-d2a59bf0fa7d",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/f88230a1-913c-417e-b0e2-d2a59bf0fa7d",
    "developers_url": "/v2/spaces/41cf9a95-7d8c-4af8-8b29-af39ba825419/developers",
    "managers_url": "/v2/spaces/41cf9a95-7d8c-4af8-8b29-af39ba825419/managers",
    "auditors_url": "/v2/spaces/41cf9a95-7d8c-4af8-8b29-af39ba825419/auditors",
    "apps_url": "/v2/spaces/41cf9a95-7d8c-4af8-8b29-af39ba825419/apps",
    "routes_url": "/v2/spaces/41cf9a95-7d8c-4af8-8b29-af39ba825419/routes",
    "domains_url": "/v2/spaces/41cf9a95-7d8c-4af8-8b29-af39ba825419/domains",
    "service_instances_url": "/v2/spaces/41cf9a95-7d8c-4af8-8b29-af39ba825419/service_instances",
    "app_events_url": "/v2/spaces/41cf9a95-7d8c-4af8-8b29-af39ba825419/app_events",
    "events_url": "/v2/spaces/41cf9a95-7d8c-4af8-8b29-af39ba825419/events",
    "security_groups_url": "/v2/spaces/41cf9a95-7d8c-4af8-8b29-af39ba825419/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 1f91847d-77ea-48f5-b07c-78f19ca4d78f
Content-Length: 1278
X-Content-Type-Options: nosniff