Import firewall configuration¶
POST/
Firewall Management API · Firewall Config Import Export
Initiate configuration import and get a pre-signed upload URL. Specify the target firewalls and metadata of the configuration file in the upload-complete request.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-Partner-ID | header | string (uuid) | No | Optional partner ID. |
X-Tenant-ID | header | string (uuid) | No | Optional tenant ID. |
Request samples¶
curl -X POST "https://api-<data-region>.central.sophos.com/firewall/v1/firewall-config/firewalls/import" -H "Authorization: Bearer <access-token>" -H "X-Partner-ID: <partner-id>" -H "X-Tenant-ID: <tenant-id>"
import requests
response = requests.post(
"https://api-<data-region>.central.sophos.com/firewall/v1/firewall-config/firewalls/import",
headers={
"Authorization": "Bearer <access-token>",
"X-Partner-ID": "<partner-id>",
"X-Tenant-ID": "<tenant-id>",
},
)
print(response.json())
$headers = @{
"Authorization" = "Bearer <access-token>"
"X-Partner-ID" = "<partner-id>"
"X-Tenant-ID" = "<tenant-id>"
}
Invoke-RestMethod -Method POST -Uri "https://api-<data-region>.central.sophos.com/firewall/v1/firewall-config/firewalls/import" -Headers $headers
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("POST", "https://api-<data-region>.central.sophos.com/firewall/v1/firewall-config/firewalls/import", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer <access-token>")
req.Header.Set("X-Partner-ID", "<partner-id>")
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/firewall-config/firewalls/import", {
method: "POST",
headers: {
"Authorization": "Bearer <access-token>",
"X-Partner-ID": "<partner-id>",
"X-Tenant-ID": "<tenant-id>",
},
});
const data = await response.json();
console.log(data);
Responses¶
202 — Request accepted.¶
Response fields
transactionIdstring (uuid)requiredTransaction ID.
urlstring (uri)requiredPre-signed upload URL.
methodstringrequiredHTTP method to use with the URL.
Must be one of:
Must be one of:
PUT.expiresAtstring (date-time)requiredURL expiration time.
descriptionstringUpload the configuration (.tar) file to Amazon S3 using the provided pre-signed URL with an HTTP PUT request before the URL expires.
Errors¶
| Status | Meaning |
|---|---|
400 | Bad request. |
401 | Authentication required. |
403 | Authorization required. |
404 | Resource not found. |
500 | Unexpected error. |
All error responses share the same shape — see the error response object.
Response examples¶
202¶
{
"transactionId": "15a7f8ea-691c-4f03-862e-3cefb102818e",
"url": "https://example-bucket.s3.amazonaws.com/imports/15a7f8ea-691c-4f03-862e-3cefb102818e?X-Amz-Algorithm=...",
"method": "PUT",
"expiresAt": "2026-01-20T10:15:00Z",
"description": "Upload the configuration archive (TAR file) to Amazon S3 using the provided pre-signed URL with an HTTP PUT request before the URL expires."
}
See the guide for a narrative walkthrough of this API.