Update a Space
PUT /v2/spaces/:guid
Request
Route
PUT /v2/spaces/bf7a599f-c634-4f67-8183-5605732bc72e
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-2b03b513-5426-40a1-8a0a-9e9b73fe6b20
|
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
cURL
curl "https://api.[your-domain.com]/v2/spaces/bf7a599f-c634-4f67-8183-5605732bc72e" -d '{
"name": "New Space Name"
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MSIsImVtYWlsIjoiZW1haWwtMTY3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MDZ9.tcWILb7Uv_gWQC0RQx9FiAlUlgRQTvsEjmoIJMIFDsI" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "bf7a599f-c634-4f67-8183-5605732bc72e",
"url": "/v2/spaces/bf7a599f-c634-4f67-8183-5605732bc72e",
"created_at": "2015-08-31T21:50:06Z",
"updated_at": "2015-08-31T21:50:06Z"
},
"entity": {
"name": "New Space Name",
"organization_guid": "086f7693-3931-4113-a059-e33303b2bb54",
"space_quota_definition_guid": null,
"allow_ssh": true,
"organization_url": "/v2/organizations/086f7693-3931-4113-a059-e33303b2bb54",
"developers_url": "/v2/spaces/bf7a599f-c634-4f67-8183-5605732bc72e/developers",
"managers_url": "/v2/spaces/bf7a599f-c634-4f67-8183-5605732bc72e/managers",
"auditors_url": "/v2/spaces/bf7a599f-c634-4f67-8183-5605732bc72e/auditors",
"apps_url": "/v2/spaces/bf7a599f-c634-4f67-8183-5605732bc72e/apps",
"routes_url": "/v2/spaces/bf7a599f-c634-4f67-8183-5605732bc72e/routes",
"domains_url": "/v2/spaces/bf7a599f-c634-4f67-8183-5605732bc72e/domains",
"service_instances_url": "/v2/spaces/bf7a599f-c634-4f67-8183-5605732bc72e/service_instances",
"app_events_url": "/v2/spaces/bf7a599f-c634-4f67-8183-5605732bc72e/app_events",
"events_url": "/v2/spaces/bf7a599f-c634-4f67-8183-5605732bc72e/events",
"security_groups_url": "/v2/spaces/bf7a599f-c634-4f67-8183-5605732bc72e/security_groups"
}
}
Headers
Audit Records Created By The Request
Audit Record: audit.space.update
Attribute Name |
Value |
id
|
42
|
guid
|
e8e09b79-098c-49a4-a376-ec82bfe40c5f
|
created_at
|
2015-08-31 21:50:06 UTC
|
updated_at
|
|
timestamp
|
2015-08-31 21:50:06 UTC
|
type
|
audit.space.update
|
actor
|
uaa-id-241
|
actor_type
|
user
|
actee
|
bf7a599f-c634-4f67-8183-5605732bc72e
|
actee_type
|
space
|
metadata
|
{
"request": {
"name": "New Space Name"
}
}
|
space_id
|
|
organization_guid
|
086f7693-3931-4113-a059-e33303b2bb54
|
space_guid
|
bf7a599f-c634-4f67-8183-5605732bc72e
|
actor_name
|
email-167@somedomain.com
|
actee_name
|
New Space Name
|