You are on page 1of 6

Integrating Third-Party Applications and Automation 360 Using Control

Room APIs: Step List

Introduction to the Course

Automation Anywhere Automation 360 provides various APIs that enable you to interact with the
Automation 360 Control Room from external applications. In this course, you will learn about the
Automation 360 Control Room APIs and their functionality. You will also learn how to use the
Swagger interface and Postman to send API requests to the Automation 360 Control Room and
obtain results.

1. Working with Authentication API Using Swagger UI and Postman Client

Introduction
In this demo, you will learn how the Authentication API works using the Swagger UI. You will also
learn how to make an Authentication API call to obtain the access code using Postman.

Prerequisites
• You need to have access to https://<ControlRoomURL>/swagger/, where Control Room URL
is the complete URL of your Enterprise Control Room.
• You can download the Postman client from the URL https://www.postman.com/downloads/

a. Creating the Authentication API requests using the Swagger UI


i. Open the Swagger page by accessing https://<ControlRoomURL>/swagger/
ii. In the Swagger page, click Authentication API. The Authentication API details page is
displayed. Read through the description of the API.
iii. Select the Schemes as HTTPS. In the Parameters section, the format of the
parameters is provided.
iv. Click Try it out to edit the username and password or the API key with the values
that you want to use. The Example value field can now be edited.
v. Specify the username and password.
vi. Specify the API key if you have one. Else, remove the apiKey value and leave the
quotes.
vii. Click Execute.
viii. In the Responses section, in the Code 200 field, the access token is displayed.

You can use this access token to make subsequent API calls to the Automation 360 Control Room.

b. Making an API call to obtain the access code using Postman


i. Launch Postman.
ii. Setup environments where you can list the details about the target server you will
be accessing using APIs.
Note: This information includes the target server URL, username and password of a
user who has permissions to make APIs calls against the server, and a variable that
will hold the access token.
iii. Select the environment for the current session in the drop-down.
iv. Select the POST method and specify the request URL.
Note: The Control Room URL is defined in the environment variable url. Specify the
variable name in url followed by the API endpoint to complete the request URL.
v. In the Body section, specify the request body.
Note: For the Authentication API, you can either specify the username and password
or specify the environment variables that hold these values.
vi. Click Send.
vii. The Response section displays the response code, in this case 200 OK.
viii. Select the access code and assign it to the environment variable that is created.

A quick view of the environment indicates that the token variable now holds the access token value
that you have just generated.

1
2. Working with User Management API to Retrieve User List

Introduction
In this demo, you will learn how to retrieve the list of users using the User Management API.

Prerequisite
You need to have access to https://<ControlRoomURL>/swagger/, where Control Room URL is the
complete URL of your Enterprise Control Room.

a. Retrieving the entire user list


i. Open the Swagger page by accessing https://<ControlRoomURL>/swagger/
ii. In the Swagger page, click User Management API.
iii. Select the Schemes as HTTPS.
iv. Click Authorize
v. In the Value field, enter the access token that you generated earlier and click
Authorize.
vi. Click Close.
vii. Select the /users/list API to view its details.
viii. Click Try it out. The Example Value field is now available for editing.
ix. Leave the body blank as you want to retrieve the entire list of users.
x. Click Execute.
xi. In the Responses section, the entire list of users retrieved from the Automation 360
Control Room is displayed.

b. Retrieving the user list using filter


i. Open the Swagger page by accessing https://<ControlRoomURL>/swagger/
ii. In the Swagger page, click User Management API.
iii. Select the Schemes as HTTPS.
iv. Click Authorize
v. In the Value field, enter the access token that you generated earlier and click
Authorize.
vi. Click Close.
vii. Select the /users/list API to view its details.
viii. Click Try it out.
ix. In the request body section, specify the filter criteria in JSON format.
x. Click Execute.
xi. In the Responses section, the list of users that match the filter criteria retrieved
from the Enterprise Control Room is displayed.

2
3. Working with User Management API to Manage Roles

Introduction
In this demo, you will learn how to make some APIs calls using the Role Management APIs.

Prerequisite
You can download the Postman client from the URL https://www.postman.com/downloads/

a. Retrieving the list of roles from the Automation 360 Control Room
i. Launch Postman and open the Role Management API.
ii. Select the GET method and specify the request url.
iii. Specify the authorization token in the header information.
iv. Click Header and add the X-Authorization key with the access token as the value.
v. Specify the variable name in the value field.
vi. Specify the request body.
vii. Click Send.

b. Retrieving specific roles from the Enterprise Control Room


i. Launch Postman and open the Role Management API.
ii. Select the GET method and specify the request url.
Note: The base url is stored in the url environment variable.
iii. Specify the authorization token in the header information.
iv. Click Header and add the X-Authorization key with the access token as the value.
Note: Since the access token value is stored in the environment variable, specify the
variable name in the value field.
v. In the request body, add the specific role id to the request url.
vi. Click Send.
vii. The response body displays the details of just that role.

c. Creating new roles and display the details of the newly created role
i. Launch Postman and open the Role Management API.
ii. Select the POST method and specify the request url.
iii. Specify the authorization token in the header information.
iv. Click Header and add the X-Authorization key with the access token as the value.
v. Specify the variable name in the value field.
vi. In the request body, specify the role name, role description, the id, and other details
of the permissions that this role should have.
vii. Click Send.
viii. Note the new role id.
ix. Open Get Role by id API.
x. Specify the role id and the details of the newly create role is displayed.

d. Assign a new role to a user

3
i. Launch Postman and open the Role Management API.
ii. Select the PUT method and specify the request url.
Note: In the request url, specify the id of the user that you would like to update.
iii. Specify the header information.
iv. In the request body, specify the newly created role id to assign to the user.
v. Click Send and the response code indicates that the user is successfully updated.

You can see that the API role is assigned to the user.

4
4. Deploying Bot Using the Bot Deploy API

Introduction
In this demo, you will learn how to use the Bot Deploy API to deploy a bot on a device using a bot
runner user.

Prerequisite
You can download the Postman client from the URL https://www.postman.com/downloads/

a. Use the Authentication API to obtain an access token


i. Launch Postman and use the Authentication API to obtain an access token.
ii. Specify the appropriate username and password.
iii. Click Send.
iv. The Response section displays the response code.
v. Copy the access token.
vi. Use the Device API to obtain a list of bot runner users. Note down the id of the bot
runner user.
vii. Use the File list API to obtain the id of the bot you want to run.
viii. Use the Device Pool list API to obtain the id of the device pool that contains the
device on which you want to execute the bot.

b. Deploy the bot using the Bot Deploy API.


i. Use the POST method and specify the request url here.
ii. Specify the access token as the value for the X-Authorization key.
iii. In the request body, specify the
a) bot id as the value for the fileId.
b) botrunner id as the value for runAsUserIds.
c) devicepool id as the value for poolIds.
iv. Click Send.
v. A 200 OK response code is received along with the deployment id.
vi. Copy the deployment id.

c. Monitor the activity using the Activity List API


i. Open the Activity List API.
ii. Use the POST method and the activity/list request url.
iii. Specify the access token and in the Request body, specify the deployment id.
iv. Click Send.
The activity details are displayed in the response body. Observe the file name or the bot name,
status, user id, and the file id.

You might also like