Messages: webhook


This method accepts GET and POST requests, with an optional JSON or form payload, and converts the request into message fields. The resultant message is stored in the database and processed by the rule engine.

A set of reserved parameter names, specified in the query string, instruct the server how to parse the incoming request. The reserved parameters determine mapping between the request content and message fields and define which data is discarded by the database as extraneous.

Use this method to process HTTP notifications from services that support webhooks such as GitHub, AWS SNS, Jenkins, Docker Hub, Slack/Telegram/Discord Bots etc.



Method Path Payload Content-Type Header
POST /api/v1/messages/webhook/* JSON application/json
POST /api/v1/messages/webhook/* key=value application/x-www-form-urlencoded
GET /api/v1/messages/webhook/* None -

The request URL can point to any path after /webhook, for example, /api/v1/messages/webhook/service-1.


Requests must be authenticated.

When initiating a request, include user in the request URL as shown below:



User must have API_DATA_WRITE role and write permissions for the target entity.

Webhook User Wizard

To create a new user with permissions to write data for a specific entity, open Settings > Users and click Create Webhook User by expanding the split-button located below the Users table.

The wizard automatically creates user and entity groups with necessary permissions.

Request Parameters

Request parameters, except for reserved parameters, are converted into message tags where tag names equal parameter names and tag values equal parameter values. Tag names are converted to lower case. Non-printable characters such as space or tab in tag names are replaced with an underscore.

Request URL:


Message tags:


JSON Payload

The JSON payload is processed to locate numeric, string, and boolean fields which are added to the message as tags. The tag name is set from the field path, which is composed from the parent object path, followed by a period . and the name of the field. Tag names are converted to lower case with non-printable characters such as space replaced with an underscore.

Input document:

  "event": "commit",
  "repository": {
    "name": "atsd",
    "public": true,
    "Full Name": "Axibase TSD",
    "references": [],
    "authors": ["john.doe", "mary.jones"]

Message tags:

event = commit = atsd
repository.public = true
repository.full_name = Axibase TSD
repository.authors[0] = john.doe
repository.authors[1] = mary.jones

String fields are unquoted by removing leading and trailing single or double quotes, if present.

Array elements are assigned names based on array name and element index, starting with 0 for the first element.

Entity Mapping

Since stored messages are always associated with an entity, a request must include rules for the server to determine the entity name from the request parameters or payload.

  1. By default, the entity is set to the remainder of the path following the /api/v1/messages/webhook/ prefix.

    entity = jenkins
  2. Specify the entity literally by adding an entity parameter to the query string, for example /api/v1/messages/webhook/jenkins?entity=example

    entity = example
  3. Extract an entity name from a JSON field by referencing the full field name with the command.entity parameter, for example /api/v1/messages/webhook/jenkins?

      "server": {
        "name": "example",
        "site": "NUR"
    entity = example
  4. Extract entity name from request headers by specifying the header name, for example /api/v1/messages/webhook/jenkins?header.entity=X-AXI-Region

    HTTP request headers:

    X-AXI-Region: us-east-01
    entity = us-east-01

Default Message Field Values

  • Message type is webhook.
  • Message source is set to the remainder of the URL path after /webhook/ and before the query string. If the remainder is empty, source is set to an empty string.
source = incoming for /api/v1/messages/webhook/incoming?entity=test
source =          for /api/v1/messages/webhook?entity=test
  • Message entity is set to the remainder of the URL path after /webhook/ but before the query string. If the remainder is empty, the entity must be specified as described in Entity Mapping.
  • Message severity is undefined.
  • Message date is set to current server time.
  • Message tag request_ip is set to the remote IP address of the HTTP client that initiated the request.

Reserved Request Parameters

Literal Value Parameters

Use these parameters to set message fields to literal values.

Name Description
type Message type.
source Message source.
entity Message entity.
date Message date and time in ISO format.
message Message text.
severity Message severity as an integer or text code.
datetimePattern Date pattern applied to field: iso (default), seconds, milliseconds, user-defined date pattern.


entity = test-1
type = ci
severity = WARNING

Command Parameters

Command parameters set message field values from JSON field values.

Name Description
command.type Message type.
command.source Message source.
command.entity Message entity. Message time in ISO format, Unix time milliseconds/seconds, or user-defined format specified with datetimePattern parameter.
command.message Message text.
command.severity Message severity as an integer or text code.


  "server": "test-2",
  "event": "deploy"
entity = test-2
type = deploy

Header Parameters

Header parameters set message field values from header values.

Name Description
header.type Message type.
header.source Message source.
header.entity Message entity. Message date and time in ISO format.
header.message Message text.
header.tag.{name} Message tag.
header.severity Message severity as an integer or text code.


User-Agent: GitHub-Hookshot/5ee1da1
X-GitHub-Delivery: 955bf180-e573-11e7-9438-56fe67d6b38d
X-GitHub-Event: watch
X-Hub-Signature: sha1=b0d4aa86d17c6b77e5b35e7482769955ad9aca4d
entity = github
tags.event = watch

Filter Parameters

Filter parameters contain patterns that converted message tags must satisfy to be included in the generated message command.

Name Description
exclude Exclude tags with names that match the specified pattern.
excludeValues Exclude tags with values that match the specified pattern.
include Override exclude rules by including tags with names that match the specified pattern.
includeValues Override excludeValues rules by including tags with values that match the specified pattern.
  • The patterns support asterisk (*) and question mark (?) wildcard characters.
  • Tag name match is case-insensitive.
  • The parameters can contain multiple patterns separated by semi-colon (;).
  • Parameters can be repeated in the query string.


  "event": "commit",
  "result": "ok",
  "repository": {
    "name": "atsd",
    "public": true,
    "Full Name": "Axibase TSD",
    "references": []

Message Fields:

tag.event = commit
tag.result = ok = atsd

Parse Parameters

Name Description
json.parse Name of the request parameter or field in the JSON payload to be parsed as a JSON document and converted into message tags similar to the JSON payload itself.


  • form content type:


In this example the payload parameter contains a JSON string which is parsed into message tags using the json.parse=payload instruction.


Message tags:

  • JSON content type:


Message field in the JSON payload contains a string which is a JSON document itself. The Message field value is parsed and converted into message tags using the json.parse=Message instruction.

  "Type": "Notification",
  "Message": "{\"version\":\"0\",\"source\":\"aws.ec2\",\"region\":\"us-east-1\"}"

Message tags:


Control Parameters

Name Description
debug If set to true, the response includes the message record in JSON format.

Parameter Precedence

Reserved parameters abide by the following precedence convention:

  1. Literal Value Parameters
  2. Command Parameters
  3. Header Parameters


  • Request URL:
  • Request Headers:
User-Agent: GitHub-Hookshot/5ee1da1
  • Request Payload:
  "server": "test-2"
  • Message Command:

Sample URLs


Subscribe to GitHub repository events.


Amazon WS

Receive AWS SNS subscription notifications.



Subscribe to build status events from Jenkins.


Travis CI

Subscribe to build status events from Travis CI.



Receive incoming bot events using Slack Event API. Refer to the Slack webhook configuration instructions.



Receive incoming bot messages. Refer to the Telegram webhook configuration instructions.




POST https://username:password@atsd_hostname:8443/api/v1/messages/webhook/github?exclude=organization.*;repository.*;*.signature;*.payload;*.sha;*.ref;*_at;*.id&;repository.full_name&header.tag.event=X-GitHub-Event&excludeValues=http*&debug=true


  • Fields with a name that begins with organization. are excluded.
  • Fields with a name that begins with repository. are excluded, except
  • Fields and repository.full_name are included.
  • Fields with values starting with http are excluded.
  • Tag event is retrieved from the X-GitHub-Event header.


  "action": "started",
  "repository": {
    "id": 54949530,
    "name": "atsd",
    "full_name": "axibase/atsd",
    "owner": {
      "login": "axibase",
      "id": 10971416,
      "avatar_url": "",
      "gravatar_id": "",
      "url": "",
      "html_url": "",
      "followers_url": "",
      "following_url": "{/other_user}",
      "gists_url": "{/gist_id}",
      "starred_url": "{/owner}{/repo}",
      "subscriptions_url": "",
      "organizations_url": "",
      "repos_url": "",
      "events_url": "{/privacy}",
      "received_events_url": "",
      "type": "Organization",
      "site_admin": false
    "private": false,
    "html_url": "",
    "description": "Axibase Time Series Database Documentation",
    "fork": false,
    "url": "",
    "forks_url": "",
    "keys_url": "{/key_id}",
    "created_at": "2016-03-29T05:51:34Z",
    "updated_at": "2017-12-22T13:32:50Z",
    "pushed_at": "2017-12-22T12:56:17Z",
    "git_url": "git://",
    "ssh_url": "",
    "clone_url": "",
    "svn_url": "",
    "homepage": "",
    "size": 78274,
    "stargazers_count": 37,
    "watchers_count": 37,
    "language": "HTML",
    "has_issues": true,
    "has_projects": false,
    "has_downloads": true,
    "has_wiki": false,
    "has_pages": true,
    "forks_count": 12,
    "mirror_url": null,
    "archived": false,
    "open_issues_count": 1,
    "license": null,
    "forks": 12,
    "open_issues": 1,
    "watchers": 37,
    "default_branch": "master"
  "organization": {
    "login": "axibase",
    "id": 10971416,
    "url": "",
    "repos_url": "",
    "events_url": "",
    "hooks_url": "",
    "issues_url": "",
    "members_url": "{/member}",
    "public_members_url": "{/member}",
    "avatar_url": "",
    "description": "Public Axibase repositories on GitHub"
  "sender": {
    "login": "john_doe",
    "id": 2098022,
    "avatar_url": "",
    "gravatar_id": "",
    "url": "",
    "html_url": "",
    "followers_url": "",
    "following_url": "{/other_user}",
    "gists_url": "{/gist_id}",
    "starred_url": "{/owner}{/repo}",
    "subscriptions_url": "",
    "organizations_url": "",
    "repos_url": "",
    "events_url": "{/privacy}",
    "received_events_url": "",
    "type": "User",
    "site_admin": false


    "entity": "github",
    "type": "webhook",
    "source": "github",
    "severity": null,
    "tags": {
        "action": "started",
        "event": "watch",
        "": "atsd",
        "repository.full_name": "axibase/atsd",
        "request_ip": "",
        "": "2098022",
        "sender.login": "john_doe",
        "sender.site_admin": "false",
        "sender.type": "User"
    "date": "2017-12-22T13:32:50.901Z"


The last 100 recently received webhooks are listed on the Alerts > Incoming Webhooks page.