Home
Version 3
Spaces API

Spaces API

Update a Space

PUT /v2/spaces/:guid

Request

Route

PUT /v2/spaces/f8263041-8077-41d9-9f98-a2aa6c201c20

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-847afe42-74ff-429c-bd83-c67b2f63a2e9
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.eyJ1c2VyX2lkIjoidWFhLWlkLTEwNyIsImVtYWlsIjoiZW1haWwtNjlAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNzMyMzk2MH0.dp4ZnF1yEC53twYQIegLAtdkN0m6AN2FJ4C8oyCc9tM
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/f8263041-8077-41d9-9f98-a2aa6c201c20" -d '{
  "name": "New Space Name"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwNyIsImVtYWlsIjoiZW1haWwtNjlAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNzMyMzk2MH0.dp4ZnF1yEC53twYQIegLAtdkN0m6AN2FJ4C8oyCc9tM" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "f8263041-8077-41d9-9f98-a2aa6c201c20",
    "url": "/v2/spaces/f8263041-8077-41d9-9f98-a2aa6c201c20",
    "created_at": "2015-03-18T22:52:39Z",
    "updated_at": "2015-03-18T22:52:39Z"
  },
  "entity": {
    "name": "New Space Name",
    "organization_guid": "8abb7448-b499-4ce6-8d69-cc5bfbc1abeb",
    "space_quota_definition_guid": null,
    "organization_url": "/v2/organizations/8abb7448-b499-4ce6-8d69-cc5bfbc1abeb",
    "developers_url": "/v2/spaces/f8263041-8077-41d9-9f98-a2aa6c201c20/developers",
    "managers_url": "/v2/spaces/f8263041-8077-41d9-9f98-a2aa6c201c20/managers",
    "auditors_url": "/v2/spaces/f8263041-8077-41d9-9f98-a2aa6c201c20/auditors",
    "apps_url": "/v2/spaces/f8263041-8077-41d9-9f98-a2aa6c201c20/apps",
    "routes_url": "/v2/spaces/f8263041-8077-41d9-9f98-a2aa6c201c20/routes",
    "domains_url": "/v2/spaces/f8263041-8077-41d9-9f98-a2aa6c201c20/domains",
    "service_instances_url": "/v2/spaces/f8263041-8077-41d9-9f98-a2aa6c201c20/service_instances",
    "app_events_url": "/v2/spaces/f8263041-8077-41d9-9f98-a2aa6c201c20/app_events",
    "events_url": "/v2/spaces/f8263041-8077-41d9-9f98-a2aa6c201c20/events",
    "security_groups_url": "/v2/spaces/f8263041-8077-41d9-9f98-a2aa6c201c20/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: b8e853de-b239-4f36-bced-1e1db7404d5e
Content-Length: 1278
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.space.update

Attribute Name Value
id 10
guid c74ea550-4f84-4df4-9621-1fc975222ae6
created_at 2015-03-18 22:52:39 UTC
updated_at
timestamp 2015-03-18 22:52:39 UTC
type audit.space.update
actor uaa-id-107
actor_type user
actee f8263041-8077-41d9-9f98-a2aa6c201c20
actee_type space
metadata
{
  "request": {
    "name": "New Space Name"
  }
}
space_id 19
organization_guid 8abb7448-b499-4ce6-8d69-cc5bfbc1abeb
space_guid f8263041-8077-41d9-9f98-a2aa6c201c20
actor_name email-69@somedomain.com
actee_name New Space Name