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.eyJ1c2VyX2lkIjoidWFhLWlkLTMzMCIsImVtYWlsIjoiZW1haWwtMjI4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDI2MDE1NDV9.LAXRJLfVc9Rnsp6xmHPuvE_sKXvpoS4KsPO-aJlGWWw Host: example.org Cookie:
curl "https://api.[your-domain.com]/v2/security_groups" -X GET \ -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMzMCIsImVtYWlsIjoiZW1haWwtMjI4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDI2MDE1NDV9.LAXRJLfVc9Rnsp6xmHPuvE_sKXvpoS4KsPO-aJlGWWw" \ -H "Host: example.org" \ -H "Cookie: "
200 OK
{ "total_results": 5, "total_pages": 1, "prev_url": null, "next_url": null, "resources": [ { "metadata": { "guid": "a3715004-6a1a-4291-b252-3966d7fa89de", "url": "/v2/security_groups/a3715004-6a1a-4291-b252-3966d7fa89de", "created_at": "2015-09-11T18:38:57Z", "updated_at": null }, "entity": { "name": "dummy1", "rules": [ ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/a3715004-6a1a-4291-b252-3966d7fa89de/spaces" } }, { "metadata": { "guid": "6974a836-7136-47a1-b517-071d50e58951", "url": "/v2/security_groups/6974a836-7136-47a1-b517-071d50e58951", "created_at": "2015-09-11T18:38:57Z", "updated_at": null }, "entity": { "name": "dummy2", "rules": [ ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/6974a836-7136-47a1-b517-071d50e58951/spaces" } }, { "metadata": { "guid": "1d9fd477-d3e2-47d7-86cb-6f941021d007", "url": "/v2/security_groups/1d9fd477-d3e2-47d7-86cb-6f941021d007", "created_at": "2015-09-11T18:39:05Z", "updated_at": null }, "entity": { "name": "name-1925", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/1d9fd477-d3e2-47d7-86cb-6f941021d007/spaces" } }, { "metadata": { "guid": "f7bf0b1a-fb23-442c-952c-a3bb8464ef21", "url": "/v2/security_groups/f7bf0b1a-fb23-442c-952c-a3bb8464ef21", "created_at": "2015-09-11T18:39:05Z", "updated_at": null }, "entity": { "name": "name-1926", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/f7bf0b1a-fb23-442c-952c-a3bb8464ef21/spaces" } }, { "metadata": { "guid": "05fbca73-c06d-48e2-b749-bf61d9b69f95", "url": "/v2/security_groups/05fbca73-c06d-48e2-b749-bf61d9b69f95", "created_at": "2015-09-11T18:39:05Z", "updated_at": null }, "entity": { "name": "name-1927", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/05fbca73-c06d-48e2-b749-bf61d9b69f95/spaces" } } ] }
Content-Type: application/json;charset=utf-8 X-VCAP-Request-ID: 728d4604-64b8-4b2d-9cac-c9f3327d1598 Content-Length: 2923 X-Content-Type-Options: nosniff