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-8ad14d64-d22f-4784-801e-57c3d42c5607
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.eyJ1c2VyX2lkIjoidWFhLWlkLTMwMiIsImVtYWlsIjoiZW1haWwtMjI3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTc0NjIzNjh9.fdqZkv4wJb-GoVldNWoJov47CR_GhtrCQPmrSZydBWQ
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/spaces/b62621d0-ac4e-4d3a-9e79-fe5a059e9516

Body

{
  "name": "New Space Name"
}

cURL

curl "https://api.[your-domain.com]/v2/spaces/b62621d0-ac4e-4d3a-9e79-fe5a059e9516" -d '{
  "name": "New Space Name"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMwMiIsImVtYWlsIjoiZW1haWwtMjI3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTc0NjIzNjh9.fdqZkv4wJb-GoVldNWoJov47CR_GhtrCQPmrSZydBWQ" \
	-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: cbc48016-ec17-4609-8fb9-1c75f5bfa0fc
Content-Length: 1288
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "b62621d0-ac4e-4d3a-9e79-fe5a059e9516",
    "url": "/v2/spaces/b62621d0-ac4e-4d3a-9e79-fe5a059e9516",
    "created_at": "2014-11-24T19:32:48+00:00",
    "updated_at": "2014-11-24T19:32:48+00:00"
  },
  "entity": {
    "name": "New Space Name",
    "organization_guid": "ed1f3fa4-fea5-4a71-9407-4314e92337f8",
    "space_quota_definition_guid": null,
    "organization_url": "/v2/organizations/ed1f3fa4-fea5-4a71-9407-4314e92337f8",
    "developers_url": "/v2/spaces/b62621d0-ac4e-4d3a-9e79-fe5a059e9516/developers",
    "managers_url": "/v2/spaces/b62621d0-ac4e-4d3a-9e79-fe5a059e9516/managers",
    "auditors_url": "/v2/spaces/b62621d0-ac4e-4d3a-9e79-fe5a059e9516/auditors",
    "apps_url": "/v2/spaces/b62621d0-ac4e-4d3a-9e79-fe5a059e9516/apps",
    "routes_url": "/v2/spaces/b62621d0-ac4e-4d3a-9e79-fe5a059e9516/routes",
    "domains_url": "/v2/spaces/b62621d0-ac4e-4d3a-9e79-fe5a059e9516/domains",
    "service_instances_url": "/v2/spaces/b62621d0-ac4e-4d3a-9e79-fe5a059e9516/service_instances",
    "app_events_url": "/v2/spaces/b62621d0-ac4e-4d3a-9e79-fe5a059e9516/app_events",
    "events_url": "/v2/spaces/b62621d0-ac4e-4d3a-9e79-fe5a059e9516/events",
    "security_groups_url": "/v2/spaces/b62621d0-ac4e-4d3a-9e79-fe5a059e9516/security_groups"
  }
}

Audit Records Created By The Request

Audit Record: audit.space.update

Attribute Name Value
id 11
guid 84a449f9-b557-4059-846e-0a83f714c2b8
created_at 2014-11-24 19:32:48 +0000
updated_at
timestamp 2014-11-24 19:32:48 +0000
type audit.space.update
actor uaa-id-302
actor_type user
actee b62621d0-ac4e-4d3a-9e79-fe5a059e9516
actee_type space
metadata
{
  "request": {
    "name": "New Space Name"
  }
}
space_id 23
organization_guid ed1f3fa4-fea5-4a71-9407-4314e92337f8
space_guid b62621d0-ac4e-4d3a-9e79-fe5a059e9516
actor_name email-227@somedomain.com
actee_name New Space Name