Home
Version 3
Spaces API

Spaces API

Update a Space

PUT /v2/spaces/:guid

Request

Route

PUT /v2/spaces/65ee9039-bdbe-466b-abe3-17ac9030ce06

Parameters

Name Description Valid Values Example Values
guid The guid of the Space

Body

Name Description Default Valid Values Example Values
name The name of the space
  • development
  • demo
  • production
organization_guid The guid of the associated organization
  • guid-71fd59c7-790c-4348-bd62-93503f20364d
developer_guids The list of the associated developers
manager_guids The list of the associated managers
auditor_guids The list of the associated auditors
domain_guids The list of the associated domains
security_group_guids The list of the associated security groups
allow_ssh Whether or not Space Developers can enable ssh on apps in the space
{
  "name": "New Space Name"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4NSIsImVtYWlsIjoiZW1haWwtMTkzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjA1MDY2NTJ9.0C_KqRQ16fts7M2OEzCCMHi5GmfPZIsPQGCLUUUCagU
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/65ee9039-bdbe-466b-abe3-17ac9030ce06" -d '{
  "name": "New Space Name"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4NSIsImVtYWlsIjoiZW1haWwtMTkzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjA1MDY2NTJ9.0C_KqRQ16fts7M2OEzCCMHi5GmfPZIsPQGCLUUUCagU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "65ee9039-bdbe-466b-abe3-17ac9030ce06",
    "url": "/v2/spaces/65ee9039-bdbe-466b-abe3-17ac9030ce06",
    "created_at": "2016-04-06T00:17:32Z",
    "updated_at": "2016-04-06T00:17:32Z"
  },
  "entity": {
    "name": "New Space Name",
    "organization_guid": "d0e3f45e-45ff-44bb-a1df-463b5df83ecd",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/d0e3f45e-45ff-44bb-a1df-463b5df83ecd",
    "developers_url": "/v2/spaces/65ee9039-bdbe-466b-abe3-17ac9030ce06/developers",
    "managers_url": "/v2/spaces/65ee9039-bdbe-466b-abe3-17ac9030ce06/managers",
    "auditors_url": "/v2/spaces/65ee9039-bdbe-466b-abe3-17ac9030ce06/auditors",
    "apps_url": "/v2/spaces/65ee9039-bdbe-466b-abe3-17ac9030ce06/apps",
    "routes_url": "/v2/spaces/65ee9039-bdbe-466b-abe3-17ac9030ce06/routes",
    "domains_url": "/v2/spaces/65ee9039-bdbe-466b-abe3-17ac9030ce06/domains",
    "service_instances_url": "/v2/spaces/65ee9039-bdbe-466b-abe3-17ac9030ce06/service_instances",
    "app_events_url": "/v2/spaces/65ee9039-bdbe-466b-abe3-17ac9030ce06/app_events",
    "events_url": "/v2/spaces/65ee9039-bdbe-466b-abe3-17ac9030ce06/events",
    "security_groups_url": "/v2/spaces/65ee9039-bdbe-466b-abe3-17ac9030ce06/security_groups"
  }
}

Headers

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

Audit Records Created By The Request

Audit Record: audit.space.update

Attribute Name Value
id 36
guid c2be5166-396f-4e5a-91fc-a1f33bdeba88
created_at 2016-04-06 00:17:32 UTC
updated_at
timestamp 2016-04-06 00:17:32 UTC
type audit.space.update
actor uaa-id-285
actor_type user
actee 65ee9039-bdbe-466b-abe3-17ac9030ce06
actee_type space
metadata
{
  "request": {
    "name": "New Space Name"
  }
}
space_id
organization_guid d0e3f45e-45ff-44bb-a1df-463b5df83ecd
space_guid 65ee9039-bdbe-466b-abe3-17ac9030ce06
actor_name email-193@somedomain.com
actee_name New Space Name