GET /v2/security_groups
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.eyJ1c2VyX2lkIjoidWFhLWlkLTQ3MCIsImVtYWlsIjoiZW1haWwtMzQxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTE0MTM3MDR9.KdeKqnRBCDo8I1R9jV7RFgRtb2ZS-hzaVyS1Wc9iwe8 Host: example.org Cookie:
curl "https://api.[your-domain.com]/v2/security_groups" -X GET \ -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ3MCIsImVtYWlsIjoiZW1haWwtMzQxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTE0MTM3MDR9.KdeKqnRBCDo8I1R9jV7RFgRtb2ZS-hzaVyS1Wc9iwe8" \ -H "Host: example.org" \ -H "Cookie: "
200 OK
{ "total_results": 5, "total_pages": 1, "prev_url": null, "next_url": null, "resources": [ { "metadata": { "guid": "2382c38b-e862-4bd0-a430-ba0744bb71d5", "url": "/v2/security_groups/2382c38b-e862-4bd0-a430-ba0744bb71d5", "created_at": "2015-12-22T18:28:12Z", "updated_at": null }, "entity": { "name": "dummy1", "rules": [ ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/2382c38b-e862-4bd0-a430-ba0744bb71d5/spaces" } }, { "metadata": { "guid": "31f69efd-f1df-40e7-b0df-66cf38e67391", "url": "/v2/security_groups/31f69efd-f1df-40e7-b0df-66cf38e67391", "created_at": "2015-12-22T18:28:12Z", "updated_at": null }, "entity": { "name": "dummy2", "rules": [ ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/31f69efd-f1df-40e7-b0df-66cf38e67391/spaces" } }, { "metadata": { "guid": "b6d4c974-ec22-4c61-acb0-ce1726f9b798", "url": "/v2/security_groups/b6d4c974-ec22-4c61-acb0-ce1726f9b798", "created_at": "2015-12-22T18:28:24Z", "updated_at": null }, "entity": { "name": "name-2596", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/b6d4c974-ec22-4c61-acb0-ce1726f9b798/spaces" } }, { "metadata": { "guid": "4e1eaa27-bceb-4a9d-872f-c31c638f9d8c", "url": "/v2/security_groups/4e1eaa27-bceb-4a9d-872f-c31c638f9d8c", "created_at": "2015-12-22T18:28:24Z", "updated_at": null }, "entity": { "name": "name-2597", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/4e1eaa27-bceb-4a9d-872f-c31c638f9d8c/spaces" } }, { "metadata": { "guid": "3baae17a-99a2-4b38-a6fd-bc313d5f1927", "url": "/v2/security_groups/3baae17a-99a2-4b38-a6fd-bc313d5f1927", "created_at": "2015-12-22T18:28:24Z", "updated_at": null }, "entity": { "name": "name-2598", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/3baae17a-99a2-4b38-a6fd-bc313d5f1927/spaces" } } ] }
Content-Type: application/json;charset=utf-8 X-VCAP-Request-ID: Content-Length: 2923 X-Content-Type-Options: nosniff