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.eyJ1c2VyX2lkIjoidWFhLWlkLTEwOCIsImVtYWlsIjoiZW1haWwtNzJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2MTM3NDYyN30.aECCTtDHQXAqxWBt6wgHjCnWo__scVzcGBTVEh_w5Es Host: example.org Cookie:
curl "https://api.[your-domain.com]/v2/spaces" -X GET \ -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwOCIsImVtYWlsIjoiZW1haWwtNzJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2MTM3NDYyN30.aECCTtDHQXAqxWBt6wgHjCnWo__scVzcGBTVEh_w5Es" \ -H "Host: example.org" \ -H "Cookie: "
200 OK
{ "total_results": 1, "total_pages": 1, "prev_url": null, "next_url": null, "resources": [ { "metadata": { "guid": "1c6e0c95-624a-4926-a39c-ed0adc946f02", "url": "/v2/spaces/1c6e0c95-624a-4926-a39c-ed0adc946f02", "created_at": "2016-04-16T01:23:47Z", "updated_at": null }, "entity": { "name": "name-230", "organization_guid": "c85f9df0-c34a-4af2-b5d9-f26c2e329427", "space_quota_definition_guid": null, "allow_ssh": true, "organization_url": "/v2/organizations/c85f9df0-c34a-4af2-b5d9-f26c2e329427", "developers_url": "/v2/spaces/1c6e0c95-624a-4926-a39c-ed0adc946f02/developers", "managers_url": "/v2/spaces/1c6e0c95-624a-4926-a39c-ed0adc946f02/managers", "auditors_url": "/v2/spaces/1c6e0c95-624a-4926-a39c-ed0adc946f02/auditors", "apps_url": "/v2/spaces/1c6e0c95-624a-4926-a39c-ed0adc946f02/apps", "routes_url": "/v2/spaces/1c6e0c95-624a-4926-a39c-ed0adc946f02/routes", "domains_url": "/v2/spaces/1c6e0c95-624a-4926-a39c-ed0adc946f02/domains", "service_instances_url": "/v2/spaces/1c6e0c95-624a-4926-a39c-ed0adc946f02/service_instances", "app_events_url": "/v2/spaces/1c6e0c95-624a-4926-a39c-ed0adc946f02/app_events", "events_url": "/v2/spaces/1c6e0c95-624a-4926-a39c-ed0adc946f02/events", "security_groups_url": "/v2/spaces/1c6e0c95-624a-4926-a39c-ed0adc946f02/security_groups" } } ] }
Content-Type: application/json;charset=utf-8 X-VCAP-Request-ID: d88c6917-7be0-4569-b986-4368fa615d12 Content-Length: 1484 X-Content-Type-Options: nosniff