Enabling Webhooks

Webhooks allow notifications to be delivered to an external web server whenever certain actions occur. The webhook thus provides an alternative to email alerts.

MissingLink POSTs real-time notifications to a webhook that is associated with an organization. The POSTs are in the form of JSON documents that contain data relating to job and experiment execution.

For example:

{
  "assignmentType": "Job",
  "image": "missinglinkai/tensorflow:latest-devel-py3",
  "exitState": "done",
  "requirementsTxt": null,
  "jobName": "#i778d787be1 serene_dijkstra",
  "id": "i778d787be1",
  "createdAt": "2019-02-20T09:54:12.699575",
  "artifactsVolume": 5714970901741568,
  "project": "FastCap1Mnist",
  "alertType": "job_end",
  "completedAt": "2019-02-20T10:02:45.852153",
  "queuedAt": null,
  "state": "done",
  "env": {
    "LANG": "C.UTF-8",
    "ML_JOB_ID": "i778d787be1",
    "ML_QUEUE_ID": 5684256583974912,
    "ML_COMMAND": "./run.sh",
    "old_output_hashes": "5f7eca888bf11d16c243d34b22b6e7ff  -",
    "ML_GIT_REPO": "[email protected]:missinglinkai/rm-e22-mnist-test.git",
    "old_job_id": "i0e2292e852",
    "ML_OWNER_ID": "b2550734-8168-0cab-5714-e6146c8c2b74",
    "ML_GIT_TAG": "Fast1CapMnist",
    "ML_DATA_VOLUME": 6314367947636736,
    "ML_INVOCATION_ID": "i778d787be1",
    "ML_ORG_ID": "engineering-e2e",
    "ML_PROJECT_TOKEN": "pRdYkvPqmpmzKmRz",
    "ML_PROJECT_ID": "5720367259713536",
    "ML_DOCKER_IMAGE": "missinglinkai/tensorflow:latest-devel-py3",
    "ML_REQUESTED_RESOURCE": "CPU",
    "LC_ALL": "C.UTF-8",
    "ML_DATA_QUERY": "@version:f2c680ccc248c2fd79d1fd5e9bfb254218eef9e7",
    "ML_JOB_NAME": "serene_dijkstra",
    "ML_QUEUE_NAME": "Fast1CapMnist"
  },
  "startedAt": "2019-02-20T09:56:49.526518",
  "datetimeEnd": "February 20 2019 at 10:02AM UTC",
  "datetimeCreated": "February 20 2019 at 9:54AM UTC",
  "user": {
    "email": "[email protected]",
    "id": "b2550734-8168-0cab-5714-e6146c8c2b74",
    "name": "[email protected]"
  },
  "outputPaths": [
    "/output"
  ],
  "active": false,
  "data": {
    "volume": 6314367947636736,
    "query": "@version:f2c680ccc248c2fd79d1fd5e9bfb254218eef9e7",
    "destination": null,
    "iterator_mode": null
  },
  "src": {
    "tag": "Fast1CapMnist",
    "mode": "external",
    "repository": "[email protected]:missinglinkai/rm-e22-mnist-test.git"
  },
  "name": "serene_dijkstra",
  "persistentPaths": {},
  "server": "887e78ba5",
  "queue": {
    "id": "5684256583974912",
    "name": "Fast1CapMnist"
  },
  "command": [
    "./run.sh"
  ],
  "localMode": false,
  "requestedGpu": false,
  "viewJob": "https://missinglink-staging.firebaseapp.com/console/engineering-e2e/resources/jobs/i778d787be1/info"
}

The webhook is implemented by the organization as a URL that can accept the POST requests and pass on the data they deliver for further processing.

All you need to do is specify the URL to which MissingLink should deliver the requests.

Note

An organization can have one webhook.

To configure the webhook:

  1. Select the organization and click Settings.

    Settings button for configuring webhooks

    The Settings window is displayed:

    The Settings window is displayed

  2. Click Webhooks, then click Add Webhook.

    Add Webhook button for adding webhook

  3. Type in the URL to which the webhook will POST requests. The URL must start with https://.

  4. Click Add.

The webhook is active by default.