Skip to the content.

Welcome to Hyland Rocket RPA API Helper

With this dll you are able to connect to the Hyland RPA API.


Getting started

Download

You can get the latest version in the releases here:
https://github.com/marchorst/Hyland.Rocket.RPA.ApiHelper/releases/latest

Dependencies

External references

Newtonsoft.Json (Version: 11.0.2, net452)
https://nuget.info/packages/Newtonsoft.Json/11.0.2

RestSharp (Version: 106.15.0, net452)
https://nuget.info/packages/RestSharp/106.15.0

You can use any other version from the dependencies as well, but it is yet tested only with these versions.

Preconditions

Be sure to follow the documentation for direct API Access here:
https://docs.hyland.com/RPA/en_US/22/1/RPAP/RPA_Platform.htm
(Administration->Direct API requests with Postman)

Connect through the API

Access token

// Initialize the API Connection
var rpaApiObject = new RpaApi("https://your.domain.without.ending.slash/heart", "https://your.domain.without.ending.slash/identity", "AccessToken");

Hint: You can generate an “Access token” in your “Hyland RPA Manager Account Settings”.

Username and password (Deprecated)

// Initialize the API Connection
var rpaApiObject = new RpaApi("https://your.domain.without.ending.slash/heart", "https://your.domain.without.ending.slash/identity", "Heart's Client ID", "USERNAME", "PASSWORD");

Hint: Heart’s Client ID Note: The ID can be found in Heart’s appsettings.json file at HeartServer:Swagger:ClientId

Create a new Task

To create a new task you can either use the Create Method with some parameters or create a new “NewTask” object and use this as your parameter.

Example create a new Task with a DataTable

// Create a dummy DataTable if you want
var dt = new DataTable("Table");
dt.Columns.Add("ColName");
dt.Rows.Add("Test");

// Serialize it with the RpaHelper
var inputData = RpaHelper.SerializeDataTable(dt);

// Create a new Task
// 1.
ITask task = rpaApiObject.Tasks.Create(1, inputData);

// rpaApiObject.TasksRoute() and rpaApiObject.Tasks are the same
// You can create a new task either with the method above or use a "NewTask" Object as parameter.

// 2.
var newTaskObject = new NewTask()
{
    CheckDiversity = true,
    Diversity = "Test",
    InputData = inputData,
    ProcessId = 1,
    Redoable = true,
    Type = RpaTaskType.PRO
};

ITask task2 = rpaApiObject.TasksRoute().Create(newTaskObject);

Get a Task by TaskID

To get a Task by the TaskID you can either use an ITask object or use the TaskID as an integer.
ITask task = rpaApiObject.TasksRoute().Get(task);

Helpers

Serialize a DataTable

RpaHelper.SerializeDataTable(DataTable table)

Serialize to JSON

RpaHelper.ToJson(object o)

Serialize any other

RpaHelper.Serialize<T>(T obj)

Additional hints

OnBase Studio

When trying to import the Dlls’ to the OnBase Studio, you have to be sure that all three Dlls’ are in the same folder from where you import them.