Home
Version 3
Spaces API

Spaces API

Update a Space

PUT /v2/spaces/:guid

Request

Route

PUT /v2/spaces/f4bff0f6-3262-474b-adfa-5703f61e3c07

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-08d53d1a-527a-4807-a62f-00fefd2fef0c
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
{
  "name": "New Space Name"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwMiIsImVtYWlsIjoiZW1haWwtODFAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNjYzMzkwMH0.XGXOW2-zKETX7KDbVdG34lQeClkQnfXJgVcIUOCmZ7o
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/f4bff0f6-3262-474b-adfa-5703f61e3c07" -d '{
  "name": "New Space Name"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwMiIsImVtYWlsIjoiZW1haWwtODFAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNjYzMzkwMH0.XGXOW2-zKETX7KDbVdG34lQeClkQnfXJgVcIUOCmZ7o" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "f4bff0f6-3262-474b-adfa-5703f61e3c07",
    "url": "/v2/spaces/f4bff0f6-3262-474b-adfa-5703f61e3c07",
    "created_at": "2015-03-10T23:11:40Z",
    "updated_at": "2015-03-10T23:11:40Z"
  },
  "entity": {
    "name": "New Space Name",
    "organization_guid": "587cbea4-c7ba-404a-8dfd-7332bce47997",
    "space_quota_definition_guid": null,
    "organization_url": "/v2/organizations/587cbea4-c7ba-404a-8dfd-7332bce47997",
    "developers_url": "/v2/spaces/f4bff0f6-3262-474b-adfa-5703f61e3c07/developers",
    "managers_url": "/v2/spaces/f4bff0f6-3262-474b-adfa-5703f61e3c07/managers",
    "auditors_url": "/v2/spaces/f4bff0f6-3262-474b-adfa-5703f61e3c07/auditors",
    "apps_url": "/v2/spaces/f4bff0f6-3262-474b-adfa-5703f61e3c07/apps",
    "routes_url": "/v2/spaces/f4bff0f6-3262-474b-adfa-5703f61e3c07/routes",
    "domains_url": "/v2/spaces/f4bff0f6-3262-474b-adfa-5703f61e3c07/domains",
    "service_instances_url": "/v2/spaces/f4bff0f6-3262-474b-adfa-5703f61e3c07/service_instances",
    "app_events_url": "/v2/spaces/f4bff0f6-3262-474b-adfa-5703f61e3c07/app_events",
    "events_url": "/v2/spaces/f4bff0f6-3262-474b-adfa-5703f61e3c07/events",
    "security_groups_url": "/v2/spaces/f4bff0f6-3262-474b-adfa-5703f61e3c07/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: e5d4c5e1-cace-48fa-99a2-7c01f5ce1a00
Content-Length: 1278
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.space.update

Attribute Name Value
id 26
guid db865696-7201-4f88-99f1-0cecc5af65ec
created_at 2015-03-10 23:11:40 UTC
updated_at
timestamp 2015-03-10 23:11:40 UTC
type audit.space.update
actor uaa-id-102
actor_type user
actee f4bff0f6-3262-474b-adfa-5703f61e3c07
actee_type space
metadata
{
  "request": {
    "name": "New Space Name"
  }
}
space_id 66
organization_guid 587cbea4-c7ba-404a-8dfd-7332bce47997
space_guid f4bff0f6-3262-474b-adfa-5703f61e3c07
actor_name email-81@somedomain.com
actee_name New Space Name