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.eyJ1c2VyX2lkIjoidWFhLWlkLTM0MiIsImVtYWlsIjoiZW1haWwtMjQ0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjEzNzQ2NDF9.iZ1eG-k31htUrj39Z4PQfgFiifzjMFfO2A0tm_ETKoM Host: example.org Cookie:
curl "https://api.[your-domain.com]/v2/security_groups" -X GET \ -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM0MiIsImVtYWlsIjoiZW1haWwtMjQ0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjEzNzQ2NDF9.iZ1eG-k31htUrj39Z4PQfgFiifzjMFfO2A0tm_ETKoM" \ -H "Host: example.org" \ -H "Cookie: "
200 OK
{ "total_results": 5, "total_pages": 1, "prev_url": null, "next_url": null, "resources": [ { "metadata": { "guid": "94ce525c-5a97-4955-b2b3-2378cf91c947", "url": "/v2/security_groups/94ce525c-5a97-4955-b2b3-2378cf91c947", "created_at": "2016-04-16T01:23:45Z", "updated_at": null }, "entity": { "name": "dummy1", "rules": [ ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/94ce525c-5a97-4955-b2b3-2378cf91c947/spaces" } }, { "metadata": { "guid": "55c0dbe7-2d7a-4ecd-ab74-b4e1f58202ce", "url": "/v2/security_groups/55c0dbe7-2d7a-4ecd-ab74-b4e1f58202ce", "created_at": "2016-04-16T01:23:45Z", "updated_at": null }, "entity": { "name": "dummy2", "rules": [ ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/55c0dbe7-2d7a-4ecd-ab74-b4e1f58202ce/spaces" } }, { "metadata": { "guid": "1e7ca3fb-947c-4106-a08a-6f61382f4244", "url": "/v2/security_groups/1e7ca3fb-947c-4106-a08a-6f61382f4244", "created_at": "2016-04-16T01:24:01Z", "updated_at": null }, "entity": { "name": "name-1112", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/1e7ca3fb-947c-4106-a08a-6f61382f4244/spaces" } }, { "metadata": { "guid": "4e350814-310e-4dd3-a2bc-093d8d37baec", "url": "/v2/security_groups/4e350814-310e-4dd3-a2bc-093d8d37baec", "created_at": "2016-04-16T01:24:01Z", "updated_at": null }, "entity": { "name": "name-1113", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/4e350814-310e-4dd3-a2bc-093d8d37baec/spaces" } }, { "metadata": { "guid": "92f3a6be-5f83-4981-b41a-c6740fe825b4", "url": "/v2/security_groups/92f3a6be-5f83-4981-b41a-c6740fe825b4", "created_at": "2016-04-16T01:24:01Z", "updated_at": null }, "entity": { "name": "name-1114", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/92f3a6be-5f83-4981-b41a-c6740fe825b4/spaces" } } ] }
Content-Type: application/json;charset=utf-8 X-VCAP-Request-ID: 1dd968d2-72f1-4e99-993c-8b27e03fbc13 Content-Length: 2923 X-Content-Type-Options: nosniff