Home
Version 3
Spaces API

Spaces API

Update a Space

PUT /v2/spaces/:guid

Request

Route

PUT /v2/spaces/f31ccc37-6588-4be5-9439-e494e1b96db5

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-cb55e45a-85ae-4d5b-8513-72215a463789
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.eyJ1c2VyX2lkIjoidWFhLWlkLTE5MCIsImVtYWlsIjoiZW1haWwtMTEyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjk2NjQxMzl9.lkB63baAxl9ZaI4tKqlZ6tZQdww6a560ey-L9j-uuJM
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/f31ccc37-6588-4be5-9439-e494e1b96db5" -d '{
  "name": "New Space Name"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5MCIsImVtYWlsIjoiZW1haWwtMTEyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjk2NjQxMzl9.lkB63baAxl9ZaI4tKqlZ6tZQdww6a560ey-L9j-uuJM" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "f31ccc37-6588-4be5-9439-e494e1b96db5",
    "url": "/v2/spaces/f31ccc37-6588-4be5-9439-e494e1b96db5",
    "created_at": "2015-04-15T00:55:39Z",
    "updated_at": "2015-04-15T00:55:39Z"
  },
  "entity": {
    "name": "New Space Name",
    "organization_guid": "dedeb072-c83c-4f55-9481-11353dc60ee2",
    "space_quota_definition_guid": null,
    "organization_url": "/v2/organizations/dedeb072-c83c-4f55-9481-11353dc60ee2",
    "developers_url": "/v2/spaces/f31ccc37-6588-4be5-9439-e494e1b96db5/developers",
    "managers_url": "/v2/spaces/f31ccc37-6588-4be5-9439-e494e1b96db5/managers",
    "auditors_url": "/v2/spaces/f31ccc37-6588-4be5-9439-e494e1b96db5/auditors",
    "apps_url": "/v2/spaces/f31ccc37-6588-4be5-9439-e494e1b96db5/apps",
    "routes_url": "/v2/spaces/f31ccc37-6588-4be5-9439-e494e1b96db5/routes",
    "domains_url": "/v2/spaces/f31ccc37-6588-4be5-9439-e494e1b96db5/domains",
    "service_instances_url": "/v2/spaces/f31ccc37-6588-4be5-9439-e494e1b96db5/service_instances",
    "app_events_url": "/v2/spaces/f31ccc37-6588-4be5-9439-e494e1b96db5/app_events",
    "events_url": "/v2/spaces/f31ccc37-6588-4be5-9439-e494e1b96db5/events",
    "security_groups_url": "/v2/spaces/f31ccc37-6588-4be5-9439-e494e1b96db5/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: db4b6678-f77b-481c-94d0-a959917e0cc9
Content-Length: 1278
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.space.update

Attribute Name Value
id 151
guid 940e98d2-5934-45c0-8b99-7674693a676f
created_at 2015-04-15 00:55:39 UTC
updated_at
timestamp 2015-04-15 00:55:39 UTC
type audit.space.update
actor uaa-id-190
actor_type user
actee f31ccc37-6588-4be5-9439-e494e1b96db5
actee_type space
metadata
{
  "request": {
    "name": "New Space Name"
  }
}
space_id 202
organization_guid dedeb072-c83c-4f55-9481-11353dc60ee2
space_guid f31ccc37-6588-4be5-9439-e494e1b96db5
actor_name email-112@somedomain.com
actee_name New Space Name