Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

Background Information

  • By configuring the REST API Call bot block, you can customize the API write back.
  • This Wiki wiki uses the 'Monitoring [Opened Tickets Today - Template] for_test’ bot as an example.

Main Section

  1. Go to Bots.
  2. Open the bot that you want to add the REST API Call block to, and switch to the Design tab.
  3. Click Image Added When designing bots, click Image Removed  and then click   Add a Block.
    Image Modified
  4. Click the blue box to select a block.
    Image Modified
  5. Enter  REST API Call  into the search bar, and then click on  REST API Call  to add the REST API Call block.
    Image Modified
  6. Click  Image Modified  and then click  Edit  to make your   settings.
    Image Modified
  7. Enter the  url address.
    Image Removed address.
    Image Added
  8. (Optional)Select an integration.
    • If the RESTful API you want to configure is from an integration integrated with MSPbots, please select that integration.
    • Otherwise, please do not configure this parameter.
      Image Added
  9. Select the appropriate   method.
    • get: Use to retrieve information from the database without modifying or adding data. Results are consistent regardless of how many operations are performed.
    • post: Use to submit data and add operations to the server.
    • put: Use to modify existing data on the server, similar to POST but focused on modifying rather than adding.
    • delete: Use to remove a specific resource, like deleting a record in a database.
    • options: A pre-check request made by the browser to ensure the server accepts the request before sending get, post, put, or delete requests.
      Image RemovedImage Added
  10. Set up the   headers.
    1. Click   Add.
      Image RemovedImage Added
    2. Please input the relevant  key-value  pair.
      Image RemovedImage Added
      1. If you need to remove it, click on   Delete.
  11. Set up the  params.
    there are usually two methods used to pass parameters to the server-side: URL query parameters and request body.
    Image Removed
    • Image Added
    • body:
      The request body is an HTTP request part that contains data, which 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.
      • none
    Image Removed
      • Image Added
      • form-data
    Image Removed
      • Image Added
      • X-WWW-form-urlencoded
    Image Removed
      • Image Added
      • json
    Image Removed
      • Image Added
      • xml
    Image Removed
      • Image Added
  12. If there are any blocks left other blocks, such as an Alert block, after the   REST API Call   block, click  Next  to configure the remaining blocks and then click  Finish  when you're finished.
    Image RemovedImage Added
    Image RemovedImage Added
    • If there
    is only one 
    • are no more blocks after the REST API Call
     
    • block, click
     
    • on Finish
     to
    •  to complete your settings.
    Image Removed
    • Image Added