Home
Version 3
Spaces API

Spaces API

Update a Space

PUT /v2/spaces/:guid

Request

Route

PUT /v2/spaces/13445252-d9d0-4993-b76a-14e655e23716

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-aa241d0b-d6e7-480b-90b4-c6f7ba2084e8
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.eyJ1c2VyX2lkIjoidWFhLWlkLTQwNiIsImVtYWlsIjoiZW1haWwtMzAyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzI3NzUwMDB9.ZmUtU3At3ILyw1Av9v3DF-y4b5qW_bjNU2BzqJaVn94
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/13445252-d9d0-4993-b76a-14e655e23716" -d '{
  "name": "New Space Name"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwNiIsImVtYWlsIjoiZW1haWwtMzAyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzI3NzUwMDB9.ZmUtU3At3ILyw1Av9v3DF-y4b5qW_bjNU2BzqJaVn94" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "13445252-d9d0-4993-b76a-14e655e23716",
    "url": "/v2/spaces/13445252-d9d0-4993-b76a-14e655e23716",
    "created_at": "2015-05-21T01:03:20Z",
    "updated_at": "2015-05-21T01:03:20Z"
  },
  "entity": {
    "name": "New Space Name",
    "organization_guid": "d10fe3dc-0128-49e7-a533-e8e7d3079387",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/d10fe3dc-0128-49e7-a533-e8e7d3079387",
    "developers_url": "/v2/spaces/13445252-d9d0-4993-b76a-14e655e23716/developers",
    "managers_url": "/v2/spaces/13445252-d9d0-4993-b76a-14e655e23716/managers",
    "auditors_url": "/v2/spaces/13445252-d9d0-4993-b76a-14e655e23716/auditors",
    "apps_url": "/v2/spaces/13445252-d9d0-4993-b76a-14e655e23716/apps",
    "routes_url": "/v2/spaces/13445252-d9d0-4993-b76a-14e655e23716/routes",
    "domains_url": "/v2/spaces/13445252-d9d0-4993-b76a-14e655e23716/domains",
    "service_instances_url": "/v2/spaces/13445252-d9d0-4993-b76a-14e655e23716/service_instances",
    "app_events_url": "/v2/spaces/13445252-d9d0-4993-b76a-14e655e23716/app_events",
    "events_url": "/v2/spaces/13445252-d9d0-4993-b76a-14e655e23716/events",
    "security_groups_url": "/v2/spaces/13445252-d9d0-4993-b76a-14e655e23716/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: f1b38975-934e-4dea-80c5-03b19f7d030d
Content-Length: 1301
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.space.update

Attribute Name Value
id 10
guid 4e177ddc-8ba3-4d22-9931-371718fdac27
created_at 2015-05-21 01:03:20 UTC
updated_at
timestamp 2015-05-21 01:03:20 UTC
type audit.space.update
actor uaa-id-406
actor_type user
actee 13445252-d9d0-4993-b76a-14e655e23716
actee_type space
metadata
{
  "request": {
    "name": "New Space Name"
  }
}
space_id 65
organization_guid d10fe3dc-0128-49e7-a533-e8e7d3079387
space_guid 13445252-d9d0-4993-b76a-14e655e23716
actor_name email-302@somedomain.com
actee_name New Space Name