Home
Version 3
Spaces API

Spaces API

Update a Space

PUT /v2/spaces/:guid

Request

Route

PUT /v2/spaces/b5807ea5-bcb3-4003-b7a1-1b625951ca15

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-5d962bf0-9167-4346-8b4b-42104714a475
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
{
  "name": "New Space Name"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1NCIsImVtYWlsIjoiZW1haWwtMTg3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjYxODc3NTF9.EvrRFK-Z4IXmtm9A88P1PYi2iGZTRCR-hXO5OjbRA4I
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/b5807ea5-bcb3-4003-b7a1-1b625951ca15" -d '{
  "name": "New Space Name"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1NCIsImVtYWlsIjoiZW1haWwtMTg3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjYxODc3NTF9.EvrRFK-Z4IXmtm9A88P1PYi2iGZTRCR-hXO5OjbRA4I" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "b5807ea5-bcb3-4003-b7a1-1b625951ca15",
    "url": "/v2/spaces/b5807ea5-bcb3-4003-b7a1-1b625951ca15",
    "created_at": "2015-03-05T19:15:51Z",
    "updated_at": "2015-03-05T19:15:51Z"
  },
  "entity": {
    "name": "New Space Name",
    "organization_guid": "2640a2b2-1193-4c5f-9e79-690c6b9fc7ab",
    "space_quota_definition_guid": null,
    "organization_url": "/v2/organizations/2640a2b2-1193-4c5f-9e79-690c6b9fc7ab",
    "developers_url": "/v2/spaces/b5807ea5-bcb3-4003-b7a1-1b625951ca15/developers",
    "managers_url": "/v2/spaces/b5807ea5-bcb3-4003-b7a1-1b625951ca15/managers",
    "auditors_url": "/v2/spaces/b5807ea5-bcb3-4003-b7a1-1b625951ca15/auditors",
    "apps_url": "/v2/spaces/b5807ea5-bcb3-4003-b7a1-1b625951ca15/apps",
    "routes_url": "/v2/spaces/b5807ea5-bcb3-4003-b7a1-1b625951ca15/routes",
    "domains_url": "/v2/spaces/b5807ea5-bcb3-4003-b7a1-1b625951ca15/domains",
    "service_instances_url": "/v2/spaces/b5807ea5-bcb3-4003-b7a1-1b625951ca15/service_instances",
    "app_events_url": "/v2/spaces/b5807ea5-bcb3-4003-b7a1-1b625951ca15/app_events",
    "events_url": "/v2/spaces/b5807ea5-bcb3-4003-b7a1-1b625951ca15/events",
    "security_groups_url": "/v2/spaces/b5807ea5-bcb3-4003-b7a1-1b625951ca15/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 8ed267a0-1e84-4360-8a38-8964e9b68855
Content-Length: 1278
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.space.update

Attribute Name Value
id 19
guid 24a680b2-d7eb-44a3-9e0a-c15da1ce5cbc
created_at 2015-03-05 19:15:51 UTC
updated_at
timestamp 2015-03-05 19:15:51 UTC
type audit.space.update
actor uaa-id-254
actor_type user
actee b5807ea5-bcb3-4003-b7a1-1b625951ca15
actee_type space
metadata
{
  "request": {
    "name": "New Space Name"
  }
}
space_id 52
organization_guid 2640a2b2-1193-4c5f-9e79-690c6b9fc7ab
space_guid b5807ea5-bcb3-4003-b7a1-1b625951ca15
actor_name email-187@somedomain.com
actee_name New Space Name