Home
Version 3
Spaces API

Spaces API

Update a Space

PUT /v2/spaces/:guid

Request

Route

PUT /v2/spaces/9ecf7586-d8ec-43fe-8428-372c9dcb3548

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-9036aec0-30fe-4d9a-b37e-7a1a6da4393d
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.eyJ1c2VyX2lkIjoidWFhLWlkLTEwIiwiZW1haWwiOiJlbWFpbC0xMEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDU0NDUxNjA2fQ.nCLteDSa9ZO2STPICjL4Wj-gkfQd-A1G5bYj6_3ZS6I
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/9ecf7586-d8ec-43fe-8428-372c9dcb3548" -d '{
  "name": "New Space Name"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwIiwiZW1haWwiOiJlbWFpbC0xMEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDU0NDUxNjA2fQ.nCLteDSa9ZO2STPICjL4Wj-gkfQd-A1G5bYj6_3ZS6I" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "9ecf7586-d8ec-43fe-8428-372c9dcb3548",
    "url": "/v2/spaces/9ecf7586-d8ec-43fe-8428-372c9dcb3548",
    "created_at": "2016-01-26T22:20:06Z",
    "updated_at": "2016-01-26T22:20:06Z"
  },
  "entity": {
    "name": "New Space Name",
    "organization_guid": "ecf91e48-8191-437f-812c-f0556e52ad99",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/ecf91e48-8191-437f-812c-f0556e52ad99",
    "developers_url": "/v2/spaces/9ecf7586-d8ec-43fe-8428-372c9dcb3548/developers",
    "managers_url": "/v2/spaces/9ecf7586-d8ec-43fe-8428-372c9dcb3548/managers",
    "auditors_url": "/v2/spaces/9ecf7586-d8ec-43fe-8428-372c9dcb3548/auditors",
    "apps_url": "/v2/spaces/9ecf7586-d8ec-43fe-8428-372c9dcb3548/apps",
    "routes_url": "/v2/spaces/9ecf7586-d8ec-43fe-8428-372c9dcb3548/routes",
    "domains_url": "/v2/spaces/9ecf7586-d8ec-43fe-8428-372c9dcb3548/domains",
    "service_instances_url": "/v2/spaces/9ecf7586-d8ec-43fe-8428-372c9dcb3548/service_instances",
    "app_events_url": "/v2/spaces/9ecf7586-d8ec-43fe-8428-372c9dcb3548/app_events",
    "events_url": "/v2/spaces/9ecf7586-d8ec-43fe-8428-372c9dcb3548/events",
    "security_groups_url": "/v2/spaces/9ecf7586-d8ec-43fe-8428-372c9dcb3548/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 6
guid 7b2f71ce-62e6-4ea0-9e57-0e91cf4b9c34
created_at 2016-01-26 22:20:06 UTC
updated_at
timestamp 2016-01-26 22:20:06 UTC
type audit.space.update
actor uaa-id-10
actor_type user
actee 9ecf7586-d8ec-43fe-8428-372c9dcb3548
actee_type space
metadata
{
  "request": {
    "name": "New Space Name"
  }
}
space_id
organization_guid ecf91e48-8191-437f-812c-f0556e52ad99
space_guid 9ecf7586-d8ec-43fe-8428-372c9dcb3548
actor_name email-10@somedomain.com
actee_name New Space Name