Home
Version 3
Spaces API

Spaces API

Associate Developer with the Space by Username

PUT v2/spaces/:guid/developers

Request

Route

PUT v2/spaces/5d687916-bb90-48cf-98d1-d21504545ac0/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.eyJ1c2VyX2lkIjoidWFhLWlkLTQ2IiwiZW1haWwiOiJlbWFpbC0yN0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ1MzYyMjk3fQ.O2r_fKaZZwq5Mbqvw7nDewxiWPnEhOMMpik-82xsPGc
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/5d687916-bb90-48cf-98d1-d21504545ac0/developers" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ2IiwiZW1haWwiOiJlbWFpbC0yN0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ1MzYyMjk3fQ.O2r_fKaZZwq5Mbqvw7nDewxiWPnEhOMMpik-82xsPGc" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "5d687916-bb90-48cf-98d1-d21504545ac0",
    "url": "/v2/spaces/5d687916-bb90-48cf-98d1-d21504545ac0",
    "created_at": "2015-10-13T17:31:37Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-123",
    "organization_guid": "421d734b-7ab5-4428-8753-572f6e0c1d81",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/421d734b-7ab5-4428-8753-572f6e0c1d81",
    "developers_url": "/v2/spaces/5d687916-bb90-48cf-98d1-d21504545ac0/developers",
    "managers_url": "/v2/spaces/5d687916-bb90-48cf-98d1-d21504545ac0/managers",
    "auditors_url": "/v2/spaces/5d687916-bb90-48cf-98d1-d21504545ac0/auditors",
    "apps_url": "/v2/spaces/5d687916-bb90-48cf-98d1-d21504545ac0/apps",
    "routes_url": "/v2/spaces/5d687916-bb90-48cf-98d1-d21504545ac0/routes",
    "domains_url": "/v2/spaces/5d687916-bb90-48cf-98d1-d21504545ac0/domains",
    "service_instances_url": "/v2/spaces/5d687916-bb90-48cf-98d1-d21504545ac0/service_instances",
    "app_events_url": "/v2/spaces/5d687916-bb90-48cf-98d1-d21504545ac0/app_events",
    "events_url": "/v2/spaces/5d687916-bb90-48cf-98d1-d21504545ac0/events",
    "security_groups_url": "/v2/spaces/5d687916-bb90-48cf-98d1-d21504545ac0/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 182f0fe1-096e-4271-98ba-d7733e939848
Content-Length: 1277
X-Content-Type-Options: nosniff