Home
Version 3
Spaces API

Spaces API

Update a Space

PUT /v2/spaces/:guid

Request

Route

PUT /v2/spaces/3aae87fe-0da5-4215-8b05-65e8e4a59e48

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-7597a783-a1ad-475b-ad31-aed0d8e28065
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
allow_ssh Whether or not Space Developers can enable ssh on apps in the space
{
  "name": "New Space Name"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIyMCIsImVtYWlsIjoiZW1haWwtMTgzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4NDJ9.aoruvF6PsC2MV8lpbDD2wmfqMtzzzWp9ELYQ7s3w8_Y
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/3aae87fe-0da5-4215-8b05-65e8e4a59e48" -d '{
  "name": "New Space Name"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIyMCIsImVtYWlsIjoiZW1haWwtMTgzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4NDJ9.aoruvF6PsC2MV8lpbDD2wmfqMtzzzWp9ELYQ7s3w8_Y" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "3aae87fe-0da5-4215-8b05-65e8e4a59e48",
    "url": "/v2/spaces/3aae87fe-0da5-4215-8b05-65e8e4a59e48",
    "created_at": "2015-11-03T00:54:02Z",
    "updated_at": "2015-11-03T00:54:02Z"
  },
  "entity": {
    "name": "New Space Name",
    "organization_guid": "233ca070-4146-4226-b5fc-03502203a0e2",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/233ca070-4146-4226-b5fc-03502203a0e2",
    "developers_url": "/v2/spaces/3aae87fe-0da5-4215-8b05-65e8e4a59e48/developers",
    "managers_url": "/v2/spaces/3aae87fe-0da5-4215-8b05-65e8e4a59e48/managers",
    "auditors_url": "/v2/spaces/3aae87fe-0da5-4215-8b05-65e8e4a59e48/auditors",
    "apps_url": "/v2/spaces/3aae87fe-0da5-4215-8b05-65e8e4a59e48/apps",
    "routes_url": "/v2/spaces/3aae87fe-0da5-4215-8b05-65e8e4a59e48/routes",
    "domains_url": "/v2/spaces/3aae87fe-0da5-4215-8b05-65e8e4a59e48/domains",
    "service_instances_url": "/v2/spaces/3aae87fe-0da5-4215-8b05-65e8e4a59e48/service_instances",
    "app_events_url": "/v2/spaces/3aae87fe-0da5-4215-8b05-65e8e4a59e48/app_events",
    "events_url": "/v2/spaces/3aae87fe-0da5-4215-8b05-65e8e4a59e48/events",
    "security_groups_url": "/v2/spaces/3aae87fe-0da5-4215-8b05-65e8e4a59e48/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 58060abc-76be-4e65-a7d1-641d25566b7a
Content-Length: 1301
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.space.update

Attribute Name Value
id 43
guid eb1a9e26-25c3-4bd2-a57e-ccb66f602aab
created_at 2015-11-03 00:54:02 UTC
updated_at
timestamp 2015-11-03 00:54:02 UTC
type audit.space.update
actor uaa-id-220
actor_type user
actee 3aae87fe-0da5-4215-8b05-65e8e4a59e48
actee_type space
metadata
{
  "request": {
    "name": "New Space Name"
  }
}
space_id
organization_guid 233ca070-4146-4226-b5fc-03502203a0e2
space_guid 3aae87fe-0da5-4215-8b05-65e8e4a59e48
actor_name email-183@somedomain.com
actee_name New Space Name