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.eyJ1c2VyX2lkIjoidWFhLWlkLTM4NCIsImVtYWlsIjoiZW1haWwtMjc0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MTd9.iI8zUdxokKMe2SidUJ4dQkhr7CHGDICxdY1LlIj66vM Host: example.org Cookie:
curl "https://api.[your-domain.com]/v2/security_groups" -X GET \ -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4NCIsImVtYWlsIjoiZW1haWwtMjc0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MTd9.iI8zUdxokKMe2SidUJ4dQkhr7CHGDICxdY1LlIj66vM" \ -H "Host: example.org" \ -H "Cookie: "
200 OK
{ "total_results": 5, "total_pages": 1, "prev_url": null, "next_url": null, "resources": [ { "metadata": { "guid": "94e91c57-bac9-4a3b-8d77-2d0b94238f5c", "url": "/v2/security_groups/94e91c57-bac9-4a3b-8d77-2d0b94238f5c", "created_at": "2015-08-31T21:50:09Z", "updated_at": null }, "entity": { "name": "dummy1", "rules": [ ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/94e91c57-bac9-4a3b-8d77-2d0b94238f5c/spaces" } }, { "metadata": { "guid": "a92a8cd8-c117-4510-bcb9-18aac1e15df5", "url": "/v2/security_groups/a92a8cd8-c117-4510-bcb9-18aac1e15df5", "created_at": "2015-08-31T21:50:09Z", "updated_at": null }, "entity": { "name": "dummy2", "rules": [ ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/a92a8cd8-c117-4510-bcb9-18aac1e15df5/spaces" } }, { "metadata": { "guid": "6f5ee632-b156-4a02-9454-0f6f53a483bd", "url": "/v2/security_groups/6f5ee632-b156-4a02-9454-0f6f53a483bd", "created_at": "2015-08-31T21:50:17Z", "updated_at": null }, "entity": { "name": "name-2298", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/6f5ee632-b156-4a02-9454-0f6f53a483bd/spaces" } }, { "metadata": { "guid": "a6ce9597-ee4d-48ab-b9ce-4f04552a633c", "url": "/v2/security_groups/a6ce9597-ee4d-48ab-b9ce-4f04552a633c", "created_at": "2015-08-31T21:50:17Z", "updated_at": null }, "entity": { "name": "name-2299", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/a6ce9597-ee4d-48ab-b9ce-4f04552a633c/spaces" } }, { "metadata": { "guid": "30f12a3b-e449-407d-99ee-f7a6f062ab50", "url": "/v2/security_groups/30f12a3b-e449-407d-99ee-f7a6f062ab50", "created_at": "2015-08-31T21:50:17Z", "updated_at": null }, "entity": { "name": "name-2300", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/30f12a3b-e449-407d-99ee-f7a6f062ab50/spaces" } } ] }
Content-Type: application/json;charset=utf-8 X-VCAP-Request-ID: 26d8f47a-a23b-48bf-9422-13d9aab1d4a8 Content-Length: 2923 X-Content-Type-Options: nosniff