Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

List files API

  • Updated: 2022/09/21
    • Automation 360 v.x
    • Explore
    • RPA Workspace

List files API

Use the List API to view details of all the objects (bots, folders, and files) in the Control Room. A successfully completed response returns the id parameter, which is a numeric value that is used in other APIs to identify the file, folder, or bot.

Request

POST http://{{ControlRoolURL}}/v2/repository/file/list
Header: X-Authorization <<authentication token>>
  • All API calls must contain an authentication token in the request header. Use the Authentication API to generate a JSON web token. See Authentication API.
  • To view objects in your private workspace, you must have a Bot Creator license and a role that includes the View my bots feature permission.
  • To view objects in the public workspace, you must be assigned a role that includes the View my bots feature permission and the View content bot permission to folders in the public workspace.

You can send an API request with or without filter parameters. An API request without any filter parameters specified, retrieves details of all the objects in the Control Room. You can use the filter parameters to retrieve specific set of file or folder objects, instead of fetching all objects in the Control Room. For more information, see Filtering, pagination, and sorting.

Request body without filters:
{
    "filter": null,
    "sort": [
        {
            "field": "directory",
            "direction": "desc"
        },
        {
            "field": "name",
            "direction": "asc"
        }
    ],
    "page": {
        "offset": 0,
        "length": 100
    }
}
Request body with filters:
{
    "filter": {
        "operator": "substring",
        "value": "bot",
        "field": "name"
    },
    "sort": [
        {
            "field": "directory",
            "direction": "desc"
        },
        {
            "field": "name",
            "direction": "asc"
        }
    ],
    "page": {
        "offset": 0,
        "length": 100
    }
}

Request Parameters

Parameter Type Required Description
filter Object No Filters the result based on operator, field, or value.
operator
Allowed enumerations are: NONE, lt, le, eq, ne, ge, gt, substring, and, or, not.
field
Allowed values are: name, lastModified, path, or folder.
value
Specify a value for the name, lastModified, path, or folder that you have selected in the field parameter.
sort Array No By default, search results are sorted in descending order of their IDs. To specify an alternate sorting, use the sort query parameter.

Enter the field by which you want to sort along with the direction asc (ascending) or desc (descending).

page Object No The page object allows you to get the desired pages.

Response

{
    "page": {
        "offset": 0,
        "total": 4619,
        "totalFilter": 100
    },
    "list": [
        {
            "id": "137169",
            "parentId": "111492",
            "name": ".25Bot",
            "permission": {
                "delete": true,
                "download": true,
                "upload": true,
                "run": true,
                "publishBotstore": false
            },
            "lastModified": "2022-04-11T10:28:18.098323Z",
            "lastModifiedBy": "291",
            "path": "Automation Anywhere\\Bots\\.25Bot",
            "directory": false,
            "size": "2615",
            "locked": false
        }
]}

Response Parameters

Parameter Type Description
offset Integer The starting list offset, used for pagination.
total Integer Total number of records.
totalFilter Integer Number of records after applying the filter.
List Array The list of directories and files.
List objects
id Integer The unique Id of the displayed objects (bots, folders, or files) .
parentId Integer The unique Id of the parent folder.
name String Name of the file or folder.
permission Object Displays permissions for the current user with the values True or False:
delete
Indicates if the current logged in user has rights to delete the bot.
download
Indicates if the current logged in user has rights to download (check-out) the bot.
upload
Indicates if the current logged in user has rights to upload (check-in) the bot.
run
Indicates if the current logged in user has rights to run or schedule the bot.
publishBotstore
Indicates if the current logged in user has rights to publish the bot to the bot store.
lastModified Integer Date and time when the bot was last updated.
lastModifiedBy String ID of the user who last updated the bot or file.
path Integer Path of the file or folder in the repository.
directory String Flag for directory
size Integer Size of the file. It is available only if the item type is file.
locked String Indicates whether the file is locked. It is available only if the item type is file.
Note: You can view the Control Room APIs in the Community Edition, but API functionality is limited. You need a licensed Automation 360 Edition to access the full functionality of the APIs.
The REST API responds to each request with an HTTP response code. For response codes, see API response codes.
Send Feedback