API Resources

This document assumes that:

  • you have a good working knowledge of APIs. If this is not the case, please check out a tutorial on the subject, such as API Tutorial

  • you have a valid working license for Rulex. If this is not the case, please submit a license through the license and installer portal.

Rulex API enable you to interact with Rulex programmatically.

API resources can be divided into the following macro categories, according to their function:

  • Authentication

  • Computation

  • Import and export

  • General

All referenced URLs have the same base: http://<hostname>:<port>


Authentication

Authentication resources are methods concerned with requesting, validating and refreshing tokens.

There are two ways to authenticate in Rulex:

  • Using a license and the following authentication methods. In this case the initial auth method is mandatory to perform all computational operations.

  • Via external authentication server, by starting the API server with the use-aaa parameter. In this case all the operations related to token retrieval must be requested to the specified authentication server, and the following methods cannot be used.

API

Description

Link to Page

Auth

Requests a new authentication token. 

Auth

TokenValidity

Requests information on the validity of a token.

TokenValidity

RefreshToken

Requests a new fresh authentication token. 

RefreshToken


Computation

Computation resources are methods concerned with computing processes and retrieving results from past computations.

API

Description

Link to Page

Compute

Computes a Rulex process.

Compute

ExecuteMacro

Executes a macro within a Rulex process.

ExecuteMacro

PendingResult

Retrieves results of past computations, which exceeded the computation time-out values.

PendingResult

The following scheme is an example of client-Rulex API Server communication:


Import and Export

Import and Export resources are methods concerned with importing/exporting processes.

API

Description

Link to Page

ImportProcess

Imports a specified PRC file into the Rulex Server.

ImportProcess

ExportProcess

Exports and downloads the specified process as a PRC file.

ExportProcess


General

General methods do not belong to any specific category, but offer general functionalities.

API

Description

Link to Page

DeleteProcess

Deletes a process present in the Rulex Server.

DeleteProcess

Download

Downloads a file present in the Rulex Server.

Download

ListProcess

Provides a list of the currently available processes.

ListProcess

Status

Checks whether the server is up and running and able to respond correctly.

Status

Upload

Uploads a file to the Rulex Server.

Upload