Showing security group rule details

GET /v2.0/security-group-rules/{security_group_rule_id}

Shows the details of a security group rule with the specified ID.

Source: https://docs.openstack.org/api-ref/network/v2/index.html#show-security-group-rule

Request

Parameters

Name In Type Description
security_group_rule_id path string The ID of the security group rule.
verbose (Optional) query boolean Show detailed information.
fields (Optional) query string The fields that you want the server to return. If no fields query parameter is specified, the networking API returns all attributes allowed by the policy settings. By using the fields parameter, the API returns only the requested set of attributes. The fields parameter can be specified multiple times. For example, if you specify fields=id&fields=name in the request URL, only the id and name attributes will be returned.

Example

# curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://<node_IP_addr>:9696/v2.0/security-group-rules/5e1786ee-59fc-43ef-8bc6-01d2001c8b59

Response

Parameters

Name In Type Description
security_group_rule body object A security_group_rule object.
id body string The ID of the security group rule.
tenant_id body string The ID of the project.
project_id body string The ID of the project.
created_at body string

Time at which the resource has been created.

The date and time stamp format is ISO 8601:

CCYY-MM-DDThh:mm:ss±hh:mm

For example, 2015-08-27T09:49:58-05:00.

The ±hh:mm value, if included, is the time zone as an offset from UTC. In this example, the offset value is -05:00.

updated_at body string

Time at which the resource has been updated. If the resource has not been updated, this field will be null.

The date and time stamp format is ISO 8601:

CCYY-MM-DDThh:mm:ss±hh:mm

For example, 2015-08-27T09:49:58-05:00.

The ±hh:mm value, if included, is the time zone as an offset from UTC. In this example, the offset value is -05:00.

revision_number body integer The revision number of the resource.
description body string A human-readable description for the resource.
remote_group_id body string The remote group UUID to associate with this security group rule.
remote_address_group_id body string The remote address group UUID that is associated with this security group rule.
direction body string Ingress or egress, which is the direction in which the security group rule is applied.
protocol body string The IP protocol represented by a string, an integer, or null. The string any (or integer 0) means all IP protocols.
ethertype body string Ethertype: IPv4 or IPv6.
port_range_max body integer The maximum port number in the range that is matched by the security group rule.
security_group_id body string The security group ID that is associated with this security group rule.
port_range_min body integer The minimum port number in the range that is matched by the security group rule.
remote_ip_prefix body string The remote IP prefix that is matched by this security group rule.
belongs_to_default_sg body boolean Indicates if the security group rule belongs to the default security group of the project or not.

Status codes

Success

Code Reason
200 - OK Request was successful.

Error

Code Reason
401 - Unauthorized

User must authenticate before making a request.

404 - Not Found

The requested resource could not be found.

Example

{
  "security_group_rule": {
    "id": "5e1786ee-59fc-43ef-8bc6-01d2001c8b59",
    "tenant_id": "39bbb405942f4fba80bb75e3db78e714",
    "security_group_id": "e7489f02-f846-46f2-9edf-cc5a2640041a",
    "ethertype": "IPv4",
    "direction": "ingress",
    "protocol": "tcp",
    "port_range_min": 80,
    "port_range_max": 80,
    "remote_ip_prefix": null,
    "remote_address_group_id": null,
    "normalized_cidr": null,
    "remote_group_id": null,
    "description": "",
    "created_at": "2025-04-11T15:48:11Z",
    "updated_at": "2025-04-11T15:48:11Z",
    "revision_number": 0,
    "project_id": "39bbb405942f4fba80bb75e3db78e714"
  }
}