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 |
|
|
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.eyJ1c2VyX2lkIjoidWFhLWlkLTE5MSIsImVtYWlsIjoiZW1haWwtMTY0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTc0NjIzNjN9.7w8yzT3Kr0LOs220yGzuSIbCT2Dmd1nIfj99OBxiPHQ Host: example.org Cookie:
GET /v2/security_groups
curl "https://api.[your-domain.com]/v2/security_groups" -X GET \ -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5MSIsImVtYWlsIjoiZW1haWwtMTY0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTc0NjIzNjN9.7w8yzT3Kr0LOs220yGzuSIbCT2Dmd1nIfj99OBxiPHQ" \ -H "Host: example.org" \ -H "Cookie: "
Content-Type: application/json;charset=utf-8 X-VCAP-Request-ID: e7d35a51-222d-4003-ae53-0ca947449a8a Content-Length: 2945 X-Content-Type-Options: nosniff
200 OK
{ "total_results": 5, "total_pages": 1, "prev_url": null, "next_url": null, "resources": [ { "metadata": { "guid": "28d6f4c6-d9b9-4b12-b2b4-0c2cbb391f95", "url": "/v2/security_groups/28d6f4c6-d9b9-4b12-b2b4-0c2cbb391f95", "created_at": "2014-11-24T19:32:34+00:00", "updated_at": null }, "entity": { "name": "dummy1", "rules": [ ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/28d6f4c6-d9b9-4b12-b2b4-0c2cbb391f95/spaces" } }, { "metadata": { "guid": "31aed38a-6fa3-493d-a29b-bb887676a177", "url": "/v2/security_groups/31aed38a-6fa3-493d-a29b-bb887676a177", "created_at": "2014-11-24T19:32:34+00:00", "updated_at": null }, "entity": { "name": "dummy2", "rules": [ ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/31aed38a-6fa3-493d-a29b-bb887676a177/spaces" } }, { "metadata": { "guid": "8109dd84-a7f7-4bc7-ba09-4298896a57f7", "url": "/v2/security_groups/8109dd84-a7f7-4bc7-ba09-4298896a57f7", "created_at": "2014-11-24T19:32:43+00:00", "updated_at": null }, "entity": { "name": "name-732", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/8109dd84-a7f7-4bc7-ba09-4298896a57f7/spaces" } }, { "metadata": { "guid": "43f566e3-32e1-4cf7-ac0e-1ac9d783a793", "url": "/v2/security_groups/43f566e3-32e1-4cf7-ac0e-1ac9d783a793", "created_at": "2014-11-24T19:32:43+00:00", "updated_at": null }, "entity": { "name": "name-733", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/43f566e3-32e1-4cf7-ac0e-1ac9d783a793/spaces" } }, { "metadata": { "guid": "c11cf2ca-3ebd-4b18-b568-478918bf20c3", "url": "/v2/security_groups/c11cf2ca-3ebd-4b18-b568-478918bf20c3", "created_at": "2014-11-24T19:32:43+00:00", "updated_at": null }, "entity": { "name": "name-734", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/c11cf2ca-3ebd-4b18-b568-478918bf20c3/spaces" } } ] }