Home
Version 3
Spaces API

Spaces API

Update a Space

PUT /v2/spaces/:guid

Fields

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-449d9488-405c-4c3a-ae80-f642b496863d
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

Parameters

Name Description Valid Values Example Values
guid The guid of the Space

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTY0IiwiZW1haWwiOiJlbWFpbC00NUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE5OTg5OTYzfQ.S8s-ufwdLt2PD-Yf-CfiYocNWfwvcXANV-vKFJC2vaI
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/spaces/3864ce32-94b5-4133-91a5-4243ae4f19a9

Body

{
  "name": "New Space Name"
}

cURL

curl "https://api.[your-domain.com]/v2/spaces/3864ce32-94b5-4133-91a5-4243ae4f19a9" -d '{
  "name": "New Space Name"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTY0IiwiZW1haWwiOiJlbWFpbC00NUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE5OTg5OTYzfQ.S8s-ufwdLt2PD-Yf-CfiYocNWfwvcXANV-vKFJC2vaI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 15a9f9fa-6fa5-4535-91e3-60360d7f614a
Content-Length: 1288
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "3864ce32-94b5-4133-91a5-4243ae4f19a9",
    "url": "/v2/spaces/3864ce32-94b5-4133-91a5-4243ae4f19a9",
    "created_at": "2014-12-24T01:39:23+00:00",
    "updated_at": "2014-12-24T01:39:23+00:00"
  },
  "entity": {
    "name": "New Space Name",
    "organization_guid": "8636e502-b7d0-4e26-be0a-3eb174f5256e",
    "space_quota_definition_guid": null,
    "organization_url": "/v2/organizations/8636e502-b7d0-4e26-be0a-3eb174f5256e",
    "developers_url": "/v2/spaces/3864ce32-94b5-4133-91a5-4243ae4f19a9/developers",
    "managers_url": "/v2/spaces/3864ce32-94b5-4133-91a5-4243ae4f19a9/managers",
    "auditors_url": "/v2/spaces/3864ce32-94b5-4133-91a5-4243ae4f19a9/auditors",
    "apps_url": "/v2/spaces/3864ce32-94b5-4133-91a5-4243ae4f19a9/apps",
    "routes_url": "/v2/spaces/3864ce32-94b5-4133-91a5-4243ae4f19a9/routes",
    "domains_url": "/v2/spaces/3864ce32-94b5-4133-91a5-4243ae4f19a9/domains",
    "service_instances_url": "/v2/spaces/3864ce32-94b5-4133-91a5-4243ae4f19a9/service_instances",
    "app_events_url": "/v2/spaces/3864ce32-94b5-4133-91a5-4243ae4f19a9/app_events",
    "events_url": "/v2/spaces/3864ce32-94b5-4133-91a5-4243ae4f19a9/events",
    "security_groups_url": "/v2/spaces/3864ce32-94b5-4133-91a5-4243ae4f19a9/security_groups"
  }
}

Audit Records Created By The Request

Audit Record: audit.space.update

Attribute Name Value
id 13
guid c73d3216-cb4e-4668-a0b8-821877ca480b
created_at 2014-12-24 01:39:23 +0000
updated_at
timestamp 2014-12-24 01:39:23 +0000
type audit.space.update
actor uaa-id-64
actor_type user
actee 3864ce32-94b5-4133-91a5-4243ae4f19a9
actee_type space
metadata
{
  "request": {
    "name": "New Space Name"
  }
}
space_id 27
organization_guid 8636e502-b7d0-4e26-be0a-3eb174f5256e
space_guid 3864ce32-94b5-4133-91a5-4243ae4f19a9
actor_name email-45@somedomain.com
actee_name New Space Name