Webhook reference

Webhook syntax

The basic curl command for running a webhook is:

curl --fail -u 'user:password' -X POST \
https://<tenant>.antithesis.com/api/v1/launch/<endpoint>

Curl (and similar tools) will exit successfully so long as the webhook returns anything at all, even if it returns a failure code. The --fail flag in the example above checks that command returned a success code.

Webhook parameters

Webhooks take optional parameters that control test behavior. There are default parameters, which affect all webhooks, and we can also create custom parameters for your needs, contact us to find out more.

Parameters are passed as JSON according to the following template:

{
    "params": {
        "parameter1_name": "parameter1_value",
        "parameter2_name": "parameter2_value",
    }
}

For example:

curl --fail -u 'user:password' -X POST \
https://<tenant>.antithesis.com/api/v1/launch/<endpoint> \
-d '{"params": { "param1_name": "param1_value", "param2_name":"param2_value" } }'

Webhook parameters

The following default parameters can be used to configure any Antithesis webhook. If you want additional ways to parametrize your tests, we can create custom parameters for you, just contact us. All parameters are optional.

When a parameter takes more than one value, e.g. antithesis.report.recipients or antithesis.images, values should be specified as a ; delimited list.

antithesis.report.recipients
Recipients who will receive emailed links to the triage report produced by this test run. If this parameter is not specified, emails will be sent to the default users set up for the endpoint. Example: u1@site.com;u2@site.com

antithesis.images
The image versions of the software that Antithesis will test. The images are specified as an optional registry, an image name and either a digest (which is recommended) or a tag. Images specified by digest will be tagged as latest within the Antithesis environment.

Multiple images should be specified as a ; delimited list. Each entry is in this format: [REGISTRY/]NAME(:TAG|@DIGEST).

Example: container_1@sha256:12341234;registry/container_2:latest_tag

  • registry: if not specified, the default will be: us-central1-docker.pkg.dev/molten-verve-216720/$TENANT_NAME-repository/

antithesis.config_image
The image version of your config image. Antithesis will pull this image version from the container registry. This should be a single image version formatted in the same way as those in the antithesis.images parameter.

antithesis.description
A string description of your test run. The description will be in the headers of the generated report and of any emails triggered by the test run.

antithesis.source
A string identifier used to filter property history in reports. In the resulting report, each property’s history is generated from all previous runs with the same antithesis.source parameter. This allows you to (for example) easily see the history of tests on a single branch.

The parameter may be arbitrary text, but you will likely provide a source control descriptor.

The following tooling integration parameters allow you to post the results of test runs back to the platform of your choice. In some cases, such as the Antithesis Github action, these parameters are automatically configured and you will not need to set them manually.

antithesis.integrations.<integration type>.callback_url
The callback URL

antithesis.integrations.<integration type>.token
A secret token.

<integration type>
Accepted integration types are github, discord, and slack.

You may post results back to as many different platforms as you like. For example, the following will post results back to both Discord and to Github:

curl --fail -u 'user:password' \
    -X POST https://<tenant>.antithesis.com/api/v1/launch/<endpoint> \
    -d '{"params": { "antithesis.description":"Nightly testing on main", 
        "antithesis.integrations.discord.callback_url": "https://discord.com/api/webhooks/1234567890123456789/",
        "antithesis.integrations.discord.token": "<secret>",
        "antithesis.integrations.github.callback_url": "<url>",
        "antithesis.integrations.gitub.token": "<secret>",
        "antithesis.images":"my_images_with_version_list" } }'

Deprecated parameters

The following parameters are deprecated.

antithesis.integrations.type
The CI / Source Control integration type.
Values["none", "github"]. Default value "none".

antithesis.integrations.callback_url
The URL Antithesis will call back to post the test results.

antithesis.integrations.token
A security token used to authenticate when calling back with results.