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.eyJ1c2VyX2lkIjoidWFhLWlkLTM0NCIsImVtYWlsIjoiZW1haWwtMjQ2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDk1MzE1MzR9.fJ3iJKMZzlHDIhg_pVUc0FH3bFaBJImwTKXY4e9IowI Host: example.org Cookie:
curl "https://api.[your-domain.com]/v2/security_groups" -X GET \ -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM0NCIsImVtYWlsIjoiZW1haWwtMjQ2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDk1MzE1MzR9.fJ3iJKMZzlHDIhg_pVUc0FH3bFaBJImwTKXY4e9IowI" \ -H "Host: example.org" \ -H "Cookie: "
200 OK
{ "total_results": 5, "total_pages": 1, "prev_url": null, "next_url": null, "resources": [ { "metadata": { "guid": "f81cc2f8-0e00-4dcd-941c-43b98c43ff4c", "url": "/v2/security_groups/f81cc2f8-0e00-4dcd-941c-43b98c43ff4c", "created_at": "2015-11-30T23:38:53Z", "updated_at": null }, "entity": { "name": "dummy1", "rules": [ ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/f81cc2f8-0e00-4dcd-941c-43b98c43ff4c/spaces" } }, { "metadata": { "guid": "4082ace5-9b17-4bdc-949e-eadaab9badaf", "url": "/v2/security_groups/4082ace5-9b17-4bdc-949e-eadaab9badaf", "created_at": "2015-11-30T23:38:53Z", "updated_at": null }, "entity": { "name": "dummy2", "rules": [ ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/4082ace5-9b17-4bdc-949e-eadaab9badaf/spaces" } }, { "metadata": { "guid": "4d172430-e8e0-41b7-8252-332c731f5af5", "url": "/v2/security_groups/4d172430-e8e0-41b7-8252-332c731f5af5", "created_at": "2015-11-30T23:38:54Z", "updated_at": null }, "entity": { "name": "name-2317", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/4d172430-e8e0-41b7-8252-332c731f5af5/spaces" } }, { "metadata": { "guid": "d6a49516-7de1-4f3b-9d69-c86101373ef5", "url": "/v2/security_groups/d6a49516-7de1-4f3b-9d69-c86101373ef5", "created_at": "2015-11-30T23:38:54Z", "updated_at": null }, "entity": { "name": "name-2318", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/d6a49516-7de1-4f3b-9d69-c86101373ef5/spaces" } }, { "metadata": { "guid": "3f85d91e-f305-4ff5-84e1-791ecc0d2886", "url": "/v2/security_groups/3f85d91e-f305-4ff5-84e1-791ecc0d2886", "created_at": "2015-11-30T23:38:54Z", "updated_at": null }, "entity": { "name": "name-2319", "rules": [ { "protocol": "udp", "ports": "8080", "destination": "198.41.191.47/1" } ], "running_default": false, "staging_default": false, "spaces_url": "/v2/security_groups/3f85d91e-f305-4ff5-84e1-791ecc0d2886/spaces" } } ] }
Content-Type: application/json;charset=utf-8 X-VCAP-Request-ID: Content-Length: 2923 X-Content-Type-Options: nosniff