Skip to main content

Webhooks

Overview#

It's often helpful to know when your deployment is complete no matter its state (READY or ERROR). You can use a webhook with a deployment. Here's how it works.

Arbitrium will make an HTTP POST request at the provided URL when you complete a deployment. This request contains a JSON body with the same data provided by our route /v1/status/{request_id}. We expect no response from your side.

A tool really helpful to test webhooks is the Henry's Post Test Server V2 (or the toilet as we call it). You can generate a new toilet and use it for development purpose and check the data sent from Arbitrium.

Deployment Webhook Example#

The Deployment Webhook Call Flow can be found here

POST request to /v1/deploy (API Reference)

Include your API Token in your Headers like this:

{
"Content-Type": "application/json",
"Authorization": "token super_secret_token_1234"
}

REST payload:

{
"app_name": "speedtest",
"version_name": "v1",
"ip_list": ["1.1.1.1"],
"webhook_url": "https://ptsv2.com/t/0n7by-1652897234/post"
}

Session Webhook Example#

The Session Webhook Call Flow can be found here

POST request to /v1/session (API Reference)

Include your API Token in your Headers like this:

{
"Content-Type": "application/json",
"Authorization": "token super_secret_token_1234"
}

REST payload:

{
"app_name": "mymmorpg",
"version_name": "session-seat",
"ip_list": [
"1.2.3.4"
],
"webhook_url": "https://ptsv2.com/t/0n7by-1652897234/post"
}