Spaces API

Update a Space

PUT /v2/spaces/:guid

Request

Route

PUT /v2/spaces/97c30add-7929-4140-8ac7-410270de659e

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
  • Only the currently associated organization guid
  • guid-3413c7a8-6b70-4f2c-be49-8ea12659dc15
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
isolation_segment_guid The guid of the isolation segment to assign to the space. The space's organization must be entitled for the isolation segment.
{
  "name": "New Space Name"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM2MSIsImVtYWlsIjoiZW1haWwtMjU1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg5MDB9.OlvGOF2_cyoI6lteR43OsRocZ1kXkDd4JLa_VvpP3CE
Host: example.org
Content-Type: application/json
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/97c30add-7929-4140-8ac7-410270de659e" -d '{
  "name": "New Space Name"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM2MSIsImVtYWlsIjoiZW1haWwtMjU1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg5MDB9.OlvGOF2_cyoI6lteR43OsRocZ1kXkDd4JLa_VvpP3CE" \
	-H "Host: example.org" \
	-H "Content-Type: application/json" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "97c30add-7929-4140-8ac7-410270de659e",
    "url": "/v2/spaces/97c30add-7929-4140-8ac7-410270de659e",
    "created_at": "2016-06-08T16:41:40Z",
    "updated_at": "2016-06-08T16:41:40Z"
  },
  "entity": {
    "name": "New Space Name",
    "organization_guid": "9fd68cc6-e0d8-4c48-84b7-0f0a8b293c52",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/9fd68cc6-e0d8-4c48-84b7-0f0a8b293c52",
    "developers_url": "/v2/spaces/97c30add-7929-4140-8ac7-410270de659e/developers",
    "managers_url": "/v2/spaces/97c30add-7929-4140-8ac7-410270de659e/managers",
    "auditors_url": "/v2/spaces/97c30add-7929-4140-8ac7-410270de659e/auditors",
    "apps_url": "/v2/spaces/97c30add-7929-4140-8ac7-410270de659e/apps",
    "routes_url": "/v2/spaces/97c30add-7929-4140-8ac7-410270de659e/routes",
    "domains_url": "/v2/spaces/97c30add-7929-4140-8ac7-410270de659e/domains",
    "service_instances_url": "/v2/spaces/97c30add-7929-4140-8ac7-410270de659e/service_instances",
    "app_events_url": "/v2/spaces/97c30add-7929-4140-8ac7-410270de659e/app_events",
    "events_url": "/v2/spaces/97c30add-7929-4140-8ac7-410270de659e/events",
    "security_groups_url": "/v2/spaces/97c30add-7929-4140-8ac7-410270de659e/security_groups",
    "staging_security_groups_url": "/v2/spaces/97c30add-7929-4140-8ac7-410270de659e/staging_security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 1778bbef-da19-4db9-887c-b9c3fc246cf7
Content-Length: 1301
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.space.update

Attribute Name Value
id 4
guid 466c9c3c-66f2-44f6-9752-0bd1e3d76c27
created_at 2016-06-08 16:41:40 UTC
updated_at
timestamp 2016-06-08 16:41:40 UTC
type audit.space.update
actor uaa-id-361
actor_type user
actee 97c30add-7929-4140-8ac7-410270de659e
actee_type space
metadata
{
  "request": {
    "name": "New Space Name"
  }
}
space_id
organization_guid 9fd68cc6-e0d8-4c48-84b7-0f0a8b293c52
space_guid 97c30add-7929-4140-8ac7-410270de659e
actor_name [email protected]
actee_name New Space Name