GET /v2/spaces
Name | Description | Valid Values | Example Values |
---|---|---|---|
q |
Parameters used to filter the result set. Format queries as <filter><op><value> Valid ops: : >= <= < > IN Valid filters: name, organization_guid, developer_guid, app_guid |
|
|
page | Page of results to fetch |
|
|
results-per-page | Number of results per page |
|
|
order-direction | Order of the results: asc (default) or desc |
|
|
inline-relations-depth | 0 - don't inline any relations and return URLs. Otherwise, inline to depth N. |
|
|
orphan-relations | 0 - de-duplicate object entries in response |
|
|
exclude-relations | comma-delimited list of relations to drop from response |
|
|
include-relations | comma-delimited list of the only relations to include in response |
|
|
Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExIiwiZW1haWwiOiJlbWFpbC0xMUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ1MzYyMjk2fQ.qDYXjS4sOx5lOaUKCNiJP-dmDoXSB88JhS4cEN7kwlU Host: example.org Cookie:
curl "https://api.[your-domain.com]/v2/spaces" -X GET \ -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExIiwiZW1haWwiOiJlbWFpbC0xMUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ1MzYyMjk2fQ.qDYXjS4sOx5lOaUKCNiJP-dmDoXSB88JhS4cEN7kwlU" \ -H "Host: example.org" \ -H "Cookie: "
200 OK
{ "total_results": 1, "total_pages": 1, "prev_url": null, "next_url": null, "resources": [ { "metadata": { "guid": "292d8149-ae4f-4e4c-b294-7fce62301e7d", "url": "/v2/spaces/292d8149-ae4f-4e4c-b294-7fce62301e7d", "created_at": "2015-10-13T17:31:36Z", "updated_at": null }, "entity": { "name": "name-72", "organization_guid": "0bb8e517-e4aa-46b6-ac33-0d155aaa17b5", "space_quota_definition_guid": null, "allow_ssh": true, "organization_url": "/v2/organizations/0bb8e517-e4aa-46b6-ac33-0d155aaa17b5", "developers_url": "/v2/spaces/292d8149-ae4f-4e4c-b294-7fce62301e7d/developers", "managers_url": "/v2/spaces/292d8149-ae4f-4e4c-b294-7fce62301e7d/managers", "auditors_url": "/v2/spaces/292d8149-ae4f-4e4c-b294-7fce62301e7d/auditors", "apps_url": "/v2/spaces/292d8149-ae4f-4e4c-b294-7fce62301e7d/apps", "routes_url": "/v2/spaces/292d8149-ae4f-4e4c-b294-7fce62301e7d/routes", "domains_url": "/v2/spaces/292d8149-ae4f-4e4c-b294-7fce62301e7d/domains", "service_instances_url": "/v2/spaces/292d8149-ae4f-4e4c-b294-7fce62301e7d/service_instances", "app_events_url": "/v2/spaces/292d8149-ae4f-4e4c-b294-7fce62301e7d/app_events", "events_url": "/v2/spaces/292d8149-ae4f-4e4c-b294-7fce62301e7d/events", "security_groups_url": "/v2/spaces/292d8149-ae4f-4e4c-b294-7fce62301e7d/security_groups" } } ] }
Content-Type: application/json;charset=utf-8 X-VCAP-Request-ID: 4c98bd21-3d36-4c05-b2ac-d033f43a0c9e Content-Length: 1483 X-Content-Type-Options: nosniff