Update a Space
PUT /v2/spaces/:guid
Request
Route
PUT /v2/spaces/cdafb5cc-a042-4184-a428-d02e5f4e02e0
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-c86822c0-4906-4f65-8912-8061e89fafdc
|
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/cdafb5cc-a042-4184-a428-d02e5f4e02e0" -d '{
"name": "New Space Name"
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMxOCIsImVtYWlsIjoiZW1haWwtMjIwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MDd9.501s9GbH1NbXFQK-9CviAk9XyIDUpw1Ii6zGihwdvMU" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "cdafb5cc-a042-4184-a428-d02e5f4e02e0",
"url": "/v2/spaces/cdafb5cc-a042-4184-a428-d02e5f4e02e0",
"created_at": "2016-04-22T19:33:27Z",
"updated_at": "2016-04-22T19:33:27Z"
},
"entity": {
"name": "New Space Name",
"organization_guid": "d554de15-ef9a-495b-b4bf-2bea22d078d9",
"space_quota_definition_guid": null,
"allow_ssh": true,
"organization_url": "/v2/organizations/d554de15-ef9a-495b-b4bf-2bea22d078d9",
"developers_url": "/v2/spaces/cdafb5cc-a042-4184-a428-d02e5f4e02e0/developers",
"managers_url": "/v2/spaces/cdafb5cc-a042-4184-a428-d02e5f4e02e0/managers",
"auditors_url": "/v2/spaces/cdafb5cc-a042-4184-a428-d02e5f4e02e0/auditors",
"apps_url": "/v2/spaces/cdafb5cc-a042-4184-a428-d02e5f4e02e0/apps",
"routes_url": "/v2/spaces/cdafb5cc-a042-4184-a428-d02e5f4e02e0/routes",
"domains_url": "/v2/spaces/cdafb5cc-a042-4184-a428-d02e5f4e02e0/domains",
"service_instances_url": "/v2/spaces/cdafb5cc-a042-4184-a428-d02e5f4e02e0/service_instances",
"app_events_url": "/v2/spaces/cdafb5cc-a042-4184-a428-d02e5f4e02e0/app_events",
"events_url": "/v2/spaces/cdafb5cc-a042-4184-a428-d02e5f4e02e0/events",
"security_groups_url": "/v2/spaces/cdafb5cc-a042-4184-a428-d02e5f4e02e0/security_groups"
}
}
Headers
Audit Records Created By The Request
Audit Record: audit.space.update
Attribute Name |
Value |
id
|
43
|
guid
|
532b879d-f227-4901-af61-af7bbb94cf7c
|
created_at
|
2016-04-22 19:33:27 UTC
|
updated_at
|
|
timestamp
|
2016-04-22 19:33:27 UTC
|
type
|
audit.space.update
|
actor
|
uaa-id-318
|
actor_type
|
user
|
actee
|
cdafb5cc-a042-4184-a428-d02e5f4e02e0
|
actee_type
|
space
|
metadata
|
{
"request": {
"name": "New Space Name"
}
}
|
space_id
|
|
organization_guid
|
d554de15-ef9a-495b-b4bf-2bea22d078d9
|
space_guid
|
cdafb5cc-a042-4184-a428-d02e5f4e02e0
|
actor_name
|
email-220@somedomain.com
|
actee_name
|
New Space Name
|