Home
Version 3
Spaces API

Spaces API

Update a Space

PUT /v2/spaces/:guid

Request

Route

PUT /v2/spaces/864f6355-0ff1-4e96-a4a4-5003dbe5de00

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-4b66bd94-b32d-4256-be0a-89f68a01a927
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.eyJ1c2VyX2lkIjoidWFhLWlkLTIxNSIsImVtYWlsIjoiZW1haWwtMTE5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NDJ9.xmIQCTsGxXx3M04NUze8lVIbXVom880UEdSi5tKJByE
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/864f6355-0ff1-4e96-a4a4-5003dbe5de00" -d '{
  "name": "New Space Name"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIxNSIsImVtYWlsIjoiZW1haWwtMTE5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NDJ9.xmIQCTsGxXx3M04NUze8lVIbXVom880UEdSi5tKJByE" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "864f6355-0ff1-4e96-a4a4-5003dbe5de00",
    "url": "/v2/spaces/864f6355-0ff1-4e96-a4a4-5003dbe5de00",
    "created_at": "2015-10-15T23:52:22Z",
    "updated_at": "2015-10-15T23:52:22Z"
  },
  "entity": {
    "name": "New Space Name",
    "organization_guid": "23abebb2-6429-473d-94fc-15d96551f9b8",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/23abebb2-6429-473d-94fc-15d96551f9b8",
    "developers_url": "/v2/spaces/864f6355-0ff1-4e96-a4a4-5003dbe5de00/developers",
    "managers_url": "/v2/spaces/864f6355-0ff1-4e96-a4a4-5003dbe5de00/managers",
    "auditors_url": "/v2/spaces/864f6355-0ff1-4e96-a4a4-5003dbe5de00/auditors",
    "apps_url": "/v2/spaces/864f6355-0ff1-4e96-a4a4-5003dbe5de00/apps",
    "routes_url": "/v2/spaces/864f6355-0ff1-4e96-a4a4-5003dbe5de00/routes",
    "domains_url": "/v2/spaces/864f6355-0ff1-4e96-a4a4-5003dbe5de00/domains",
    "service_instances_url": "/v2/spaces/864f6355-0ff1-4e96-a4a4-5003dbe5de00/service_instances",
    "app_events_url": "/v2/spaces/864f6355-0ff1-4e96-a4a4-5003dbe5de00/app_events",
    "events_url": "/v2/spaces/864f6355-0ff1-4e96-a4a4-5003dbe5de00/events",
    "security_groups_url": "/v2/spaces/864f6355-0ff1-4e96-a4a4-5003dbe5de00/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: ca222f84-19e1-4b0c-ab72-47b7ac748e21
Content-Length: 1301
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.space.update

Attribute Name Value
id 175
guid 247b9362-2133-4819-8da4-a16622368bec
created_at 2015-10-15 23:52:22 UTC
updated_at
timestamp 2015-10-15 23:52:22 UTC
type audit.space.update
actor uaa-id-215
actor_type user
actee 864f6355-0ff1-4e96-a4a4-5003dbe5de00
actee_type space
metadata
{
  "request": {
    "name": "New Space Name"
  }
}
space_id
organization_guid 23abebb2-6429-473d-94fc-15d96551f9b8
space_guid 864f6355-0ff1-4e96-a4a4-5003dbe5de00
actor_name email-119@somedomain.com
actee_name New Space Name