Update a Space
PUT /v2/spaces/:guid
Request
Route
PUT /v2/spaces/660beb03-7464-4582-9347-fa2968840110
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-38cb5c12-a20c-4d92-9cc2-03470c615b86
|
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/660beb03-7464-4582-9347-fa2968840110" -d '{
"name": "New Space Name"
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTgwIiwiZW1haWwiOiJlbWFpbC00NUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ0MjYwNjM5fQ.xQhwc64sJCI__SBDA_rLc2PlbRa8ABFwVMRmHLUljCA" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "660beb03-7464-4582-9347-fa2968840110",
"url": "/v2/spaces/660beb03-7464-4582-9347-fa2968840110",
"created_at": "2015-09-30T23:30:39Z",
"updated_at": "2015-09-30T23:30:39Z"
},
"entity": {
"name": "New Space Name",
"organization_guid": "e365f823-f92e-4135-a455-5a2e889373a6",
"space_quota_definition_guid": null,
"allow_ssh": true,
"organization_url": "/v2/organizations/e365f823-f92e-4135-a455-5a2e889373a6",
"developers_url": "/v2/spaces/660beb03-7464-4582-9347-fa2968840110/developers",
"managers_url": "/v2/spaces/660beb03-7464-4582-9347-fa2968840110/managers",
"auditors_url": "/v2/spaces/660beb03-7464-4582-9347-fa2968840110/auditors",
"apps_url": "/v2/spaces/660beb03-7464-4582-9347-fa2968840110/apps",
"routes_url": "/v2/spaces/660beb03-7464-4582-9347-fa2968840110/routes",
"domains_url": "/v2/spaces/660beb03-7464-4582-9347-fa2968840110/domains",
"service_instances_url": "/v2/spaces/660beb03-7464-4582-9347-fa2968840110/service_instances",
"app_events_url": "/v2/spaces/660beb03-7464-4582-9347-fa2968840110/app_events",
"events_url": "/v2/spaces/660beb03-7464-4582-9347-fa2968840110/events",
"security_groups_url": "/v2/spaces/660beb03-7464-4582-9347-fa2968840110/security_groups"
}
}
Headers
Audit Records Created By The Request
Audit Record: audit.space.update
Attribute Name |
Value |
id
|
1
|
guid
|
2eb28fcc-6eaa-4d8c-83e9-2d559e5fc9d5
|
created_at
|
2015-09-30 23:30:39 UTC
|
updated_at
|
|
timestamp
|
2015-09-30 23:30:39 UTC
|
type
|
audit.space.update
|
actor
|
uaa-id-80
|
actor_type
|
user
|
actee
|
660beb03-7464-4582-9347-fa2968840110
|
actee_type
|
space
|
metadata
|
{
"request": {
"name": "New Space Name"
}
}
|
space_id
|
|
organization_guid
|
e365f823-f92e-4135-a455-5a2e889373a6
|
space_guid
|
660beb03-7464-4582-9347-fa2968840110
|
actor_name
|
email-45@somedomain.com
|
actee_name
|
New Space Name
|