Home
Version 3
Spaces API

Spaces API

Associate Developer with the Space by Username

PUT v2/spaces/:guid/developers

Request

Route

PUT v2/spaces/687e524e-663b-4e3c-9f36-8e2e68f29b91/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.eyJ1c2VyX2lkIjoidWFhLWlkLTIyOSIsImVtYWlsIjoiZW1haWwtMTU0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDgwMzg5NTh9.qLxW5K1_VxlDGZ7O2TFRi-xhpQVcCjOo9TDI35O6dd4
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/687e524e-663b-4e3c-9f36-8e2e68f29b91/developers" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIyOSIsImVtYWlsIjoiZW1haWwtMTU0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDgwMzg5NTh9.qLxW5K1_VxlDGZ7O2TFRi-xhpQVcCjOo9TDI35O6dd4" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "687e524e-663b-4e3c-9f36-8e2e68f29b91",
    "url": "/v2/spaces/687e524e-663b-4e3c-9f36-8e2e68f29b91",
    "created_at": "2015-11-13T17:02:38Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1426",
    "organization_guid": "a673508e-29d0-414d-a1fe-e49eb3a4a8c2",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/a673508e-29d0-414d-a1fe-e49eb3a4a8c2",
    "developers_url": "/v2/spaces/687e524e-663b-4e3c-9f36-8e2e68f29b91/developers",
    "managers_url": "/v2/spaces/687e524e-663b-4e3c-9f36-8e2e68f29b91/managers",
    "auditors_url": "/v2/spaces/687e524e-663b-4e3c-9f36-8e2e68f29b91/auditors",
    "apps_url": "/v2/spaces/687e524e-663b-4e3c-9f36-8e2e68f29b91/apps",
    "routes_url": "/v2/spaces/687e524e-663b-4e3c-9f36-8e2e68f29b91/routes",
    "domains_url": "/v2/spaces/687e524e-663b-4e3c-9f36-8e2e68f29b91/domains",
    "service_instances_url": "/v2/spaces/687e524e-663b-4e3c-9f36-8e2e68f29b91/service_instances",
    "app_events_url": "/v2/spaces/687e524e-663b-4e3c-9f36-8e2e68f29b91/app_events",
    "events_url": "/v2/spaces/687e524e-663b-4e3c-9f36-8e2e68f29b91/events",
    "security_groups_url": "/v2/spaces/687e524e-663b-4e3c-9f36-8e2e68f29b91/security_groups"
  }
}

Headers

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