Home
Version 3
Spaces API

Spaces API

Update a Space

PUT /v2/spaces/:guid

Fields

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-133121bc-9e36-4927-9bd7-014c87238071
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

Parameters

Name Description Valid Values Example Values
guid The guid of the Space

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3MiIsImVtYWlsIjoiZW1haWwtMjEyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjIzMjM1NTB9.ebCqC0G_MvhXYpNP6-TuK6cGqlOHuT5b9cf8pgMg46w
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/spaces/29e69a28-e803-484d-aa22-654f28059234

Body

{
  "name": "New Space Name"
}

cURL

curl "https://api.[your-domain.com]/v2/spaces/29e69a28-e803-484d-aa22-654f28059234" -d '{
  "name": "New Space Name"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3MiIsImVtYWlsIjoiZW1haWwtMjEyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjIzMjM1NTB9.ebCqC0G_MvhXYpNP6-TuK6cGqlOHuT5b9cf8pgMg46w" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: f94d68f3-71be-4f37-aaca-83a1ee7964b2
Content-Length: 1288
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "29e69a28-e803-484d-aa22-654f28059234",
    "url": "/v2/spaces/29e69a28-e803-484d-aa22-654f28059234",
    "created_at": "2015-01-20T01:52:30+00:00",
    "updated_at": "2015-01-20T01:52:30+00:00"
  },
  "entity": {
    "name": "New Space Name",
    "organization_guid": "2e9249a5-d440-4875-a282-d8ac869a37c9",
    "space_quota_definition_guid": null,
    "organization_url": "/v2/organizations/2e9249a5-d440-4875-a282-d8ac869a37c9",
    "developers_url": "/v2/spaces/29e69a28-e803-484d-aa22-654f28059234/developers",
    "managers_url": "/v2/spaces/29e69a28-e803-484d-aa22-654f28059234/managers",
    "auditors_url": "/v2/spaces/29e69a28-e803-484d-aa22-654f28059234/auditors",
    "apps_url": "/v2/spaces/29e69a28-e803-484d-aa22-654f28059234/apps",
    "routes_url": "/v2/spaces/29e69a28-e803-484d-aa22-654f28059234/routes",
    "domains_url": "/v2/spaces/29e69a28-e803-484d-aa22-654f28059234/domains",
    "service_instances_url": "/v2/spaces/29e69a28-e803-484d-aa22-654f28059234/service_instances",
    "app_events_url": "/v2/spaces/29e69a28-e803-484d-aa22-654f28059234/app_events",
    "events_url": "/v2/spaces/29e69a28-e803-484d-aa22-654f28059234/events",
    "security_groups_url": "/v2/spaces/29e69a28-e803-484d-aa22-654f28059234/security_groups"
  }
}

Audit Records Created By The Request

Audit Record: audit.space.update

Attribute Name Value
id 164
guid 00283c9c-1079-468b-ac28-3dd87034faf1
created_at 2015-01-20 01:52:30 +0000
updated_at
timestamp 2015-01-20 01:52:30 +0000
type audit.space.update
actor uaa-id-272
actor_type user
actee 29e69a28-e803-484d-aa22-654f28059234
actee_type space
metadata
{
  "request": {
    "name": "New Space Name"
  }
}
space_id 205
organization_guid 2e9249a5-d440-4875-a282-d8ac869a37c9
space_guid 29e69a28-e803-484d-aa22-654f28059234
actor_name email-212@somedomain.com
actee_name New Space Name