Name | Description | Default | Valid Values | Example Values |
---|
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.eyJ1c2VyX2lkIjoidWFhLWlkLTMzMyIsImVtYWlsIjoiZW1haWwtMjU0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjI5OTA4ODR9.hm2eVkSewlSOMNG2_sWVcIDVJnwtgvcuuZOs028XCCw Host: example.org Cookie:
GET /v2/spaces
curl "https://api.[your-domain.com]/v2/spaces" -X GET \ -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMzMyIsImVtYWlsIjoiZW1haWwtMjU0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjI5OTA4ODR9.hm2eVkSewlSOMNG2_sWVcIDVJnwtgvcuuZOs028XCCw" \ -H "Host: example.org" \ -H "Cookie: "
Content-Type: application/json;charset=utf-8 X-VCAP-Request-ID: 2e44d177-e2c5-4803-8dfc-344449485e67 Content-Length: 1458 X-Content-Type-Options: nosniff
200 OK
{ "total_results": 1, "total_pages": 1, "prev_url": null, "next_url": null, "resources": [ { "metadata": { "guid": "80ce41ff-5d23-4816-9de1-94da21029d2e", "url": "/v2/spaces/80ce41ff-5d23-4816-9de1-94da21029d2e", "created_at": "2015-01-27T19:14:44Z", "updated_at": null }, "entity": { "name": "name-1945", "organization_guid": "a2cf661f-9b3b-406f-9846-507f99ad0ad2", "space_quota_definition_guid": null, "organization_url": "/v2/organizations/a2cf661f-9b3b-406f-9846-507f99ad0ad2", "developers_url": "/v2/spaces/80ce41ff-5d23-4816-9de1-94da21029d2e/developers", "managers_url": "/v2/spaces/80ce41ff-5d23-4816-9de1-94da21029d2e/managers", "auditors_url": "/v2/spaces/80ce41ff-5d23-4816-9de1-94da21029d2e/auditors", "apps_url": "/v2/spaces/80ce41ff-5d23-4816-9de1-94da21029d2e/apps", "routes_url": "/v2/spaces/80ce41ff-5d23-4816-9de1-94da21029d2e/routes", "domains_url": "/v2/spaces/80ce41ff-5d23-4816-9de1-94da21029d2e/domains", "service_instances_url": "/v2/spaces/80ce41ff-5d23-4816-9de1-94da21029d2e/service_instances", "app_events_url": "/v2/spaces/80ce41ff-5d23-4816-9de1-94da21029d2e/app_events", "events_url": "/v2/spaces/80ce41ff-5d23-4816-9de1-94da21029d2e/events", "security_groups_url": "/v2/spaces/80ce41ff-5d23-4816-9de1-94da21029d2e/security_groups" } } ] }