Home
Version 3
Spaces API

Spaces API

Update a Space

PUT /v2/spaces/:guid

Request

Route

PUT /v2/spaces/85585946-db07-4e3e-8975-e6f49ab17827

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-3dff76c1-1084-4fd3-b11c-60b17534c080
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

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTUiLCJlbWFpbCI6ImVtYWlsLTVAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ1MTQxMzY3NX0.sD9F9NgE6gxOEAyWLOIf4ZySWLeKsELHG_RtQsmOl10
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/85585946-db07-4e3e-8975-e6f49ab17827" -d '{
  "name": "New Space Name"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTUiLCJlbWFpbCI6ImVtYWlsLTVAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ1MTQxMzY3NX0.sD9F9NgE6gxOEAyWLOIf4ZySWLeKsELHG_RtQsmOl10" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "85585946-db07-4e3e-8975-e6f49ab17827",
    "url": "/v2/spaces/85585946-db07-4e3e-8975-e6f49ab17827",
    "created_at": "2015-12-22T18:27:55Z",
    "updated_at": "2015-12-22T18:27:55Z"
  },
  "entity": {
    "name": "New Space Name",
    "organization_guid": "ca910759-b3be-4ec9-91ac-6fac9b90e413",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/ca910759-b3be-4ec9-91ac-6fac9b90e413",
    "developers_url": "/v2/spaces/85585946-db07-4e3e-8975-e6f49ab17827/developers",
    "managers_url": "/v2/spaces/85585946-db07-4e3e-8975-e6f49ab17827/managers",
    "auditors_url": "/v2/spaces/85585946-db07-4e3e-8975-e6f49ab17827/auditors",
    "apps_url": "/v2/spaces/85585946-db07-4e3e-8975-e6f49ab17827/apps",
    "routes_url": "/v2/spaces/85585946-db07-4e3e-8975-e6f49ab17827/routes",
    "domains_url": "/v2/spaces/85585946-db07-4e3e-8975-e6f49ab17827/domains",
    "service_instances_url": "/v2/spaces/85585946-db07-4e3e-8975-e6f49ab17827/service_instances",
    "app_events_url": "/v2/spaces/85585946-db07-4e3e-8975-e6f49ab17827/app_events",
    "events_url": "/v2/spaces/85585946-db07-4e3e-8975-e6f49ab17827/events",
    "security_groups_url": "/v2/spaces/85585946-db07-4e3e-8975-e6f49ab17827/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 
Content-Length: 1301
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.space.update

Attribute Name Value
id 3
guid 44a4f425-e4f0-4460-9308-e6de9f6f8134
created_at 2015-12-22 18:27:55 UTC
updated_at
timestamp 2015-12-22 18:27:55 UTC
type audit.space.update
actor uaa-id-5
actor_type user
actee 85585946-db07-4e3e-8975-e6f49ab17827
actee_type space
metadata
{
  "request": {
    "name": "New Space Name"
  }
}
space_id
organization_guid ca910759-b3be-4ec9-91ac-6fac9b90e413
space_guid 85585946-db07-4e3e-8975-e6f49ab17827
actor_name email-5@somedomain.com
actee_name New Space Name