List of firewalls¶
GET/
Firewall Management API · Firewalls
List of firewalls.
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 objectrequiredFirewalls.
Items must be unique.
Items must be unique.
Firewall.
Show child attributesHide child attributes
idstring (uuid)requiredclusterobjectHigh availability cluster.
Show child attributesHide child attributes
idstring (uuid)requiredmodestring (enum)requiredHigh availability mode.
Must be one of:
Must be one of:
activeActive, activePassive.statusstring (enum)requiredHigh availability status.
Must be one of:
Must be one of:
auxiliary, primary, standalone, fault.peersarray of objectrequiredAuxiliary firewall for high availability primary firewall or vice-versa.
Show child attributesHide child attributes
idstring (uuid)requiredserialNumberstringrequiredtenantobjectrequiredTenant ID.
Show child attributesHide child attributes
idstring (uuid)requiredTenant ID.
serialNumberstringrequiredgroupobjectGroup ID.
Show child attributesHide child attributes
idstring (uuid)requiredGroup ID.
namestringGroup name.
Must be 1–250 characters long.
Must be 1–250 characters long.
hostnamestringrequiredMust be 1–250 characters long.
namestringrequiredMust be 3–40 characters long.
firmwareVersionstringexternalIpv4Addressesarray of string (ipv4)requiredmodelstringstatusobjectrequiredFirewall status.
Show child attributesHide child attributes
managingStatusstring (enum)requiredShows if the firewall is managed.
Must be one of:
Must be one of:
approvedByCustomer, approvalPending, rejectedByCustomer, revokedByCustomer, revokedByPartner, requestNotSent, claimed, unclaimed, waitingForDeployment.reportingStatusstring (enum)requiredShows if Sophos Central Reporting is turned on.
Must be one of:
Must be one of:
approvedByCustomer, approvalPending, requestNotSent.connectedbooleanrequiredsuspendedbooleanrequiredstateChangedAtstring (date-time)capabilitiesarray of stringFirewall capability.
Each item must be one of:
Each item must be one of:
highAvailability, sdwanGroup, configImport, default, sdwanMultiGroup, cloudAutoScale.createdByobjectrequiredShow child attributesHide child attributes
idstringPrincipal email or client ID.
typestring (enum)Principal type.
Must be one of:
Must be one of:
user, service.namestringUser principal name.
accountTypestringrequiredAccount type.
Must be one of:
Must be one of:
partner, tenant.accountIdstring (uuid)requiredAccount ID.
createdAtstring (date-time)requiredupdatedByobjectShow child attributesHide child attributes
idstringPrincipal email or client ID.
typestring (enum)Principal type.
Must be one of:
Must be one of:
user, service.namestringUser principal name.
accountTypestringrequiredAccount type.
Must be one of:
Must be one of:
partner, tenant.accountIdstring (uuid)requiredAccount ID.
updatedAtstring (date-time)geoLocationobjectGeolocation.
Show child attributesHide child attributes
latitudestringrequiredLatitude.
longitudestringrequiredLongitude.
pagesobjectrequiredPagination information for the response object.
Show child attributesHide child attributes
currentintegerrequiredThe 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.
sizeintegerrequiredThe size of the page being returned.
maxSizeintegerrequiredThe 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.