Resource PC commands
This document contains a list of commands available when communicating with the Blue Prism Resource PC listener. These commands are used by Blue Prism for its network communications, and are available to third party clients via an HTTP interface.
Recommended usage
When learning these commands, it is instructive to try them out as you read this document. You may do this as follows:
-
Start a Blue Prism Resource PC listener using the command:
automate.exe /public /resourcepc
-
Connect to the listener, using telnet:
telnet localhost 8181
If for whatever reason it is not convenient to use the (default) listener port of 8181, you may start the listener on a different port using the command line switch "/port". In such cases you should amend the port of your telnet connection accordingly.
-
Type the command "quit" to close the connection.
Commands
Authorization: Authed
Uses token authentication to either create a pending session with given process ID: 'createas <token> <procid>', create pending session for given queue with given process ID: 'createas <token> <procid> <queueident>' or create a pending session using process name: 'createas name <token> <name>'. The response is 'SESSION CREATED : <sessionid> or an error code.
Authorization: Authed
Uses token authentication to delete a pending session: 'deleteas <token> <sessionid>'. The response is 'SESSION DELETED' or an error code.
Authorization: Authed
Uses token authentication to either start a session running: 'startas <token> <sessionid>' or start the last session created on this connection: 'startas last <token>'. The response is 'STARTED' or an error code.
Authorization: Any
Get an authorisation token using the provided credentials. Use either; 'getauthtoken <processid> <userid> <password>' to supply credentials for Native/SSO authentication, or, 'getauthtoken upn <userprincipalname> <password> <processid>' for active directory authentication. This method is available for custom solutions designed for secured networks. It is not used by Blue Prism in normal operation.
Authorization: Authed
Either 'action <sessionid> <actionname>' to run an action on the specified session, or 'action last <actionname>' to run an action on the last session created on this connection. The response is 'STARTED' or an error code.
Authorization: AuthedOrLocal
Reports the current availability of this Resource PC for running more processes. The response is 'AVAILABLITY:level' where 'level' is one of the following four values:
- None – indicates that no process can be run at the moment, because an exclusive process is already running (or pending).
- Background – indicates that only a background process can be run, because there is already a foreground process running (or pending).
- Foreground – indicates that either a background or foreground process can be run, because there are no foreground or exclusive processes running (or pending).
- Exclusive – indicates that any kind of process can be run (including an exclusive process), because there are no processes running (or pending).
Authorization: AuthedOrLocal
Check if there are there any sessions pending/running? Responds yes or no.
Authorization: AuthedOrLocal
Get a list of active connections involving this Resource PC. The list is separated into two sections, labelled INBOUND and OUTBOUND.The inbound list shows connections into this Resource (as remote address and authenticated username) and the outbound list shows connections this Resource has open to other resources (which will be none, unless the Resource is a pool controller).
Authorization: Authed
Signifies that this is a connection from the controller of a pool. This command is used internally between Resource PCs only.
Authorization: Authed
Use 'getparams <sessionid>' to get the startup parameters used to start a process. The process must have already been started, but it does not necessarily have to be on the Resource from which the request is made. The response is PARAMS: followed by the parameters in XML format, NONE if there were no parameters, or otherwise an error description.
Authorization: Any
Use 'internalauth <token>' to perform token-based authentication. This uses a single-use token generated and registered with the database to confirm identity of the connecting user, to mitigate sniffing and replay attacks, and to allow direct connection in an AD environment. Blue Prism software only ever uses this method. Non-Blue Prism software can use AutomateC to generate a token.
Authorization: AuthedOrLocal
List the members of the pool for which this Resource PC is the controller. Example response:
MEMBERS – 2
9efb8f78-0777-4d28-aaa3-6fbd5da70f36 PC1
21e960d0-140a-488c-b09d-d3d7257bae54 PC2
The reported values are the ID and Name of the Resource.
Authorization: Authed
Use 'outputs <sessionid>' (or 'outputs last') to get the output parameters from a process or action that has completed successfully, or the failure reason from one that has failed. When running business object Actions, this also sets the object back to idle state, and must be used before another Action is started.The response is 'OUTPUTS:' followed by the output parameters of the completed session, in XML format.
Authorization: Any
Use 'password <pwd>' to complete authentication after a 'user' command. See the documentation for 'user' for more information.
Authorization: AuthedOrLocal
Returns the message 'pong'. Used for diagnostics.
Authorization: Authed
Determine which pool this resource is a member/controller of. The response will either be 'Not in a pool', 'Controller of <pool name>' or 'Member of <pool name>'.
Authorization: Authed
Provides a list of processes which are available to be run. Output is in the form of one process per line, formatted as follows:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx – Process One xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx – Process Two
The value in the first field is the unique identifier of the process. This is used in conjunction with the 'create' command to create a pending session for a process.
Authorization: Authed
Sets the userid that the pool member will run the session as
Authorization: Any
Terminate this session. The client is disconnected. The server continues to run.
Authorization: Authed
setvar <sessionid> [<varname>] type "<value>" "<description>"
Sets the value of a session variable within a session. If the operation is successful, the response is 'SET' – otherwise an error code.
Authorization: AuthedOrLocal
Shut down the Resource PC. Use optional parameter 'waitforsessions' to wait for any currently running sessions to complete before shutting down. Use the 'loginagent' parameter to ignore the shutdown request if the Resource PC is not used by the Login Agent.
Authorization: Authed
Set startup parameters to be used for the next session created on this connection. The parameters are given in XML format. The response is 'PARAMETERS SET'.
Authorization: AuthedOrLocal
Retrieves a list of pending, running, and completed sessions on the Resource PC. Output is in the form of one session per line, formatted as follows:
RESOURCE UNIT – PENDING 9efb8f78-0777-4d28-aaa3-6fbd5da70f36 – PENDING 21e960d0-140a-488c-b09d-d3d7257bae54 Total running: 2
The value in the last field is the unique identifier of the session.
The total running count represents the total count of all pending, running, and completed sessions on the Resource PC.
Authorization: Authed
Use 'stop <sessionid>' to stop process running. Optional extra parameters '<userid> <resourceid>' may be specified as a pair if this information is to be logged against session. The resourceid may be replaced by 'name <resource name>'. The response is 'STOPPING' or an error code.
Authorization: Any
Start username/password-based authentication. Use either 'user <userid>' to set user id, or 'user name <name>' to set user using user name. This must then be followed by the 'password' command to complete the authentication sequence. This authentication method is available for diagnostics and custom solutions designed for secured networks. It is not used by Blue Prism in normal operation.
Authorization: Authed
List all users. Users are displayed one per line, in the following format:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx – User One xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx – User Two
The value in the first field is the unique identifier of the user.
Authorization: Authed
Gets all the current session variables and their values for the given session ID. Example response: VARIABLES:2
[CasesWorked] number 212 [Exceptions] number 4
Authorization: Authed
Enable or disable session variable updates. Specify either 'on' or 'off'. The response is 'SET' or an error code.
Authorization: Any
Get version information – the response is the internal protocol version number.