Description

Request URL

Compute API v2.0

GET /v2/{tenant_id}/servers/{server_id}/os-security-groups

Request Paramters

Parameter Value Style Description
X-Auth-Token User Token header
tenant_id URI
server_id Server ID plain

Request Json

This operation does not accept a request body.

Normal response codes

200

Example

curl -i -X GET \
-H "Accept: application/json" \
-H "X-Auth-Token: 35941e7df872405d84e5b026dba8323c" \
https://compute.tyo1.cloud.z.com/v2/1864e71d2deb46f6b47526b69c65a45d/servers/e25b3611-96df-4514-a54b-7729aec48dc1/os-security-groups
HTTP/1.1 200 OK
Date: Thu, 11 Dec 2014 05:19:59 GMT
Server: Apache
Content-Length: 649
Content-Type: application/json

{
    "security_groups": [
        {
            "description": "gncs-ipv4-ssh",
            "id": "7171b7d6-9095-4491-a48b-995757f22864",
            "name": "gncs-ipv4-ssh",
            "rules": [
                {
                    "from_port": 22,
                    "group": {},
                    "id": "fd32dc7b-6eb3-4c0b-9bc0-bcc29c687bf6",
                    "ip_protocol": "tcp",
                    "ip_range": {
                        "cidr": "0.0.0.0/0"
                    },
                    "parent_group_id": "7171b7d6-9095-4491-a48b-995757f22864",
                    "to_port": 22
                }
            ],
            "tenant_id": "1864e71d2deb46f6b47526b69c65a45d"
        },
        {
            "description": "gncs-ipv6-ssh",
            "id": "ce9b2e74-3476-473b-8b9b-697ab6642e39",
            "name": "gncs-ipv6-ssh",
            "rules": [
                {
                    "from_port": 22,
                    "group": {},
                    "id": "a2aa4928-f39b-4a06-967a-cc37dca89edf",
                    "ip_protocol": "tcp",
                    "ip_range": {
                        "cidr": "0.0.0.0/0"
                    },
                    "parent_group_id": "ce9b2e74-3476-473b-8b9b-697ab6642e39",
                    "to_port": 22
                }
            ],
            "tenant_id": "1864e71d2deb46f6b47526b69c65a45d"
        }
    ]
}
HTTP/1.1 200 OK
Date: Thu, 11 Dec 2014 05:12:01 GMT
Server: Apache
Content-Length: 22
Content-Type: application/json

{
    "security_groups": []
}