Template Subscription API
Firebox templates define reusable Firebox settings that you can subscribe devices to. You can use the Firebox Management API to retrieve templates available to your account, retrieve template subscriptions, subscribe a device to templates, change template order, or unsubscribe from all templates.
You can use the Firebox Management API to:
Endpoints:
/{v1}/configuration/{accountid}/templates/subscribe
/{v1}/configuration/{accountid}/templates/subscribe
Retrieve Firebox Template Subscriptions
/{v1}/configuration/{accountid}/templates/subscribe
Make a request to this endpoint to retrieve Firebox templates available in the specified account, templates subscribed by a Firebox, or Fireboxes subscribed to a Firebox template.
With no query parameters, the response returns templates available in an account, that includes inherited templates. When you specify the device query parameter, the response returns a list of templates subscribed by that Firebox. When you specify the templateid query parameter, the response returns a list of Fireboxes subscribed to that template. The device and templateid parameters are mutually exclusive.
/{v1}/configuration/{accountid}/templates/subscribe
Make a request to this endpoint without the device or templateid query parameters to retrieve Firebox templates available to the specified WatchGuard Cloud account, including inherited templates.
Path Parameters
When you send a request to this endpoint, you must include these path parameters:
|
accountid
|
Your WatchGuard Cloud account ID. You can see your Example: WGC-1-123abc456 or ACC-1234567 |
Example Request
This request retrieves Firebox templates available in the specified WatchGuard Cloud account, including inherited templates:
curl -X GET https://api.usa.cloud.watchguard.com/rest/firebox/management/v1/configuration/WGC-1-123abc456/templates/subscribe
-H 'Authorization: Bearer eyJraWQiOiJNWnpabklNK2V6Q3BXUE...'
-H 'Accept: application/json'
-H 'Content-Type: application/json'
-H 'WatchGuard-API-Key: s9t7El6RZFg8UcmRhYKdwXqBhyuioiWER83Nqd0tL'
Example Response
The response returns Firebox templates available in an account, including inherited templates, in JSON format:
{
"account_id": "WGC-1-child",
"templates": [
{
"id": "tmpl_266318_QtD0zFYL5k28tUsg",
"name": "Branch office",
"account_id": "WGC-1-child"
},
{
"id": "tmpl_456",
"name": "Corporate defaults",
"account_id": "WGC-1-parent"
}
]
}
Data returned in the response includes the following parameters:
|
account_id
|
Account used to authorize the request. Example: WGC-1-child |
|
templates
|
Templates available from the account hierarchy. |
|
id
|
Specifies the Firebox template ID. Example: tmpl_266318_QtD0zFYL5k28tUsg |
|
name
|
Specifies the Firebox template name. Example: Branch office |
|
account_id
|
Account that owns the template. Example: WGC-1-child |
/{v1}/configuration/{accountid}/templates/subscribe?device={device}
Make a request to this endpoint to retrieve a list of Firebox templates subscribed by the specified Firebox.
Path Parameters
When you send a request to this endpoint, you must include these path parameters:
|
accountid
|
Your WatchGuard Cloud account ID. You can see your Example: WGC-1-123abc456 or ACC-1234567 |
Query Parameters
When you send a request to this endpoint, you must include this request parameter:
|
device
|
Specifies the Firebox ID in WatchGuard Cloud. Mutually exclusive with templateid. If omitted and templateid is also omitted, the request returns templates available to the account. Example: 136162 Example: FBCL-136162 |
Example Request
This request retrieves Firebox templates subscribed by device 266318:
curl -X GET https://api.usa.cloud.watchguard.com/rest/firebox/management/v1/configuration/WGC-1-123abc456/templates/subscribe?device=266318
-H 'Authorization: Bearer eyJraWQiOiJNWnpabklNK2V6Q3BXUE...'
-H 'Accept: application/json'
-H 'Content-Type: application/json'
-H 'WatchGuard-API-Key: s9t7El6RZFg8UcmRhYKdwXqBhyuioiWER83Nqd0tL'
Example Response
The response returns Firebox templates subscribed by the device in JSON format:
{
"account_id": "WGC-1-cddf744733c246adbec5",
"templates": [
{
"id": "tmpl_266318_QtD0zFYL5k28tUsg",
"name": "htripathi_sp_test_template"
},
{
"id": "tmpl_266318_SRNU8MPqJhLrZLXB",
"name": "another_template"
}
]
}
Data returned in the response includes the following parameters:
|
account_id
|
Specifies the WatchGuard Cloud account used to authorize the request. Example: WGC-1-cddf744733c246adbec5 |
|
templates
|
Lists Firebox templates subscribed by the device. |
|
id
|
Specifies the Firebox template ID. Example: tmpl_266318_QtD0zFYL5k28tUsg |
|
name
|
Specifies the Firebox template name. Example: htripathi_sp_test_template |
/{v1}/configuration/{accountid}/templates/subscribe?templateid={templateid}
Make a request to this endpoint to retrieve Fireboxes subscribed to the specified Firebox template.
Path Parameters
When you send a request to this endpoint, you must include these path parameters:
|
accountid
|
Your WatchGuard Cloud account ID. You can see your Example: WGC-1-123abc456 or ACC-1234567 |
Query Parameters
When you send a request to this endpoint, you must include this request parameter:
|
templateid
|
Specifies the Firebox template ID. Mutually exclusive with device. If omitted and device is also omitted, the request returns templates available to the account. Example: tmpl_266318_QtD0zFYL5k28tUsg |
Example Request
This request retrieves Fireboxes subscribed to the specified Firebox template:
curl -X GET https://api.usa.cloud.watchguard.com/rest/firebox/management/v1/configuration/WGC-1-123abc456/templates/subscribe?templateid=tmpl_266318_QtD0zFYL5k28tUsg
-H 'Authorization: Bearer eyJraWQiOiJNWnpabklNK2V6Q3BXUE...'
-H 'Accept: application/json'
-H 'Content-Type: application/json'
-H 'WatchGuard-API-Key: s9t7El6RZFg8UcmRhYKdwXqBhyuioiWER83Nqd0tL'
Example Response
The response returns Fireboxes subscribed to the Firebox template in JSON format:
{
"account_id": "WGC-1-cddf744733c246adbec5",
"devices": [
{
"id": "266318"
},
{
"id": "136162"
}
]
}
Data returned in the response includes the following parameters:
|
account_id
|
Indicates the WatchGuard Cloud account used to authorize the request. Example: WGC-1-cddf744733c246adbec5 |
|
devices
|
Lists Fireboxes subscribed to the Firebox template. |
|
id
|
Indicates the Firebox ID in WatchGuard Cloud. Example: 266318 |
Update Firebox Template Subscription
/{v1}/configuration/{accountid}/templates/subscribe
Make a request to this endpoint to subscribe a Firebox to Firebox templates, change the order of subscribed templates, or unsubscribe a Firebox from all templates. Specify only the template IDs in the templates parameter that you want the Firebox to subscribe to. The Firebox is unsubscribed from templates that you do not include. An empty templates array unsubscribes the Firebox from all templates. Specify template IDs in the order of priority to apply on the Firebox.
/{v1}/configuration/{accountid}/templates/subscribe
Make a request to this endpoint to subscribe a Firebox to one or more Firebox templates.
Path Parameters
When you send a request to this endpoint, you must include these path parameters:
|
accountid
|
Your WatchGuard Cloud account ID. You can see your Example: WGC-1-123abc456 or ACC-1234567 |
Request Body
When you send a request to this endpoint, you must include this information in the request body:
|
device
|
Specifies the Firebox device ID in WatchGuard Cloud. Example: 266318 |
|
templates
|
Specifies a list of all the template IDs that you want a Firebox to subscribe to, in order. Maximum: 50 template IDs per request. Example: tmpl_123, tmpl_456 |
Example Request
This request subscribes device 266318 to two Firebox templates:
curl -X POST https://api.usa.cloud.watchguard.com/rest/firebox/management/v1/configuration/WGC-1-123abc456/templates/subscribe
-H 'Authorization: Bearer eyJraWQiOiJNWnpabklNK2V6Q3BXUE...'
-H 'Accept: application/json'
-H 'Content-Type: application/json'
-H 'WatchGuard-API-Key: s9t7El6RZFg8UcmRhYKdwXqBhyuioiWER83Nqd0tL'
-d '{
"device": "266318",
"templates": [
"tmpl_123",
"tmpl_456"
]
}'
/{v1}/configuration/{accountid}/templates/subscribe
Make a request to this endpoint to change the order of Firebox templates subscribed by a Firebox. Specify the template IDs in the order of priority to apply on the Firebox.
Path Parameters
When you send a request to this endpoint, you must include these path parameters:
|
accountid
|
Your WatchGuard Cloud account ID. You can see your Example: WGC-1-123abc456 or ACC-1234567 |
Request Body
When you send a request to this endpoint, you must include this information in the request body:
|
device
|
Specifies the Firebox device ID in WatchGuard Cloud. Example: 266318 |
|
templates
|
Specifies a list of all the template IDs that you want a Firebox to subscribe to, in order. Maximum: 50 template IDs per request. Example: tmpl_456, tmpl_123 |
Example Request
This request changes the order of subscribed Firebox templates for device 266318:
curl -X POST https://api.usa.cloud.watchguard.com/rest/firebox/management/v1/configuration/WGC-1-123abc456/templates/subscribe
-H 'Authorization: Bearer eyJraWQiOiJNWnpabklNK2V6Q3BXUE...'
-H 'Accept: application/json'
-H 'Content-Type: application/json'
-H 'WatchGuard-API-Key: s9t7El6RZFg8UcmRhYKdwXqBhyuioiWER83Nqd0tL'
-d '{
"device": "266318",
"templates": [
"tmpl_456",
"tmpl_123"
]
}'
/{v1}/configuration/{accountid}/templates/subscribe
Make a request to this endpoint to unsubscribe a Firebox from all Firebox templates. Specify an empty templates array.
Path Parameters
When you send a request to this endpoint, you must include these path parameters:
|
accountid
|
Your WatchGuard Cloud account ID. You can see your Example: WGC-1-123abc456 or ACC-1234567 |
Request Body
When you send a request to this endpoint, you must include this information in the request body:
|
device
|
Specifies the Firebox device ID in WatchGuard Cloud. Example: 266318 |
|
templates
|
Specifies a list of all the template IDs that you want a Firebox to subscribe to, in order. An empty templates array unsubscribes a Firebox from all Firebox templates. Maximum: 50 template IDs per request. Example: [] |
Example Request
This request unsubscribes device 266318 from all Firebox templates:
curl -X POST https://api.usa.cloud.watchguard.com/rest/firebox/management/v1/configuration/WGC-1-123abc456/templates/subscribe
-H 'Authorization: Bearer eyJraWQiOiJNWnpabklNK2V6Q3BXUE...'
-H 'Accept: application/json'
-H 'Content-Type: application/json'
-H 'WatchGuard-API-Key: s9t7El6RZFg8UcmRhYKdwXqBhyuioiWER83Nqd0tL'
-d '{
"device": "266318",
"templates": []
}'
Example Response
The response returns the updated Firebox template subscription details in JSON format:
{
"template_group": {
"id": "tmplg_266318_XWtrxfPzRRkG3eU",
"account": "WGC-1-cddf744733c246adbec5",
"device": "266318",
"name": "device_template_group",
"object": "template_group",
"templates": [
"tmpl_266318_QtD0zFYL5k28tUsg",
"tmpl_266318_SRNU8MPqJhLrZLXB"
]
},
"templates": [
{
"id": "tmpl_266318_QtD0zFYL5k28tUsg",
"account": "WGC-1-cddf744733c246adbec5",
"device": "266318",
"name": "htripathi_sp_test_template",
"object": "template"
},
{
"id": "tmpl_266318_SRNU8MPqJhLrZLXB",
"account": "WGC-1-cddf744733c246adbec5",
"device": "266318",
"name": "another_template",
"object": "template"
}
]
}
Data returned in the response includes the following parameters:
|
template_group
|
Firebox template group object. |
|
id
|
Represents the unique identifier of the object. Example: tmplg_266318_XWtrxfPzRRkG3eU |
|
object
|
Type of object. Example: template_group |
|
version
|
Version number of the object. Example: 1 |
|
account
|
Your WatchGuard Cloud account ID. Example: WGC-1-cddf744733c246adbec5 |
|
created
|
Object creation time in Unix epoch time format. Example: 1579907960 |
|
device
|
Specifies the device this object applies to. Example: 266318 |
|
author
|
Author of the object. This is always empty for objects added or updated with the Firebox Management API. |
|
name
|
Name of the template group. Example: device_template_group |
|
templates
|
Lists the Firebox template IDs in the template group, in subscription order. Example: tmpl_266318_QtD0zFYL5k28tUsg, tmpl_266318_SRNU8MPqJhLrZLXB |
|
templates
|
List of Firebox template objects. |
|
id
|
Represents the unique identifier of the object. Example: tmpl_266318_QtD0zFYL5k28tUsg |
|
object
|
Type of object. Example: template |
|
version
|
Version number of the object. Example: 1 |
|
account
|
Your WatchGuard Cloud account ID. Example: WGC-1-cddf744733c246adbec5 |
|
created
|
Object creation time in Unix epoch time format. Example: 1579907960 |
|
device
|
Specifies the device this object applies to. Example: 266318 |
|
author
|
Author of the object. This is always empty for objects added or updated with the Firebox Management API. |
|
name
|
Name of the Firebox template. Example: htripathi_sp_test_template |