Docs
Webhook

Running a test via webhook

⚠️

While you can trigger test runs using webhooks, we highly recommend using the Momentic CLI for interacting with Momentic's API.

You can trigger a test run by sending a POST request to a webhook URL. This can be useful if you want to trigger a test run in your CI pipeline. Make sure to generate an API key in the Momentic app first.

Running a single test

curl -X POST \
  -H 'Authorization: Bearer <INSERT_API_KEY_HERE>' \
  -H "Content-Type: application/json" \
  'https://api.momentic.ai/v1/tests/d8c4ee5c-bb47-4471-bbe1-93cbfef49fb4/queue'

Running multiple tests

curl -X POST \
  -H 'Authorization: Bearer <INSERT_API_KEY_HERE>' \
  -H "Content-Type: application/json" \
  'https://api.momentic.ai/v1/tests/queue' \
  --data-binary @- << EOF
  {
    "testIds": [
      "d8c4ee5c-bb47-4471-bbe1-93cbfef49fb4",
      "d8c4ee5c-bb47-4471-bbe1-93cbfef49fb4"
    ]
  }
EOF