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-c214a434-d6ff-4d82-a228-e205870c0fb5
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.eyJ1c2VyX2lkIjoidWFhLWlkLTMzMSIsImVtYWlsIjoiZW1haWwtMjUyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjI5OTA4ODR9.3WdPfpksB7IdmwJ7WuJryr_Y0fdspzfHMKe4Dt57FeU
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/spaces/78d96c07-368a-45b6-8788-adafcf6c9953

Body

{
  "name": "New Space Name"
}

cURL

curl "https://api.[your-domain.com]/v2/spaces/78d96c07-368a-45b6-8788-adafcf6c9953" -d '{
  "name": "New Space Name"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMzMSIsImVtYWlsIjoiZW1haWwtMjUyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjI5OTA4ODR9.3WdPfpksB7IdmwJ7WuJryr_Y0fdspzfHMKe4Dt57FeU" \
	-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: ebf16f60-cbaf-4a8d-9186-b8ead275ea23
Content-Length: 1278
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "78d96c07-368a-45b6-8788-adafcf6c9953",
    "url": "/v2/spaces/78d96c07-368a-45b6-8788-adafcf6c9953",
    "created_at": "2015-01-27T19:14:44Z",
    "updated_at": "2015-01-27T19:14:44Z"
  },
  "entity": {
    "name": "New Space Name",
    "organization_guid": "49a9596e-5d48-4964-bb02-b29258487d7e",
    "space_quota_definition_guid": null,
    "organization_url": "/v2/organizations/49a9596e-5d48-4964-bb02-b29258487d7e",
    "developers_url": "/v2/spaces/78d96c07-368a-45b6-8788-adafcf6c9953/developers",
    "managers_url": "/v2/spaces/78d96c07-368a-45b6-8788-adafcf6c9953/managers",
    "auditors_url": "/v2/spaces/78d96c07-368a-45b6-8788-adafcf6c9953/auditors",
    "apps_url": "/v2/spaces/78d96c07-368a-45b6-8788-adafcf6c9953/apps",
    "routes_url": "/v2/spaces/78d96c07-368a-45b6-8788-adafcf6c9953/routes",
    "domains_url": "/v2/spaces/78d96c07-368a-45b6-8788-adafcf6c9953/domains",
    "service_instances_url": "/v2/spaces/78d96c07-368a-45b6-8788-adafcf6c9953/service_instances",
    "app_events_url": "/v2/spaces/78d96c07-368a-45b6-8788-adafcf6c9953/app_events",
    "events_url": "/v2/spaces/78d96c07-368a-45b6-8788-adafcf6c9953/events",
    "security_groups_url": "/v2/spaces/78d96c07-368a-45b6-8788-adafcf6c9953/security_groups"
  }
}

Audit Records Created By The Request

Audit Record: audit.space.update

Attribute Name Value
id 29
guid 623fb2e2-1088-4bae-8734-95a211bd1ae7
created_at 2015-01-27 19:14:44 UTC
updated_at
timestamp 2015-01-27 19:14:44 UTC
type audit.space.update
actor uaa-id-331
actor_type user
actee 78d96c07-368a-45b6-8788-adafcf6c9953
actee_type space
metadata
{
  "request": {
    "name": "New Space Name"
  }
}
space_id 99
organization_guid 49a9596e-5d48-4964-bb02-b29258487d7e
space_guid 78d96c07-368a-45b6-8788-adafcf6c9953
actor_name email-252@somedomain.com
actee_name New Space Name