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-a55d666f-d00e-4d0c-822e-c0448906b0e6
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.eyJ1c2VyX2lkIjoidWFhLWlkLTE2MyIsImVtYWlsIjoiZW1haWwtMTI2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTU3NTQxMzh9.LwEeg2BITvQuL1ZPc3RaOyZMCubj5ked3VN0ghCtZZo
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/spaces/57adbef5-317f-4d35-a809-bc0e8f0f9048

Body

{
  "name": "New Space Name"
}

cURL

curl "https://api.[your-domain.com]/v2/spaces/57adbef5-317f-4d35-a809-bc0e8f0f9048" -d '{
  "name": "New Space Name"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2MyIsImVtYWlsIjoiZW1haWwtMTI2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTU3NTQxMzh9.LwEeg2BITvQuL1ZPc3RaOyZMCubj5ked3VN0ghCtZZo" \
	-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: 68ecb56f-8fa1-418f-a311-d9899efe558f
Content-Length: 1288
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "57adbef5-317f-4d35-a809-bc0e8f0f9048",
    "url": "/v2/spaces/57adbef5-317f-4d35-a809-bc0e8f0f9048",
    "created_at": "2014-11-05T01:02:18+00:00",
    "updated_at": "2014-11-05T01:02:18+00:00"
  },
  "entity": {
    "name": "New Space Name",
    "organization_guid": "e71e01bf-213d-423d-a32d-48a905a77f66",
    "space_quota_definition_guid": null,
    "organization_url": "/v2/organizations/e71e01bf-213d-423d-a32d-48a905a77f66",
    "developers_url": "/v2/spaces/57adbef5-317f-4d35-a809-bc0e8f0f9048/developers",
    "managers_url": "/v2/spaces/57adbef5-317f-4d35-a809-bc0e8f0f9048/managers",
    "auditors_url": "/v2/spaces/57adbef5-317f-4d35-a809-bc0e8f0f9048/auditors",
    "apps_url": "/v2/spaces/57adbef5-317f-4d35-a809-bc0e8f0f9048/apps",
    "routes_url": "/v2/spaces/57adbef5-317f-4d35-a809-bc0e8f0f9048/routes",
    "domains_url": "/v2/spaces/57adbef5-317f-4d35-a809-bc0e8f0f9048/domains",
    "service_instances_url": "/v2/spaces/57adbef5-317f-4d35-a809-bc0e8f0f9048/service_instances",
    "app_events_url": "/v2/spaces/57adbef5-317f-4d35-a809-bc0e8f0f9048/app_events",
    "events_url": "/v2/spaces/57adbef5-317f-4d35-a809-bc0e8f0f9048/events",
    "security_groups_url": "/v2/spaces/57adbef5-317f-4d35-a809-bc0e8f0f9048/security_groups"
  }
}

Audit Records Created By The Request

Audit Record: audit.space.update

Attribute Name Value
id 44
guid 069b6314-0841-4749-b76a-77a7ad2f9230
created_at 2014-11-05 01:02:18 +0000
updated_at
timestamp 2014-11-05 01:02:18 +0000
type audit.space.update
actor uaa-id-163
actor_type user
actee 57adbef5-317f-4d35-a809-bc0e8f0f9048
actee_type space
metadata
{
  "request": {
    "name": "New Space Name"
  }
}
space_id 114
organization_guid e71e01bf-213d-423d-a32d-48a905a77f66
space_guid 57adbef5-317f-4d35-a809-bc0e8f0f9048
actor_name email-126@somedomain.com
actee_name New Space Name