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-658022d9-a6b1-40f2-a082-5eaaf7506113
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.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NyIsImVtYWlsIjoiZW1haWwtMTY5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQxMzczNzJ9.VNfNRUGGv0EfywJKzyiLgNbnBRlt8Q4t614ZNFm5MhE
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/spaces/6646d5ac-7cee-4040-b2ac-b998dd55875e

Body

{
  "name": "New Space Name"
}

cURL

curl "https://api.[your-domain.com]/v2/spaces/6646d5ac-7cee-4040-b2ac-b998dd55875e" -d '{
  "name": "New Space Name"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NyIsImVtYWlsIjoiZW1haWwtMTY5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQxMzczNzJ9.VNfNRUGGv0EfywJKzyiLgNbnBRlt8Q4t614ZNFm5MhE" \
	-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: 69d7a2fe-c151-4b10-86db-a63dfbdcce19
Content-Length: 1278
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "6646d5ac-7cee-4040-b2ac-b998dd55875e",
    "url": "/v2/spaces/6646d5ac-7cee-4040-b2ac-b998dd55875e",
    "created_at": "2015-02-10T01:42:52Z",
    "updated_at": "2015-02-10T01:42:52Z"
  },
  "entity": {
    "name": "New Space Name",
    "organization_guid": "4ee953fa-b5ec-4352-8502-060c745a41c9",
    "space_quota_definition_guid": null,
    "organization_url": "/v2/organizations/4ee953fa-b5ec-4352-8502-060c745a41c9",
    "developers_url": "/v2/spaces/6646d5ac-7cee-4040-b2ac-b998dd55875e/developers",
    "managers_url": "/v2/spaces/6646d5ac-7cee-4040-b2ac-b998dd55875e/managers",
    "auditors_url": "/v2/spaces/6646d5ac-7cee-4040-b2ac-b998dd55875e/auditors",
    "apps_url": "/v2/spaces/6646d5ac-7cee-4040-b2ac-b998dd55875e/apps",
    "routes_url": "/v2/spaces/6646d5ac-7cee-4040-b2ac-b998dd55875e/routes",
    "domains_url": "/v2/spaces/6646d5ac-7cee-4040-b2ac-b998dd55875e/domains",
    "service_instances_url": "/v2/spaces/6646d5ac-7cee-4040-b2ac-b998dd55875e/service_instances",
    "app_events_url": "/v2/spaces/6646d5ac-7cee-4040-b2ac-b998dd55875e/app_events",
    "events_url": "/v2/spaces/6646d5ac-7cee-4040-b2ac-b998dd55875e/events",
    "security_groups_url": "/v2/spaces/6646d5ac-7cee-4040-b2ac-b998dd55875e/security_groups"
  }
}

Audit Records Created By The Request

Audit Record: audit.space.update

Attribute Name Value
id 143
guid 872a0a7e-c277-477f-bd82-79e5de67d064
created_at 2015-02-10 01:42:52 UTC
updated_at
timestamp 2015-02-10 01:42:52 UTC
type audit.space.update
actor uaa-id-247
actor_type user
actee 6646d5ac-7cee-4040-b2ac-b998dd55875e
actee_type space
metadata
{
  "request": {
    "name": "New Space Name"
  }
}
space_id 200
organization_guid 4ee953fa-b5ec-4352-8502-060c745a41c9
space_guid 6646d5ac-7cee-4040-b2ac-b998dd55875e
actor_name email-169@somedomain.com
actee_name New Space Name