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.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NCIsImVtYWlsIjoiZW1haWwtMTc2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDUzNjIzMTF9.oTYerWkiZcB0z2hDaOiJp3kcFWWh1GKAITzgdPpH1g4 Host: example.org Cookie:
curl "https://api.[your-domain.com]/v2/security_groups" -X GET \ -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NCIsImVtYWlsIjoiZW1haWwtMTc2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDUzNjIzMTF9.oTYerWkiZcB0z2hDaOiJp3kcFWWh1GKAITzgdPpH1g4" \ -H "Host: example.org" \ -H "Cookie: "
200 OK
{ "total_results": 5, "total_pages": 1, "prev_url": null, "next_url": null, "resources": [ { "metadata": { "guid": "f665e96b-c915-43c7-a036-fcd3a8edf246", "url": "/v2/security_groups/f665e96b-c915-43c7-a036-fcd3a8edf246", "created_at": "2015-10-13T17:31:45Z", "updated_at": null }, "entity": { "name": "dummy1", "rules": [ ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/f665e96b-c915-43c7-a036-fcd3a8edf246/spaces" } }, { "metadata": { "guid": "8334206b-6c74-469c-90d7-ee3874dc8c60", "url": "/v2/security_groups/8334206b-6c74-469c-90d7-ee3874dc8c60", "created_at": "2015-10-13T17:31:45Z", "updated_at": null }, "entity": { "name": "dummy2", "rules": [ ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/8334206b-6c74-469c-90d7-ee3874dc8c60/spaces" } }, { "metadata": { "guid": "f412a01c-0718-4a55-96c4-74dedaa788ae", "url": "/v2/security_groups/f412a01c-0718-4a55-96c4-74dedaa788ae", "created_at": "2015-10-13T17:31:51Z", "updated_at": null }, "entity": { "name": "name-963", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/f412a01c-0718-4a55-96c4-74dedaa788ae/spaces" } }, { "metadata": { "guid": "517195d7-9909-4d44-bab0-db723ff60de3", "url": "/v2/security_groups/517195d7-9909-4d44-bab0-db723ff60de3", "created_at": "2015-10-13T17:31:51Z", "updated_at": null }, "entity": { "name": "name-964", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/517195d7-9909-4d44-bab0-db723ff60de3/spaces" } }, { "metadata": { "guid": "b2224c5e-af03-4f05-8e74-d4662157988f", "url": "/v2/security_groups/b2224c5e-af03-4f05-8e74-d4662157988f", "created_at": "2015-10-13T17:31:51Z", "updated_at": null }, "entity": { "name": "name-965", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/b2224c5e-af03-4f05-8e74-d4662157988f/spaces" } } ] }
Content-Type: application/json;charset=utf-8 X-VCAP-Request-ID: 1698b212-f083-4ffc-a4ee-6c93592b59b2 Content-Length: 2920 X-Content-Type-Options: nosniff