Skip to main content

Retrieve Firewall Details

GET https://infrahub-api.nexgencloud.com/v1/core/firewalls/{id}

Retrieves details on an existing firewall, including the firewall rules it contains and information about the virtual machines to which it is attached.


Path parameters


id integer   Required

The unique identifier of the firewall for which to retrieve details.


Attributes


status boolean

Indicates the success or failure of the request to retrieve details for a specified firewall. true, indicates success, while false indicates error.


message string

A message confirming the status of the request to retrieve firewall details.


firewall object

Returns the firewall object, containing details on the firewall, the firewall rules it contains, and the VMs to which it is attached.

For descriptions of the fields within the firewall object returned in response to your request, please refer to the documentation here.


Example request
curl -X GET "https://infrahub-api.nexgencloud.com/v1/core/firewalls/{id}" \
-H "accept: application/json"\
-H "api_key: YOUR API KEY"
Response
{
"status": true,
"message": "Getting firewall success",
"firewall": [
{
"id": 10,
"name": "firewall",
"description": "test firewall",
"environment": {
"id": 1281,
"name": "testenv1",
"region": "NORWAY-1"
},
"status": "SUCCESS",
"created_at": "2024-01-17T11:09:33",
"rules": [
{
"id": 36660,
"direction": "egress",
"protocol": "any",
"port_range_min": 1,
"port_range_max": 65535,
"ethertype": "IPv6",
"remote_ip_prefix": "0.0.0.0/0",
"status": "SUCCESS",
"created_at": "2024-01-17T11:09:37"
},
{...}
],
"attachments": [
{
"id": 1,
"status": "SUCCESS",
"vm": {
"id": 1,
"name": "example-vm",
"flavor": "s",
"environment": "test-env",
"status": "HIBERNATED",
"created_at": "1970-01-01T00:00:00.000Z"
},
"created_at": "1970-01-01T00:00:00.000Z"
}
]
}
]
}

Returns


This response returns the status of the request to retrieve firewall details, a message describing the status, and the firewall object containing details about the specified firewall and the virtual machines to which it is attached.


Back to top