Skip to content

List of firewalls

GET/firewalls

Firewall Management API · Firewalls

List of firewalls.

Required permissionfwcm.firewall.group:read

Parameters

Name In Type Required Description
X-Tenant-ID header string (uuid) Yes Tenant ID.
page query integer No The page number to fetch, starting with 1.
pageTotal query boolean No Whether the number of pages should be calculated and returned in the response.
pageSize query integer No The size of the page requested.
groupId query string No Firewall group ID, or 'ungrouped'. 'ungrouped' is a virtual group that hold all firewalls that aren't part of a firewall group.
search query string No Search.

Request samples

curl -X GET "https://api-<data-region>.central.sophos.com/firewall/v1/firewalls" -H "Authorization: Bearer <access-token>" -H "X-Tenant-ID: <tenant-id>"

import requests

response = requests.get(
    "https://api-<data-region>.central.sophos.com/firewall/v1/firewalls",
    headers={
        "Authorization": "Bearer <access-token>",
        "X-Tenant-ID": "<tenant-id>",
    },
)
print(response.json())

$headers = @{
    "Authorization" = "Bearer <access-token>"
    "X-Tenant-ID" = "<tenant-id>"
}
Invoke-RestMethod -Method GET -Uri "https://api-<data-region>.central.sophos.com/firewall/v1/firewalls" -Headers $headers

package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    req, err := http.NewRequest("GET", "https://api-<data-region>.central.sophos.com/firewall/v1/firewalls", nil)
    if err != nil {
        panic(err)
    }
    req.Header.Set("Authorization", "Bearer <access-token>")
    req.Header.Set("X-Tenant-ID", "<tenant-id>")

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}

const response = await fetch("https://api-<data-region>.central.sophos.com/firewall/v1/firewalls", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <access-token>",
    "X-Tenant-ID": "<tenant-id>",
  },
});
const data = await response.json();
console.log(data);

Responses

200 — List of firewalls.

Response fields

itemsarray of objectrequired
Firewalls.
Items must be unique.
Firewall.
Show child attributesHide child attributes
idstring (uuid)required
clusterobject
High availability cluster.
Show child attributesHide child attributes
idstring (uuid)required
modestring (enum)required
High availability mode.
Must be one of: activeActive, activePassive.
statusstring (enum)required
High availability status.
Must be one of: auxiliary, primary, standalone, fault.
peersarray of objectrequired
Auxiliary firewall for high availability primary firewall or vice-versa.
Show child attributesHide child attributes
idstring (uuid)required
serialNumberstringrequired
tenantobjectrequired
Tenant ID.
Show child attributesHide child attributes
idstring (uuid)required
Tenant ID.
serialNumberstringrequired
groupobject
Group ID.
Show child attributesHide child attributes
idstring (uuid)required
Group ID.
namestring
Group name.
Must be 1–250 characters long.
hostnamestringrequired
Must be 1–250 characters long.
namestringrequired
Must be 3–40 characters long.
firmwareVersionstring
externalIpv4Addressesarray of string (ipv4)required
modelstring
statusobjectrequired
Firewall status.
Show child attributesHide child attributes
managingStatusstring (enum)required
Shows if the firewall is managed.
Must be one of: approvedByCustomer, approvalPending, rejectedByCustomer, revokedByCustomer, revokedByPartner, requestNotSent, claimed, unclaimed, waitingForDeployment.
reportingStatusstring (enum)required
Shows if Sophos Central Reporting is turned on.
Must be one of: approvedByCustomer, approvalPending, requestNotSent.
connectedbooleanrequired
suspendedbooleanrequired
stateChangedAtstring (date-time)
capabilitiesarray of string
Firewall capability.
Each item must be one of: highAvailability, sdwanGroup, configImport, default, sdwanMultiGroup, cloudAutoScale.
createdByobjectrequired
Show child attributesHide child attributes
idstring
Principal email or client ID.
typestring (enum)
Principal type.
Must be one of: user, service.
namestring
User principal name.
accountTypestringrequired
Account type.
Must be one of: partner, tenant.
accountIdstring (uuid)required
Account ID.
createdAtstring (date-time)required
updatedByobject
Show child attributesHide child attributes
idstring
Principal email or client ID.
typestring (enum)
Principal type.
Must be one of: user, service.
namestring
User principal name.
accountTypestringrequired
Account type.
Must be one of: partner, tenant.
accountIdstring (uuid)required
Account ID.
updatedAtstring (date-time)
geoLocationobject
Geolocation.
Show child attributesHide child attributes
latitudestringrequired
Latitude.
longitudestringrequired
Longitude.
pagesobjectrequired
Pagination information for the response object.
Show child attributesHide child attributes
currentintegerrequired
The 1-based page number being returned.
totalinteger
(Optional) The total number of pages that exist, if pageTotal=true in the request.
itemsinteger
(Optional) The total number of items across all pages, if pageTotal=true in the request.
sizeintegerrequired
The size of the page being returned.
maxSizeintegerrequired
The maximum page size that can be requested.

Errors

Status Meaning
401 Authentication required.
403 Authorization required.
500 Unexpected error.

All error responses share the same shape — see the error response object.

Response examples

200

{
  "items": [
    {
      "id": "39df20ba-7330-41ae-9071-0ac682bdd1e6",
      "cluster": {
        "id": "6a72014b-ae91-4d50-807a-d3601e44b9b7",
        "mode": "activeActive",
        "status": "primary",
        "peers": {
          "id": "e2875239-be72-4b3e-85f2-37ec51fe3cbd",
          "serialNumber": "SFDemo-ta-xgs107w-07"
        }
      },
      "tenant": {
        "id": "3e382b8e-49fd-4cd9-8360-a364371d7650"
      },
      "serialNumber": "C01001JYCGB4J30",
      "group": {
        "id": "ab83681f-aff6-4c2d-b0e5-1e9960fa5ce7",
        "name": "Bangalore Group"
      },
      "hostname": "FW-1",
      "name": "fw-label",
      "externalIpv4Addresses": [
        "111.93.156.226",
        "125.16.229.10"
      ],
      "firmwareVersion": "SF01V_SO01_19.0.0.294",
      "model": "SFVUNL_SO01_SFOS 19.0.0 GA-Build294",
      "status": {
        "managing": "approvalPending",
        "reporting": "approvalPending",
        "connected": true,
        "suspended": false
      },
      "stateChangedAt": "2022-04-01T17:49:26.400Z",
      "capabilities": [
        "sdwanGroup"
      ],
      "geoLocation": {
        "latitude": "20.64",
        "longitude": "22.43"
      },
      "createdBy": {
        "id": "9f0a6bf4-1fa6-407a-aa1d-4b888a626bb3",
        "type": "user",
        "name": "Joe Bloggs",
        "accountType": "tenant",
        "accountId": "98be8a40-ea9e-488e-b7d1-200d924cdb54"
      },
      "createdAt": "2021-10-25T05:27:39.467Z",
      "updatedAt": "2022-04-01T18:08:26.472Z",
      "updatedBy": {
        "id": "0ab38272-0d0c-4425-936c-8e45a289169e",
        "type": "user",
        "name": "Jane Doe",
        "accountType": "partner",
        "accountId": "b2f5d2d4-a041-494c-a3a2-a45219b6349a"
      }
    }
  ],
  "pages": {
    "current": 1,
    "total": 1,
    "items": 1,
    "size": 100,
    "maxSize": 1000
  }
}

See the guide for a narrative walkthrough of this API.