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
origin The UAA origin that the user is registered with
  • ldap
{
  "username": "user@example.com"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQxMCIsImVtYWlsIjoiZW1haWwtMjc4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg5MDJ9.0gBe42MAK2jM9jy0EZz_2DoLAccCYokeULzaePgAhC4
Host: example.org
Content-Type: application/json
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/json" \
  -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",
    "staging_security_groups_url": "/v2/spaces/41cf9a95-7d8c-4af8-8b29-af39ba825419/staging_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

Audit Records Created By The Request

Audit Record: audit.user.space_developer_add

Attribute Name Value
id 3
guid 3ae5862c-fb43-49ed-935b-8feb7d0e19e8
created_at 2016-06-08 16:41:40 UTC
updated_at
timestamp 2016-06-08 16:41:40 UTC
type audit.user.space_developer_add
actor uaa-id-360
actor_type user
actee 2a01cf80-9fbf-448f-a7a0-1e415e28771e
actee_type space
metadata
{
  "request": null
}
organization_guid 28960823-1b68-4a2b-8f36-77cc573bccca
space_guid 2a01cf80-9fbf-448f-a7a0-1e415e28771e
actor_name email-254@somedomain.com
actee_name development