Skip to main content

Connecting the BB Bot to an external system

Getting the API URL and API token for the BB bot

After configuring the BB Bot 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 BB Bots to your external system.

To get the API URL and API token for the BB Bot:

  • Copy the API URL for the BB Bot 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 BB Bot page is associated with the user account setting up the BB Bot. As a best practice we recommend creating a special Service Account for BB bots and use the API token for that account for configuring your APIs.

    bb_bot_API_info.png

Using the BB Bot API

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

Viewing your BB Bot Data (Get request)

Updating the BB Bot Data (Post request)

To update information within the BB Bot, 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 BB bot. Go to Authorization tab, choose Bearer Token, and paste the API Key for the BB bot.

    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 BB Bot 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 BB Bot page in the Hoot Admin space.

    meta

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



    When the API calls include metatdata that matches the following format, the information is included on the Analytics page of the BB Bot 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 BB Bot history.



    In the following example, we are setting the state of the BB bot 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