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.eyJ1c2VyX2lkIjoidWFhLWlkLTM1NSIsImVtYWlsIjoiZW1haWwtMjI0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDgwMzg5NjR9.xhTHK-5I2VtGtrBvxy7BfUOyF_32sHO9mJtDdZvPsuo Host: example.org Cookie:
curl "https://api.[your-domain.com]/v2/security_groups" -X GET \ -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM1NSIsImVtYWlsIjoiZW1haWwtMjI0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDgwMzg5NjR9.xhTHK-5I2VtGtrBvxy7BfUOyF_32sHO9mJtDdZvPsuo" \ -H "Host: example.org" \ -H "Cookie: "
200 OK
{ "total_results": 5, "total_pages": 1, "prev_url": null, "next_url": null, "resources": [ { "metadata": { "guid": "6e52c9ae-50df-44a0-949a-032b4c292156", "url": "/v2/security_groups/6e52c9ae-50df-44a0-949a-032b4c292156", "created_at": "2015-11-13T17:02:37Z", "updated_at": null }, "entity": { "name": "dummy1", "rules": [ ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/6e52c9ae-50df-44a0-949a-032b4c292156/spaces" } }, { "metadata": { "guid": "dc28d0ab-2802-4aa9-94d3-432cd9050955", "url": "/v2/security_groups/dc28d0ab-2802-4aa9-94d3-432cd9050955", "created_at": "2015-11-13T17:02:37Z", "updated_at": null }, "entity": { "name": "dummy2", "rules": [ ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/dc28d0ab-2802-4aa9-94d3-432cd9050955/spaces" } }, { "metadata": { "guid": "35f46d41-01b5-4cd4-b601-787648fb717b", "url": "/v2/security_groups/35f46d41-01b5-4cd4-b601-787648fb717b", "created_at": "2015-11-13T17:02:44Z", "updated_at": null }, "entity": { "name": "name-1770", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/35f46d41-01b5-4cd4-b601-787648fb717b/spaces" } }, { "metadata": { "guid": "000f2830-7748-4616-a7b9-ff64980d3d83", "url": "/v2/security_groups/000f2830-7748-4616-a7b9-ff64980d3d83", "created_at": "2015-11-13T17:02:44Z", "updated_at": null }, "entity": { "name": "name-1771", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/000f2830-7748-4616-a7b9-ff64980d3d83/spaces" } }, { "metadata": { "guid": "9ef0b6a1-73ad-49ff-a520-ab2387808948", "url": "/v2/security_groups/9ef0b6a1-73ad-49ff-a520-ab2387808948", "created_at": "2015-11-13T17:02:44Z", "updated_at": null }, "entity": { "name": "name-1772", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/9ef0b6a1-73ad-49ff-a520-ab2387808948/spaces" } } ] }
Content-Type: application/json;charset=utf-8 X-VCAP-Request-ID: Content-Length: 2923 X-Content-Type-Options: nosniff