Actions API

The Actions API provides REST endpoints that you can use to run a variety of actions in YAML or JSON format or in an existing legacy BTXML script, and manage the scripts and variables related to those actions.

The actions that you can run by using the Actions API include many of the same actions that you can run in BarTender Designer, Integration Builder, and Process Builder. For a list of the actions supported by the Actions API, see Available Actions in the Actions API.

For more information, you can view the API reference by using ReDoc. In ReDoc, you can expand the items in the left navigation pane and then scroll to find the commands that you want. You can copy each command to your development environment and customize it as needed. To view the API reference in ReDoc, enter the following URL in the browser address bar:

https://am1.bartendercloud.com/api/actions_reference/redoc

The Actions API uses the POST, GET, and PATCH commands, as follows.

Action

Command

Description

Submit a Script to Run

Submits a script to run.

Get a List of Submitted Scripts

Gets a list of scripts that were submitted to the server.

Update Script Properties

Modifies the script's "KeepStatus" or "Command" properties.

Get a Script's Running Status

Gets a script's running status.

Get All Variable Values

Gets the values of all variables.

Get the Value of the Specified Variable

Gets the value of the specified variable.

When you use a POST command, you can instruct BarTender to perform various actions. You can use the parameters in the POST command to specify how long to wait for the actions to complete or what messages you want to receive.

After you submit the POST command, the server returns a response. This response contains an HTTP status code that indicates whether the script was accepted. Successful responses also include the script's ID, which you need to use the PATCH and GET commands. By default, after the actions finish running, action data such as status, messages, and variables are stored in the server for 60 minutes, but you can modify this setting and other parameters as needed.

A YAML reference document is available that provides complete details about the specific properties for each action and describes how to combine actions into groups and create arrays of actions to be sent as one script to the server. The YAML actions reference is provided as follows: