Home
Version 3
Spaces API

Spaces API

Update a Space

PUT /v2/spaces/:guid

Request

Route

PUT /v2/spaces/835cc540-7882-4fd3-beef-6327a65995f8

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-dfc01d63-62e7-475d-9a31-37b5a313c2d6
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.eyJ1c2VyX2lkIjoidWFhLWlkLTE3MyIsImVtYWlsIjoiZW1haWwtMTExQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzM5ODExMDZ9.iOh-6BDDSGUnvxDlHvnV4TtB2XfrGO2EHBk3TJiozlg
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/835cc540-7882-4fd3-beef-6327a65995f8" -d '{
  "name": "New Space Name"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE3MyIsImVtYWlsIjoiZW1haWwtMTExQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzM5ODExMDZ9.iOh-6BDDSGUnvxDlHvnV4TtB2XfrGO2EHBk3TJiozlg" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "835cc540-7882-4fd3-beef-6327a65995f8",
    "url": "/v2/spaces/835cc540-7882-4fd3-beef-6327a65995f8",
    "created_at": "2015-06-04T00:05:06Z",
    "updated_at": "2015-06-04T00:05:06Z"
  },
  "entity": {
    "name": "New Space Name",
    "organization_guid": "af91a6f1-aa78-4328-a362-bd1852026456",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/af91a6f1-aa78-4328-a362-bd1852026456",
    "developers_url": "/v2/spaces/835cc540-7882-4fd3-beef-6327a65995f8/developers",
    "managers_url": "/v2/spaces/835cc540-7882-4fd3-beef-6327a65995f8/managers",
    "auditors_url": "/v2/spaces/835cc540-7882-4fd3-beef-6327a65995f8/auditors",
    "apps_url": "/v2/spaces/835cc540-7882-4fd3-beef-6327a65995f8/apps",
    "routes_url": "/v2/spaces/835cc540-7882-4fd3-beef-6327a65995f8/routes",
    "domains_url": "/v2/spaces/835cc540-7882-4fd3-beef-6327a65995f8/domains",
    "service_instances_url": "/v2/spaces/835cc540-7882-4fd3-beef-6327a65995f8/service_instances",
    "app_events_url": "/v2/spaces/835cc540-7882-4fd3-beef-6327a65995f8/app_events",
    "events_url": "/v2/spaces/835cc540-7882-4fd3-beef-6327a65995f8/events",
    "security_groups_url": "/v2/spaces/835cc540-7882-4fd3-beef-6327a65995f8/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: f921064c-0de3-4435-a21f-53162d7f9573
Content-Length: 1301
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.space.update

Attribute Name Value
id 5
guid 774869f9-5a75-4491-acb4-a6832b7dcfe4
created_at 2015-06-04 00:05:06 UTC
updated_at
timestamp 2015-06-04 00:05:06 UTC
type audit.space.update
actor uaa-id-173
actor_type user
actee 835cc540-7882-4fd3-beef-6327a65995f8
actee_type space
metadata
{
  "request": {
    "name": "New Space Name"
  }
}
space_id 4
organization_guid af91a6f1-aa78-4328-a362-bd1852026456
space_guid 835cc540-7882-4fd3-beef-6327a65995f8
actor_name email-111@somedomain.com
actee_name New Space Name