Home
Version 3
Spaces API

Spaces API

Update a Space

PUT /v2/spaces/:guid

Request

Route

PUT /v2/spaces/e0687d56-122f-44cf-b8f2-d5884c279034

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-06980ce8-034a-4fd8-afc1-a0e6385a4845
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.eyJ1c2VyX2lkIjoidWFhLWlkLTIzNSIsImVtYWlsIjoiZW1haWwtMTY3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjU5NDg2Njl9.PUcRKPtPagB3ey3xgVaugcURYbxMoQ_DLs1nezYjaqs
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/e0687d56-122f-44cf-b8f2-d5884c279034" -d '{
  "name": "New Space Name"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIzNSIsImVtYWlsIjoiZW1haWwtMTY3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjU5NDg2Njl9.PUcRKPtPagB3ey3xgVaugcURYbxMoQ_DLs1nezYjaqs" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "e0687d56-122f-44cf-b8f2-d5884c279034",
    "url": "/v2/spaces/e0687d56-122f-44cf-b8f2-d5884c279034",
    "created_at": "2015-03-03T00:51:09Z",
    "updated_at": "2015-03-03T00:51:09Z"
  },
  "entity": {
    "name": "New Space Name",
    "organization_guid": "5686973c-3452-474e-8f97-3639ddd832df",
    "space_quota_definition_guid": null,
    "organization_url": "/v2/organizations/5686973c-3452-474e-8f97-3639ddd832df",
    "developers_url": "/v2/spaces/e0687d56-122f-44cf-b8f2-d5884c279034/developers",
    "managers_url": "/v2/spaces/e0687d56-122f-44cf-b8f2-d5884c279034/managers",
    "auditors_url": "/v2/spaces/e0687d56-122f-44cf-b8f2-d5884c279034/auditors",
    "apps_url": "/v2/spaces/e0687d56-122f-44cf-b8f2-d5884c279034/apps",
    "routes_url": "/v2/spaces/e0687d56-122f-44cf-b8f2-d5884c279034/routes",
    "domains_url": "/v2/spaces/e0687d56-122f-44cf-b8f2-d5884c279034/domains",
    "service_instances_url": "/v2/spaces/e0687d56-122f-44cf-b8f2-d5884c279034/service_instances",
    "app_events_url": "/v2/spaces/e0687d56-122f-44cf-b8f2-d5884c279034/app_events",
    "events_url": "/v2/spaces/e0687d56-122f-44cf-b8f2-d5884c279034/events",
    "security_groups_url": "/v2/spaces/e0687d56-122f-44cf-b8f2-d5884c279034/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 461d28b8-913e-4b64-8102-3a4d4a6813ee
Content-Length: 1278
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.space.update

Attribute Name Value
id 11
guid 94a4a4a9-f8b2-41d3-a8db-5d516052e383
created_at 2015-03-03 00:51:09 UTC
updated_at
timestamp 2015-03-03 00:51:09 UTC
type audit.space.update
actor uaa-id-235
actor_type user
actee e0687d56-122f-44cf-b8f2-d5884c279034
actee_type space
metadata
{
  "request": {
    "name": "New Space Name"
  }
}
space_id 44
organization_guid 5686973c-3452-474e-8f97-3639ddd832df
space_guid e0687d56-122f-44cf-b8f2-d5884c279034
actor_name email-167@somedomain.com
actee_name New Space Name