Home
Version 3
Spaces API

Spaces API

Associate Developer with the Space by Username

PUT v2/spaces/:guid/developers

Request

Route

PUT v2/spaces/c84fc816-1aa1-464e-9310-aefd6f2a6e3d/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.eyJ1c2VyX2lkIjoidWFhLWlkLTUwIiwiZW1haWwiOiJlbWFpbC0zMUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ0NzgyOTIxfQ.-nF0xb3ibFhZ7Qgjq21IISmkYPWq0wW-HdowaR1mglo
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/c84fc816-1aa1-464e-9310-aefd6f2a6e3d/developers" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTUwIiwiZW1haWwiOiJlbWFpbC0zMUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ0NzgyOTIxfQ.-nF0xb3ibFhZ7Qgjq21IISmkYPWq0wW-HdowaR1mglo" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "c84fc816-1aa1-464e-9310-aefd6f2a6e3d",
    "url": "/v2/spaces/c84fc816-1aa1-464e-9310-aefd6f2a6e3d",
    "created_at": "2015-10-07T00:35:21Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-114",
    "organization_guid": "d7cdf403-4de1-4e93-a3de-5994639ff8f2",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/d7cdf403-4de1-4e93-a3de-5994639ff8f2",
    "developers_url": "/v2/spaces/c84fc816-1aa1-464e-9310-aefd6f2a6e3d/developers",
    "managers_url": "/v2/spaces/c84fc816-1aa1-464e-9310-aefd6f2a6e3d/managers",
    "auditors_url": "/v2/spaces/c84fc816-1aa1-464e-9310-aefd6f2a6e3d/auditors",
    "apps_url": "/v2/spaces/c84fc816-1aa1-464e-9310-aefd6f2a6e3d/apps",
    "routes_url": "/v2/spaces/c84fc816-1aa1-464e-9310-aefd6f2a6e3d/routes",
    "domains_url": "/v2/spaces/c84fc816-1aa1-464e-9310-aefd6f2a6e3d/domains",
    "service_instances_url": "/v2/spaces/c84fc816-1aa1-464e-9310-aefd6f2a6e3d/service_instances",
    "app_events_url": "/v2/spaces/c84fc816-1aa1-464e-9310-aefd6f2a6e3d/app_events",
    "events_url": "/v2/spaces/c84fc816-1aa1-464e-9310-aefd6f2a6e3d/events",
    "security_groups_url": "/v2/spaces/c84fc816-1aa1-464e-9310-aefd6f2a6e3d/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: f8a94822-9f31-4e37-a323-7e79bc9c429b
Content-Length: 1277
X-Content-Type-Options: nosniff