CLI (Template)
6 operations. Call any of them with omada_call_operation (or, in full tool mode, as a tool named by its operationId).
| Operation | Method | Summary |
|---|---|---|
| getCliConfigTemplate | GET | Get the CLI template configuration content |
| modifyCliConfigTemplate | PATCH | Modify the CLI template configuration content |
| createCliConfigTemplate | POST | Create a new CLI template configuration |
| deleteCliConfigTemplate | DELETE | Delete the CLI template configuration |
| getGridCliTemplate | GET | Get the CLI template configuration list |
| applyCliConfigTemplate | POST | Apply the CLI template configuration |
getCliConfigTemplate
GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/cli/config/cli-type/{cliType}/config-id/{configId}
Get the CLI template configuration content
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site ID |
cliType | path | string | yes | CLI type should be a value as follows: 0: site CLI; 1: device CLI; 2:model CLI. Site template only supports site CLI. Site template only supports site CLI. |
configId | path | string | yes | CLI Config ID |
// omada_call_operation
{
"operationId": "getCliConfigTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>",
"cliType": "<cliType>",
"configId": "<configId>"
}
}Details, permissions and error codes
Get the CLI template configuration content
The interface requires one of the permissions:
Global Site Template Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-1001 - Invalid request parameters.
-33011 - Operation failed because other operations are being performed on this site template. Please wait and try again later.
modifyCliConfigTemplate
PATCH /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/cli/config/cli-type/{cliType}/config-id/{configId}
Modify the CLI template configuration content
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site ID |
cliType | path | string | yes | CLI type should be a value as follows: 0: site CLI; 1: device CLI; 2:model CLI. Site template only supports site CLI. Site template only supports site CLI. |
configId | path | string | yes | CLI Config ID |
Request body — application/json (required) — schema ModifyCliTemplateOpenApiVO
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | CLI configuration name, it should be within the range of 1 - 64 characters |
deviceType | string | yes | Device type for CLI configuration application, it should be a value as follows: switch. |
description | string | no | CLI configuration description, it should be within the range of 0 - 256 characters. |
cliConfig | string | yes | CLI configuration content |
// omada_call_operation
{
"operationId": "modifyCliConfigTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>",
"cliType": "<cliType>",
"configId": "<configId>"
},
"body": "{...}"
}Details, permissions and error codes
Modify the CLI template configuration content
The interface requires one of the permissions:
Global Site Template Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-1001 - Invalid request parameters.
-33011 - Operation failed because other operations are being performed on this site template. Please wait and try again later.
createCliConfigTemplate
POST /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/cli/config/cli-type/{cliType}/save
Create a new CLI template configuration
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site ID |
cliType | path | string | yes | CLI type should be a value as follows: 0: site CLI; 1: device CLI; 2:model CLI. Site template only supports site CLI. Site template only supports site CLI. |
Request body — application/json (required) — schema ModifyCliTemplateOpenApiVO
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | CLI configuration name, it should be within the range of 1 - 64 characters |
deviceType | string | yes | Device type for CLI configuration application, it should be a value as follows: switch. |
description | string | no | CLI configuration description, it should be within the range of 0 - 256 characters. |
cliConfig | string | yes | CLI configuration content |
// omada_call_operation
{
"operationId": "createCliConfigTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>",
"cliType": "<cliType>"
},
"body": "{...}"
}Details, permissions and error codes
Create a new CLI template configuration
The interface requires one of the permissions:
Global Site Template Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-1001 - Invalid request parameters.
-33011 - Operation failed because other operations are being performed on this site template. Please wait and try again later.
deleteCliConfigTemplate
DELETE /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/cli/configs/cli-type/{cliType}
Delete the CLI template configuration
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site ID |
cliType | path | string | yes | CLI type should be a value as follows: 0: site CLI; 1: device CLI; 2:model CLI. Site template only supports site CLI. Site template only supports site CLI. |
Request body — application/json (required) — schema DeleteCliTemplateOpenApiVO
| Field | Type | Required | Description |
|---|---|---|---|
configId | string | no | CLI ID to be deleted. |
// omada_call_operation
{
"operationId": "deleteCliConfigTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>",
"cliType": "<cliType>"
},
"body": "{...}"
}Details, permissions and error codes
Delete the CLI template configuration
The interface requires one of the permissions:
Global Site Template Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-1001 - Invalid request parameters.
-33011 - Operation failed because other operations are being performed on this site template. Please wait and try again later.
getGridCliTemplate
GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/cli/configs/cli-type/{cliType}/device-type/{deviceType}
Get the CLI template configuration list
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site ID |
cliType | path | string | yes | CLI type should be a value as follows: 0: site CLI; 1: device CLI; 2:model CLI. Site template only supports site CLI. Site template only supports site CLI. |
deviceType | path | string | yes | Device Type. Supported type: switch. |
page | query | integer | no | Start page number. Start from 1. (default 1) |
pageSize | query | integer | no | Number of entries per page. It should be within the range of 1–1000. (default 100) |
// omada_call_operation
{
"operationId": "getGridCliTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>",
"cliType": "<cliType>",
"deviceType": "<deviceType>"
}
}Details, permissions and error codes
Get the CLI template configuration list
The interface requires one of the permissions:
Global Site Template Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-1001 - Invalid request parameters.
-33011 - Operation failed because other operations are being performed on this site template. Please wait and try again later.
applyCliConfigTemplate
POST /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/cli/configs/config-id/{configId}/apply
Apply the CLI template configuration
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
omadacId | path | string | auto | Omada ID (filled in automatically) |
siteTemplateId | path | string | yes | Site ID |
configId | path | string | yes | CLI Config ID |
// omada_call_operation
{
"operationId": "applyCliConfigTemplate",
"params": {
"siteTemplateId": "<siteTemplateId>",
"configId": "<configId>"
}
}Details, permissions and error codes
Apply the CLI template configuration
The interface requires one of the permissions:
Global Site Template Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-1001 - Invalid request parameters.
-33011 - Operation failed because other operations are being performed on this site template. Please wait and try again later.
-39051 - Operation failed. Please try again later.