阅读和查看 Automation Anywhere 文档

Automation 360

关闭内容

内容

打开内容

Using GET method

  • 已更新:2022/04/20
    • Automation 360 v.x
    • 探索
    • RPA Workspace

Using GET method

Use the Get method actions from the REST Web Service package to send requests to and receive responses from a REST API.

This example uses endpoints from the Swagger Petstore sample API (https://petstore.swagger.io/) to demonstrate using Get method action to retrieve data from the Petstore database.
注: GET method action does not take any request body.

过程

  1. 打开新 bot
    1. Control Room中,选择 “博茨 > 我的爬虫程序”。
    2. 单击 创建新 > 爬虫程序
    3. 创建任务爬虫 程序窗口中,输入 bot 名称。
    4. 接受默认文件夹位置 \Boths\
      要更改 bot 的存储位置,请单击 “选择 ”,然后按照提示操作。
    5. 单击 创建和编辑
  2. Use the Get method action to retrieve a list of all the available pets.
    1. Double-click or drag the REST Web Services > Get method action.

    2. Enter the following URI:
      https://petstore.swagger.io/v2/pet/findByStatus?status=available
    3. Under Authentication Mode drop-down, select No Authentication as this endpoint does not require authentication.
      注: Typically endpoint requires authentication to ensure that only authorized applications are able to access the data. Select an appropriate authentication mechanism to allow access to the endpoint you want to access.
    4. Create the variable Output in the Assign the output to a variable field. For more information on creating a variable, see 创建变量.
  3. Insert a Log to file action to see the response body.
    1. Double-click or drag the Log to file action.
    2. Provide the file path to a text file.
    3. In the Enter text to log field, enter $Output{Body}$.
  4. Click Save and then click Run.
    The bot retrieves the response body and saves it to the text file.
发送反馈