Home
Version 3
Spaces API

Spaces API

Update a Space

PUT /v2/spaces/:guid

Request

Route

PUT /v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c

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-28eff6f1-4888-4e58-8fc1-b22867b54a0a
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.eyJ1c2VyX2lkIjoidWFhLWlkLTQ3IiwiZW1haWwiOiJlbWFpbC0yN0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDM4NjQxNzg4fQ.pUf3m6WBkwH_WJ2Chwao_KzUUkwSIIXLX_FwtbakQR4
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c" -d '{
  "name": "New Space Name"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ3IiwiZW1haWwiOiJlbWFpbC0yN0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDM4NjQxNzg4fQ.pUf3m6WBkwH_WJ2Chwao_KzUUkwSIIXLX_FwtbakQR4" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "e7b9e252-88cb-415c-ace4-2864922e550c",
    "url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c",
    "created_at": "2015-07-27T22:43:08Z",
    "updated_at": "2015-07-27T22:43:08Z"
  },
  "entity": {
    "name": "New Space Name",
    "organization_guid": "71c72756-e8b8-4c4a-b832-b3f9e3052c70",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/71c72756-e8b8-4c4a-b832-b3f9e3052c70",
    "developers_url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/developers",
    "managers_url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/managers",
    "auditors_url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/auditors",
    "apps_url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/apps",
    "routes_url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/routes",
    "domains_url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/domains",
    "service_instances_url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/service_instances",
    "app_events_url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/app_events",
    "events_url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/events",
    "security_groups_url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: ae657616-1fb5-436a-a288-365699bddf8e
Content-Length: 1301
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.space.update

Attribute Name Value
id 13
guid 05b99e65-53d8-4272-bf82-69f2e342123e
created_at 2015-07-27 22:43:08 UTC
updated_at
timestamp 2015-07-27 22:43:08 UTC
type audit.space.update
actor uaa-id-47
actor_type user
actee e7b9e252-88cb-415c-ace4-2864922e550c
actee_type space
metadata
{
  "request": {
    "name": "New Space Name"
  }
}
space_id
organization_guid 71c72756-e8b8-4c4a-b832-b3f9e3052c70
space_guid e7b9e252-88cb-415c-ace4-2864922e550c
actor_name email-27@somedomain.com
actee_name New Space Name