Skip to main content

Connecting the Sentry to an external system

Getting the API URL and API token for the Sentry

After configuring the Sentry connect it to the external system from where it will get status updates.

Important

You need to have some technical know how and ability to work with APIs to be able to connect Sentries to your external system.

To get the API URL and API token for the Sentry:

  • Copy the API URL for the Sentry and API Token and use it in the external system to send updates programatically to the data.world system.

    Note that the API token available on the Sentry page is associated with the user account setting up the Sentry. As a best practice we recommend creating a special Service Account for Sentries and use the API token for that account for configuring your APIs.

    sentry_api_info.png

Using the Sentry API

In this section we explain how you can use the Sentry API using Postman. You can use any tool of your choice.

Viewing your Sentry Data (Get request)

Updating the Sentry Data (Post request)

To update information within the Sentry, we need to submit a POST request.

To do this in Postman:

  1. In Postman, create a post request. Paste the API URL for the Sentry. Go to Authorization tab, choose Bearer Token, and paste the API Key for the Sentry.

    bb_bot_sample_api_post_request01.png
  2. On the Parameters tab, provide the parameters for the API.

    Table 1.

    Parameter

    Description

    state

    The current Sentry state. Value options are- happy, sad, or sick.

    user_message

    A message for the Hoot badge. Maximum 80 character are allowed.

    history_note

    An internal note added to the history to explain the current changes.

    private_entry

    If this is passed as true, the history_note will not be visible to the end users viewing a connected Hoot popup. The messages is present on the Sentry page in the Hoot Admin space.

    meta

    You can optionally pass along metadata that can contain any data that you want associated with Sentry.



    When the API calls include metatdata that matches the following format, the information is included on the Analytics page of the Sentry in the Hoot Admin space.

    Table 2.

    Parameter

    Description

    latest_record_at

    or

    meta[latest_record_at]

    The value is the time of the latest record. It is sent to the connected Hoots to display on the Hoot badge.

    counts[count_name]

    or

    meta[counts][count_name]

    This is a way to track counts of items over time.

    meta[yourkey]

    Create a new key and value that will be saved in the Sentry history.



    In the following example, we are setting the state of the Sentry to Sick.

    bb_bot_sample_api_post_request.png
  3. View the results in the Hoot Admin space.

    bb_bot_sample_updated_by_API.png