Webhooks

Bailo provides webhooks for programmatic, event-driven interactions with individual models for interfacing with external applications.

Events

A Bailo model's webhook events are:

  • createRelease
  • updateRelease
  • createReviewResponse
  • createAccessRequest

To view and configure webhooks for a given model, refer to the Webhook section of our api docs.

Request Format

When a webhook is triggered, it will send a POST request to the webhook's URI.

The webhook will include "Authorization": "Bearer <token>" in the request headers if the webhook has a token.

The body of the webhook's request will vary depending on the type of hook.

createRelease & updateRelease

{
  "event": "{createRelease|updateRelease}",
  "description": "A release event happened",
  "modelId": "abc123",
  "modelCardVersion": 1,
  "semver": "0.0.1",
  "notes": "Initial release",
  "minor": false,
  "draft": false,
  "fileIds": ["0123456789abcdef01234567"],
  "images": [
    {
      "repository": "abc123",
      "name": "some-docker-image",
      "tag": "1.0.0"
    }
  ],
  "deleted": false,
  "createdBy": "user",
  "createdAt": "2025-01-21T12:00:00.000Z",
  "updatedAt": "2025-01-21T12:00:00.000Z"
}

createReviewResponse

{
  "event": "createReviewResponse",
  "description": "A review response was created",
  "semver": "0.0.1",
  "accessRequestId": "123456789abcdef012345678",
  "modelId": "abc123",
  "kind": "{release|access}"
  "role": "mtr",
  "createdAt": "2025-01-21T12:00:00.000Z",
  "updatedAt": "2025-01-21T12:00:00.000Z"
}

createAccessRequest

{
  "event": "createAccessRequest",
  "description": "An access request was created",
  "id": "some-access-request-mno456",
  "modelId": "abc123",
  "schemaId": "minimal-access-request-general-v10",
  "metadata": {
    "overview": {
      "name": "some access request",
      "entities": ["user:user"],
      "endDate": "2025-01-21"
    }
  },
  "deleted": false,
  "createdBy": "user",
  "createdAt": "2025-01-21T12:00:00.000Z",
  "updatedAt": "2025-01-21T12:00:00.000Z"
}

Copyright © Crown Copyright 2025.