Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

Using the Put method

  • Updated: 2022/06/30
    • Automation 360 v.x
    • Explore
    • RPA Workspace

Using the Put method

Use the Put 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 Put method action to update data to the Petstore database.

Procedure

  1. Use the Put method action to update the pet name to "Pluto" and pet status to "sold".
    1. Double-click or drag the REST Web Services > Put method action.
    2. Enter the following URI:
      https://petstore.swagger.io/v2/pet
    3. Open the log file saved in Using the Get method and copy the Pet ID of the first entry.
    4. Copy and paste the following into the Custom parameters field, replacing the text in the angle brackets with the value that you copied from the file:
      {
        "petId": 0,
         "name": "Pluto",
        "status": "sold"
      }
    5. Insert the variable Output in the Assign the output to a variable field.
  2. Move the Message box action below the Put method action:
    1. Double-click or drag the Message box action.
    2. In the Enter text to log field, enter $Output{Body}$.
  3. Click Save and then click Run.
    The bot retrieves the response body and prints it to the Message box. A successful response includes "name":"Pluto","status":"sold".
Send Feedback