Run action¶
POST/
Firewall Management API · Firewalls
Action you want to do to a firewall.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-Tenant-ID | header | string (uuid) | Yes | Tenant ID. |
firewallId | path | string (uuid) | Yes | Firewall ID. |
Request body¶
Content type: application/json
Request body fields
actionstringrequiredAction type.
Must be one of:
Must be one of:
approveManagement.Request samples¶
curl -X POST "https://api-<data-region>.central.sophos.com/firewall/v1/firewalls/<firewallId>/action" -H "Authorization: Bearer <access-token>" -H "X-Tenant-ID: <tenant-id>" -H "Content-Type: application/json" -d "{
\"action\": \"approveManagement\"
}"
import requests
response = requests.post(
"https://api-<data-region>.central.sophos.com/firewall/v1/firewalls/<firewallId>/action",
headers={
"Authorization": "Bearer <access-token>",
"X-Tenant-ID": "<tenant-id>",
"Content-Type": "application/json",
},
json={'action': 'approveManagement'},
)
print(response.json())
$headers = @{
"Authorization" = "Bearer <access-token>"
"X-Tenant-ID" = "<tenant-id>"
"Content-Type" = "application/json"
}
$body = '{
"action": "approveManagement"
}'
Invoke-RestMethod -Method POST -Uri "https://api-<data-region>.central.sophos.com/firewall/v1/firewalls/<firewallId>/action" -Headers $headers -Body $body -ContentType "application/json"
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, err := http.NewRequest("POST", "https://api-<data-region>.central.sophos.com/firewall/v1/firewalls/<firewallId>/action", strings.NewReader(`{
"action": "approveManagement"
}`))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer <access-token>")
req.Header.Set("X-Tenant-ID", "<tenant-id>")
req.Header.Set("Content-Type", "application/json")
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/<firewallId>/action", {
method: "POST",
headers: {
"Authorization": "Bearer <access-token>",
"X-Tenant-ID": "<tenant-id>",
"Content-Type": "application/json",
},
body: JSON.stringify({
"action": "approveManagement"
}),
});
const data = await response.json();
console.log(data);
Responses¶
201 — Firewall action completed successfully.¶
Response fields
statusstringrequiredAction status.
Must be one of:
Must be one of:
succeeded, failed.actionstringrequiredAction type.
Must be one of:
Must be one of:
approveManagement.Errors¶
| Status | Meaning |
|---|---|
400 | Invalid request. |
401 | Authentication required. |
403 | Authorization required. |
404 | Can't find firewall. |
500 | Unexpected error. |
All error responses share the same shape — see the error response object.
See the guide for a narrative walkthrough of this API.