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.eyJ1c2VyX2lkIjoidWFhLWlkLTQ2NiIsImVtYWlsIjoiZW1haWwtMzM0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5NDh9.FeOKxpwZb_5dW8XayNqR6KQBsowGUR6DnH0Tdi-ONiw Host: example.org Cookie:
curl "https://api.[your-domain.com]/v2/security_groups" -X GET \ -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ2NiIsImVtYWlsIjoiZW1haWwtMzM0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5NDh9.FeOKxpwZb_5dW8XayNqR6KQBsowGUR6DnH0Tdi-ONiw" \ -H "Host: example.org" \ -H "Cookie: "
200 OK
{ "total_results": 5, "total_pages": 1, "prev_url": null, "next_url": null, "resources": [ { "metadata": { "guid": "5b955729-4274-401a-b869-82137b78ecff", "url": "/v2/security_groups/5b955729-4274-401a-b869-82137b78ecff", "created_at": "2015-10-07T00:35:26Z", "updated_at": null }, "entity": { "name": "dummy1", "rules": [ ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/5b955729-4274-401a-b869-82137b78ecff/spaces" } }, { "metadata": { "guid": "c04e9867-b195-4202-af2c-f9f9a92d2836", "url": "/v2/security_groups/c04e9867-b195-4202-af2c-f9f9a92d2836", "created_at": "2015-10-07T00:35:26Z", "updated_at": null }, "entity": { "name": "dummy2", "rules": [ ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/c04e9867-b195-4202-af2c-f9f9a92d2836/spaces" } }, { "metadata": { "guid": "6d01e86a-2d07-4f45-b93b-5247bfedad8d", "url": "/v2/security_groups/6d01e86a-2d07-4f45-b93b-5247bfedad8d", "created_at": "2015-10-07T00:35:48Z", "updated_at": null }, "entity": { "name": "name-2493", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/6d01e86a-2d07-4f45-b93b-5247bfedad8d/spaces" } }, { "metadata": { "guid": "20bd847b-655d-4f3b-8cc7-0af4eb1e9942", "url": "/v2/security_groups/20bd847b-655d-4f3b-8cc7-0af4eb1e9942", "created_at": "2015-10-07T00:35:48Z", "updated_at": null }, "entity": { "name": "name-2494", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/20bd847b-655d-4f3b-8cc7-0af4eb1e9942/spaces" } }, { "metadata": { "guid": "b91aca8d-fd71-4812-aebb-4140dc9c04f6", "url": "/v2/security_groups/b91aca8d-fd71-4812-aebb-4140dc9c04f6", "created_at": "2015-10-07T00:35:48Z", "updated_at": null }, "entity": { "name": "name-2495", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/b91aca8d-fd71-4812-aebb-4140dc9c04f6/spaces" } } ] }
Content-Type: application/json;charset=utf-8 X-VCAP-Request-ID: b9cff36e-b3d6-4ad3-9201-6bcf61510114 Content-Length: 2923 X-Content-Type-Options: nosniff