Home
Version 3
Spaces API

Spaces API

Update a Space

PUT /v2/spaces/:guid

Request

Route

PUT /v2/spaces/77451b28-1c7d-4ca1-acab-4ccf74d94f24

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-8bd5e2a9-bbe5-4c41-bf33-2fdacca2e2c7
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.eyJ1c2VyX2lkIjoidWFhLWlkLTMwNCIsImVtYWlsIjoiZW1haWwtMjE0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzk0MjYyMDl9.2utqw7CSL2vJJ_SiQOYfyIJzdSxdwTujcB0IQ3PRom8
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/77451b28-1c7d-4ca1-acab-4ccf74d94f24" -d '{
  "name": "New Space Name"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMwNCIsImVtYWlsIjoiZW1haWwtMjE0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzk0MjYyMDl9.2utqw7CSL2vJJ_SiQOYfyIJzdSxdwTujcB0IQ3PRom8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "77451b28-1c7d-4ca1-acab-4ccf74d94f24",
    "url": "/v2/spaces/77451b28-1c7d-4ca1-acab-4ccf74d94f24",
    "created_at": "2015-08-06T00:36:49Z",
    "updated_at": "2015-08-06T00:36:49Z"
  },
  "entity": {
    "name": "New Space Name",
    "organization_guid": "81afbf2e-29b3-435d-8442-52f34b83c9b2",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/81afbf2e-29b3-435d-8442-52f34b83c9b2",
    "developers_url": "/v2/spaces/77451b28-1c7d-4ca1-acab-4ccf74d94f24/developers",
    "managers_url": "/v2/spaces/77451b28-1c7d-4ca1-acab-4ccf74d94f24/managers",
    "auditors_url": "/v2/spaces/77451b28-1c7d-4ca1-acab-4ccf74d94f24/auditors",
    "apps_url": "/v2/spaces/77451b28-1c7d-4ca1-acab-4ccf74d94f24/apps",
    "routes_url": "/v2/spaces/77451b28-1c7d-4ca1-acab-4ccf74d94f24/routes",
    "domains_url": "/v2/spaces/77451b28-1c7d-4ca1-acab-4ccf74d94f24/domains",
    "service_instances_url": "/v2/spaces/77451b28-1c7d-4ca1-acab-4ccf74d94f24/service_instances",
    "app_events_url": "/v2/spaces/77451b28-1c7d-4ca1-acab-4ccf74d94f24/app_events",
    "events_url": "/v2/spaces/77451b28-1c7d-4ca1-acab-4ccf74d94f24/events",
    "security_groups_url": "/v2/spaces/77451b28-1c7d-4ca1-acab-4ccf74d94f24/security_groups"
  }
}

Headers

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

Audit Records Created By The Request

Audit Record: audit.space.update

Attribute Name Value
id 16
guid 25fd16ef-c3e5-4166-8b8f-7b327eb9b3c6
created_at 2015-08-06 00:36:49 UTC
updated_at
timestamp 2015-08-06 00:36:49 UTC
type audit.space.update
actor uaa-id-304
actor_type user
actee 77451b28-1c7d-4ca1-acab-4ccf74d94f24
actee_type space
metadata
{
  "request": {
    "name": "New Space Name"
  }
}
space_id
organization_guid 81afbf2e-29b3-435d-8442-52f34b83c9b2
space_guid 77451b28-1c7d-4ca1-acab-4ccf74d94f24
actor_name email-214@somedomain.com
actee_name New Space Name