Skip to content

Webhook Setting ​

6 operations. Call any of them with omada_call_operation (or, in full tool mode, as a tool named by its operationId).

OperationMethodSummary
getWebhookForGlobalGETGet global webhook setting list.
createWebhookForGlobalPOSTCreate global webhook setting
deleteWebhookForGlobalDELETEDelete global webhook setting
modifyWebhookForGlobalPATCHModify global webhook setting
testWebhookForGlobalPOSTTest global webhook setting
getWebhookLogsForGlobalGETGet global webhook dispatch log list

getWebhookForGlobal ​

GET /openapi/v1/{omadacId}/webhook/settings

Get global webhook setting list.

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
json
// omada_call_operation
{
  "operationId": "getWebhookForGlobal"
}
Details, permissions and error codes

Get all global webhook setting.The template of webhook message is display at Open API Access Guide#5.3.1 Webhook Message Template.
The interface requires one of the permissions:
Global Webhook Manager View Only

createWebhookForGlobal ​

POST /openapi/v1/{omadacId}/webhook/settings

Create global webhook setting

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)

Request body — application/json (required) — schema OpenApiWebhookSettingAddVO

FieldTypeRequiredDescription
namestringyesWebhook name. It should contain 1 to 128 characters.
urlListarray<string>yesWebhook URL List. Up to 3 entries are allowed for the URL list
retryPolicyintegeryesWebhook retry policy. It should be a value as follows: 0:None, 1:Important (Up to 5 retries over 60 minutes), 2:Critical (Up to 5 retries over 24 hours)
shardedSecretstringnoWebhook Sharded Secret. It should contain 0 to 128 characters.
templateintegeryesWebhook template, it should be a value as follow: 0:Omada template, 1:Google chat template. Example: 0.
json
// omada_call_operation
{
  "operationId": "createWebhookForGlobal",
  "body": "{...}"
}
Details, permissions and error codes

Create global webhook setting.The template of webhook message is display at Open API Access Guide#5.3.1 Webhook Message Template.
The interface requires one of the permissions:
Global Webhook Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-44200 - The number of webhooks has reached the limit.
-44201 - This webhook name already exists.
-44203 - Webhook URL List should contain 1 to 3 URL entries. URL entries cannot be duplicated.

deleteWebhookForGlobal ​

DELETE /openapi/v1/{omadacId}/webhook/settings/{webhookId}

Delete global webhook setting

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
webhookIdpathstringyeswebhook ID
json
// omada_call_operation
{
  "operationId": "deleteWebhookForGlobal",
  "params": {
    "webhookId": "<webhookId>"
  }
}
Details, permissions and error codes

Delete global webhook setting.The template of webhook message is display at Open API Access Guide#5.3.1 Webhook Message Template.
The interface requires one of the permissions:
Global Webhook Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-44202 - This webhook entry does not exist.

modifyWebhookForGlobal ​

PATCH /openapi/v1/{omadacId}/webhook/settings/{webhookId}

Modify global webhook setting

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
webhookIdpathstringyeswebhook ID

Request body — application/json (required) — schema OpenApiWebhookSettingEditVO

FieldTypeRequiredDescription
urlListarray<string>yesWebhook URL List. Up to 3 entries are allowed for the URL list
retryPolicyintegeryesWebhook retry policy. It should be a value as follows: 0:None, 1:Important (Up to 5 retries over 60 minutes), 2:Critical (Up to 5 retries over 24 hours)
shardedSecretstringnoWebhook Sharded Secret. It should contain 0 to 128 characters.
templateintegeryesWebhook template, it should be a value as follow: 0:Omada template, 1:Google chat template. Example: 0.
json
// omada_call_operation
{
  "operationId": "modifyWebhookForGlobal",
  "params": {
    "webhookId": "<webhookId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify global webhook setting.The template of webhook message is display at Open API Access Guide#5.3.1 Webhook Message Template.
The interface requires one of the permissions:
Global Webhook Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-44202 - This webhook entry does not exist.
-44203 - Webhook URL List should contain 1 to 3 URL entries. URL entries cannot be duplicated.

testWebhookForGlobal ​

POST /openapi/v1/{omadacId}/webhook/settings/{webhookId}

Test global webhook setting

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
webhookIdpathstringyeswebhook ID

Request body — application/json (required) — schema OpenApiWebhookSettingTestVO

FieldTypeRequiredDescription
namestringyesWebhook name. It should contain 1 to 128 characters.
shardedSecretstringnoWebhook Sharded Secret. It should contain 0 to 128 characters.
urlListarray<string>yesWebhook URL List. Up to 3 entries are allowed for the URL list
templateintegeryesWebhook template, it should be a value as follow: 0:Omada template, 1:Google chat template. Example: 0.
json
// omada_call_operation
{
  "operationId": "testWebhookForGlobal",
  "params": {
    "webhookId": "<webhookId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Test global webhook setting.The template of webhook message is display at Open API Access Guide#5.3.1 Webhook Message Template.
The interface requires one of the permissions:
Global Webhook Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-44203 - Webhook URL List should contain 1 to 3 URL entries. URL entries cannot be duplicated.

getWebhookLogsForGlobal ​

GET /openapi/v1/{omadacId}/webhook/settings/dispatch-logs

Get global webhook dispatch log list

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
pagequeryintegernoStart page number. Start from 1. (default 1)
pageSizequeryintegernoNumber of entries per page. It should be within the range of 1–1000. (default 100)
filters.webhookIdquerystringyesFilter query parameters, support field d66aed17ea7238154ba610710d9a2890
filters.timeStartqueryintegeryesFilter query parameters, support field 1679297710438
filters.timeEndqueryintegeryesFilter query parameters, support field 1681889710438
json
// omada_call_operation
{
  "operationId": "getWebhookLogsForGlobal",
  "params": {
    "filters.webhookId": "<filters.webhookId>",
    "filters.timeStart": "<filters.timeStart>",
    "filters.timeEnd": "<filters.timeEnd>"
  }
}
Details, permissions and error codes

Get global webhook dispatch log list.The template of webhook message is display at Open API Access Guide#5.3.1 Webhook Message Template.
The interface requires one of the permissions:
Global Webhook Manager View Only

Released under the MIT License. Not affiliated with or endorsed by TP-Link.