Home
Version 3
Spaces API

Spaces API

Associate Developer with the Space by Username

PUT v2/spaces/:guid/developers

Request

Route

PUT v2/spaces/e9b14a4f-f555-4dc9-8000-ff8bdd11d2b4/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.eyJ1c2VyX2lkIjoidWFhLWlkLTQzIiwiZW1haWwiOiJlbWFpbC0yMkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDUxNDEzNjc2fQ.vNF0VEeasF49KzkWF690WnqHbSWDDpUQ4bqBLY5rd8Y
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/e9b14a4f-f555-4dc9-8000-ff8bdd11d2b4/developers" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQzIiwiZW1haWwiOiJlbWFpbC0yMkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDUxNDEzNjc2fQ.vNF0VEeasF49KzkWF690WnqHbSWDDpUQ4bqBLY5rd8Y" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "e9b14a4f-f555-4dc9-8000-ff8bdd11d2b4",
    "url": "/v2/spaces/e9b14a4f-f555-4dc9-8000-ff8bdd11d2b4",
    "created_at": "2015-12-22T18:27:56Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-77",
    "organization_guid": "f9241af4-0f96-49b7-a555-ad6ef92702ca",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/f9241af4-0f96-49b7-a555-ad6ef92702ca",
    "developers_url": "/v2/spaces/e9b14a4f-f555-4dc9-8000-ff8bdd11d2b4/developers",
    "managers_url": "/v2/spaces/e9b14a4f-f555-4dc9-8000-ff8bdd11d2b4/managers",
    "auditors_url": "/v2/spaces/e9b14a4f-f555-4dc9-8000-ff8bdd11d2b4/auditors",
    "apps_url": "/v2/spaces/e9b14a4f-f555-4dc9-8000-ff8bdd11d2b4/apps",
    "routes_url": "/v2/spaces/e9b14a4f-f555-4dc9-8000-ff8bdd11d2b4/routes",
    "domains_url": "/v2/spaces/e9b14a4f-f555-4dc9-8000-ff8bdd11d2b4/domains",
    "service_instances_url": "/v2/spaces/e9b14a4f-f555-4dc9-8000-ff8bdd11d2b4/service_instances",
    "app_events_url": "/v2/spaces/e9b14a4f-f555-4dc9-8000-ff8bdd11d2b4/app_events",
    "events_url": "/v2/spaces/e9b14a4f-f555-4dc9-8000-ff8bdd11d2b4/events",
    "security_groups_url": "/v2/spaces/e9b14a4f-f555-4dc9-8000-ff8bdd11d2b4/security_groups"
  }
}

Headers

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