N O T I C E


MSPbots WIKI is moving to a new home at support.mspbots.ai to give you the best experience in browsing our Knowledge Base resources and addressing your concerns. Click here for more info!


You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

The API write-back can be customized by configuring the REST API Call bot block. Customizing the API write-back and creating an API REST block enables MSPbots to establish a seamless integration with your systems and allows us to retrieve relevant data so we can create reports that will help you monitor your performance, receive alerts, and perform necessary actions programmatically.

This article is a guide on how to configure the REST API Call bot block. It will use the Monitoring [Opened Tickets Today - Template] for_test bot as an example.

To set up the bot block

  1. Go to Bots on the MSPbots menu. 
    MSPbots bots
  2. Open the bot where you need to add a REST API Call block. Let's use the bot Monitoring [Opened Tickets Today - Template] for_test as an example.
    my bot
  3. When the selected bot opens, go to the Design tab. If another window opens, close it. 
    bot design
  4. Hover over the horizontal line between the blocks. Click , select Add a Block, and select the new block. 
    add a block
  5. Type REST API Call in the search bar and click REST API Call.
    rest api call
  6. Next, hover over the ellipsis for the REST API Call block and select Edit.
    edit block
  7. When the REST API Call window opens, enter the url address that will receive requests. 
    restful api
  8. (Optional) Select an integration.
    If you are configuring a REST API from an existing integration with MSPbots, select that software from the integration list. Otherwise, do not configure this parameter and proceed with the next step.
    select integration
  9. Select an appropriate HTTP method.
    • get - Retrieves information from the database without modifying or adding data. The results are consistent regardless of how many operations are performed.
    • post: Submits data and adds operations to the server.
    • put: Modifies the existing data on the server. This is similar to POST except that it modifies instead of adding.
    • delete: Removes a specific resource and deletes a record in a database.
    • options: Before using any of these methods, you can check the browser request to ensure the server will accept it.
      http method
  10. Next, set up the headers and input the relevant key and value. 
    header key_value
    Click Add to add more keys and values.
    add key-value

    To remove a pair of key and value, click Delete

  11. Set up the params. Select either the URL query and request body method to pass parameters to the server.
    1. query
      The URL query parameter is a way of passing parameters through the URL. In the URL, query parameters usually start with a "?" symbol and are separated by "&" symbols. For example: https://www.example.com/path/to/resource?param1=value1&param2=value2
      query method
    2. body
      The request body is an HTTP request with data that is usually part of a POST or PUT request. This data can be in various formats such as JSON, XML, or form data. These parameters are usually used for submitting forms, uploading files, or sending other types of data. 
      request body
      The params available for the request body method are noneform-datax-www-form-urlencoded, JSON, and XML
      request body methods
  12. Click Next to configure any remaining blocks, and click Finish when done. 



  • No labels