Flow Operations

Import Flow

Description: Imports one or more flows from a specified source, placing them in the environment identified with the ID {envId}.

POST /resource/import/flow/{envId}

Parameters

Parameters in bold are mandatory.

Location

Name

Description

Type

querystring

origin

The source where the flow to import is located. Possible values are __local__, __filesystem__, __repo__.

str

path

envId

The ID of the environment where the flows will be imported. See Get Resource ID for further details on how to retrieve IDs.

str

body

params

A dictionary describing the parameters of the import. Possible entries are:

  • “path” the path to the .rfl file used in the import (considered only in ‘__filesystem__’ or ‘__local__’ origins)

  • “components” used to select which components of the flow are considered. A dictionary with the following entries:
    • topology: if true, the topology will be imported.

    • data: if true, the data will be imported.

    • doc: if true, the documentation will be imported.

    • graphics: if true, graphics will be imported.

    • events: if true, events will be imported.

    • modules: if true, modules will be imported.

    • var: if true, variables will be imported.

  • “source” a dictionary formed by the internal information of the source used (considered only in ‘__filesystem__’ or ‘__repo__’ case). The form of this dictionary differs according to the origin value. In the case of a ‘__filesystem__’ origin we have:
    while in the case of a ‘__repo__’ origin:
    • type: it must be the string "git" for a custom connection or the path to a Repository resource stored in the Rulex Platform working area.

    • <other components>: in case of custom connection, parameters expressed as explained in repository configuration section.

    • params: a further dictionary to express the branch and eventually tag from which import the desired flow
      • branchname: the hash of the versioned flow (obtained through the info operation) to be imported.

      • commitname: the name of the tag to be considered in the import operation. If null, it will import the latest version of the flow.

dict

querystring

incurr

If true, the flow will be imported in the current flow.

bool

querystring

label

The new name of the imported flow.

str

querystring

inmemory

If true, the flow will be imported in in-memory mode (no interaction with the database)

bool

body

permissionList

The permissions assigned to the new flow. The parameters to specify are:

  • “name”: the name of the user or the group. If the type entry is set to other, this has to be null.

  • “type”: the type of entity to which the permissions are assigned. It can be:
    • “user”

    • “group”

    • “other”

  • “view”: the view permissions of the specified entity. They can be one of these values: “allow”, “deny”, “unspecified” (default value)

  • “modify”: the modify permissions of the specified entity. They can be: “allow”, “deny”, “unspecified” (default value)

  • “create”: the create permissions of the specified entity. They can be: “allow”, “deny”, “unspecified” (default value)

  • “execute”: the execute permissions of the specified entity. They can be: “allow”, “deny”, “unspecified” (default value)

  • “delete”: the delete permissions of the specified entity. They can be: “allow”, “deny”, “unspecified” (default value)

  • “setpermissions”: the setpermissions permissions of the specified entity. They can be: “allow”, “deny”, “unspecified” (default value)

  • “share”: the share permissions of the specified entity. They can be: “allow”, “deny”, “unspecified” (default value)

list[dict]

querystring

withprogress

If true, progress information will be calculated.

bool

querystring

convertmodule

The selected module conversion policy.

str

querystring

resid

It sets the id of the imported resource.

str

querystring

convertsensitiveoptions

If true, sensitive options are encrypted.

bool

Response

The response schema for this specific request follows standard exposed in api response section. An example response is:

{
  "status": "completed",
  "code": 0,
  "data": {
      "label": "apiAdult",
      "timestamp": "2024-03-02 03:51:18",
      "lock": null,
      "info": {
          "created_on": "2021-12-01, 19:44:24,369",
          "last_modified": "2024-03-02 03:51:18",
          "last_modified_user": null
      },
      "exec_params": null,
      "id": "7c586303-0866-43be-8289-75ce624df356",
      "isversioned": false,
      "isversioneddirty": false,
      "status": null,
      "modules": [],
      "hasissens": {
          "code": [
              "Var_2"
          ]
      }
  },
  "desc": "",
  "status_code": 200,
  "progress": "100%"
}

Export Flow

Description: Exports one or more flows, identified with the IDs {flowIds}, to a generic filesystem, which can be your local filesystem or a remote one.

POST /resource/export/flow

Parameters

Parameters in bold are mandatory.

Location

Name

Description

Type

body

flowIds

The ID(s) of the flow(s) to be exported.

list

body

params

The export parameters of the flows. It contains the key value pairs:
  • source formed as in the Import flow case by a key uri which could be a path to a saved filesystem resource, local for a download export or one of the uri types in case of a custom connection.

  • <other components>: in case of custom connection, parameters expressed as explained in filesystem configuration section.

dict

body

flowLabels

The labels of the flows to be exported. Used only for progress purposes.

list

body

fields

The parameters regarding the export mode. Their value can be True (default value) or False. The export mode parameters available are:

  • “topology”: if true, the topology will be exported.
  • “data”: if true, the data will be exported.
  • “doc”: if true, the documentation will be exported.
  • “graphics”: if true, graphics will be exported.
  • “events”: if true, events will be exported.
  • “modules”: if true, modules will be exported.
  • var“: if true, variables will be exported.
  • dict

    querystring

    source_custom

    If true, reference to saved sources will be exported.

    bool

    querystring

    addsuffix

    If true, the date and timestamp will be added to the end of the basename as a suffix.

    bool

    querystring

    addprefix

    If true, the date and timestamp will be added to the start of the basename as a prefix.

    bool

    querystring

    addtag

    If true, the tag name will be added to the end of the basename as a suffix.

    bool

    querystring

    taskList

    The list of the tasks to be exported.
    Lists must be transformed into a string,
    by joining the separate elements with commas “,”, and wrapping any spaces with quotes.
    For example: [“a”, “b”, “c”] –> “a,b,c”;
    [“first element”, “second element”, “third_element”] –> “‘first element’,’second element’,third_element”

    str, or
    list for multiple names.

    querystring

    newnames

    The new names to be assigned to the exported flows.
    Lists must be transformed into a string,
    by joining the separate elements with commas “,”, and wrapping any spaces with quotes.
    For example: [“a”, “b”, “c”] –> “a,b,c”;
    [“first element”, “second element”, “third_element”] –> “‘first element’,’second element’,third_element”

    str, or
    list for multiple names. This will be reflected on the name of the final .rfl created each.

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
      "status": "completed",
      "code": 0,
      "data": {
          "file_url": [
              "87a9662b-652a-4d32-a4c3-a9f88324a7b5"
          ]
      },
      "desc": "",
      "status_code": 200,
      "progress": "100%"
    }
    

    Create Flow

    Description: Creates a flow in the environment. The environment is identified by the {envId}.

    POST /resource/create/flow/{envId}

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    path

    envId

    The ID of the environment where the flow will be created.
    See Get Resource ID for further details on how to retrieve IDs.

    str

    querystring

    label

    The name of the flow to be created.

    str

    body

    permissionList

    The permissions assigned to the new flow. The parameters to specify are:

    • “name”: the name of the user or the group. If type entry is set to other, this has to be null.

    • “type”: the type of entity to which the permissions are assigned. It can be:
      • “user”

      • “group”

      • “other”

    • “view”: the view permissions of the specified entity. They can be one of these values: “allow”, “deny”, “unspecified” (default value)

    • “modify”: the modify permissions of the specified entity. They can be: “allow”, “deny”, “unspecified” (default value)

    • “create”: the create permissions of the specified entity. They can be: “allow”, “deny”, “unspecified” (default value)

    • “execute”: the execute permissions of the specified entity. They can be: “allow”, “deny”, “unspecified” (default value)

    • “delete”: the delete permissions of the specified entity. They can be: “allow”, “deny”, “unspecified” (default value)

    • “setpermissions”: the setpermissions permissions of the specified entity. They can be: “allow”, “deny”, “unspecified” (default value)

    • “share”: the share permissions of the specified entity. They can be: “allow”, “deny”, “unspecified” (default value)

    list[dict]

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
      "status": "completed",
      "code": 0,
      "data": {
          "id": "de7d15aa-946d-4906-8250-2fb6ab75e2b9",
          "label": "API_Flow"
      },
      "desc": "",
      "status_code": 200,
      "topic": "resource/Create/Flow/c4ff0035-4a1b-4270-9821-66cc8b8cbf9e"
    }
    

    Delete Flow

    Description: Deletes the flow(s), identified with the ID(s) flowIds.

    POST /resource/delete/flow

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    querystring

    flowIds

    The id(s) or path(s) of the flow(s) to delete. See Get Resource ID for further details on how to retrieve IDs.
    Lists must be transformed into a string,
    by joining the separate elements with commas “,”, and wrapping any spaces with quotes.
    For example: [“a”, “b”, “c”] –> “a,b,c”;
    [“first element”, “second element”, “third_element”] –> “‘first element’,’second element’,third_element”

    str, or
    list for multiple flows

    querystring

    withprogress

    If true, progress information will be calculated.

    bool

    querystring

    openid

    The id of the open flow, if present.

    str

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
      "status": "completed",
      "code": 0,
      "data": {},
      "desc": "",
      "status_code": 200,
      "progress": "100%"
    }
    

    Rename Flow

    Description: Renames the flow identified with the ID {rflId}.

    POST /resource/rename/flow/{rflId}

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    path

    rflId

    The ID of the flow to be renamed. See Get Resource ID for further details on how to retrieve IDs.

    str

    querystring

    newlabel

    The new name for the resource.

    str

    body

    isSelected

    If true, the renamed flow will be the one in use.

    bool

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
      "status": "completed",
      "code": 0,
      "data": {},
      "desc": "",
      "status_code": 200,
      "topic": "resource/Rename/Database/82620cac-4bdf-4f1d-af9a-cf38a83c684a"
    }
    

    List Flow

    Description: Lists the flows in the parent environment identified with the ID {envId}.

    GET /resource/list/flow/{envId}

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    path

    envId

    The ID of the environment from which you want to retrieve the list of flows. See Get Resource ID for further details on how to retrieve IDs.

    str

    body

    sorttype

    The type of sorting. The possible values are: alphabetical, by resource type, by creation date, by modification date.

    str

    body

    sortascending

    If True, the data is sorted in ascending order.

    bool

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
      "status": "completed",
      "code": 0,
      "data": {
          "resources": {
              "82620cac-4bdf-4f1d-af9a-cf38a83c684a": {
                  "type": "flow",
                  "name": "API_Flow",
                  "isversioned": false,
                  "islocked": false,
                  "isversioneddirty": false
              },
              "7c586303-0866-43be-8289-75ce624df356": {
                  "type": "flow",
                  "name": "apiAdult",
                  "isversioned": false,
                  "islocked": false,
                  "isversioneddirty": false
              }
          },
          "n_resources": 2,
          "folder": {
              "id": "d4c60ad0-1a2b-4d29-875f-c56108e1ecd7",
              "name": "Env_cm"
          },
          "path": {
              "id": [
                  "c8ca121e-91ef-4ad3-8df2-735d5cd08049",
                  "60587735-cc2d-4325-ac4e-38c544f966e3"
              ],
              "name": [
                  "/",
                  "rulex"
              ]
          },
          "create": true
      },
      "desc": "",
      "status_code": 200,
      "topic": "resource/List/Flow/d4c60ad0-1a2b-4d29-875f-c56108e1ecd7"
    }
    

    Copy Flow

    Description: Copies a flow to a different environment indicated by {{destenv_Id}}.

    POST /resource/copy/flow

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    querystring

    id

    The list of ids of the flow to be copied.

    list

    querystring

    label

    The list of names of the flow affected by the modification occurred.

    list

    querystring

    destenv_id

    The id of the destination environment.

    str

    querystring

    cut

    If yes, the original resource will be erased at the end of the transition.

    str

    body

    permissionList

    The permissions assigned to the new flow. The parameters to specify are:

    • “name”: the name of the user or the group. If type entry is set to other, this has to be null.

    • “type”: the type of entity to which the permissions are assigned. It can be:
      • “user”

      • “group”

      • “other”

    • “view”: the view permissions of the specified entity. They can be one of these values: “allow”, “deny”, “unspecified” (default value)

    • “modify”: the modify permissions of the specified entity. They can be: “allow”, “deny”, “unspecified” (default value)

    • “create”: the create permissions of the specified entity. They can be: “allow”, “deny”, “unspecified” (default value)

    • “execute”: the execute permissions of the specified entity. They can be: “allow”, “deny”, “unspecified” (default value)

    • “delete”: the delete permissions of the specified entity. They can be: “allow”, “deny”, “unspecified” (default value)

    • “setpermissions”: the setpermissions permissions of the specified entity. They can be: “allow”, “deny”, “unspecified” (default value)

    • “share”: the share permissions of the specified entity. They can be: “allow”, “deny”, “unspecified” (default value)

    list[dict]

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
      "status": "completed",
      "code": 0,
      "data": {},
      "desc": "",
      "status_code": 200,
      "progress": "100%"
    }
    

    Create Task

    Description: Creates a task inside a flow referenced by its flowID.

    POST /session/create/task/{flowId}

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    path

    flowId

    The ID of the flow to be modified. See Get Resource ID for further details on how to retrieve IDs.

    str

    querystring

    name

    The name of the added task.

    str

    querystring

    category

    The category of the task. See this section for further details.

    str

    body

    position

    The coordinates (x,y,z) of the newly created task. It is a dictionary with keys ‘x’, ‘y’, ‘z’ and float values.

    dict

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
        "status": "completed",
        "code": 0,
        "data": "cd42059a-fa27-4115-9613-6ce0d244804f",
        "desc": "",
        "status_code": 200,
        "topic": "session/Create/Task/2baa9aaa-30a1-4e27-a542-e751652a264f"
    }
    

    Delete Code

    Description: Deletes the rows in an existing history of a manager task in a flow identified with the ID {flowId}.

    POST /session/delete/code/{flowId}

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    path

    flowId

    The ID of the flow which contains the task to be updated. See Get Resource ID for further details on how to retrieve IDs.

    str

    querystring

    task

    The name of the task to be updated.

    str.

    body

    indexes

    The indexes of the history rows to be deleted.

    list.

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
      "status": "completed",
      "code": 0,
      "data": [],
      "desc": "",
      "status_code": 200,
      "topic": "session/Delete/Code/4c0e6962-8e35-4060-bbc1-aa1ee5b42846"
    }
    

    Reset Code

    Description: Resets the status of a whole history of a manager task in a flow identified with the ID {flowId}.

    POST /session/reset/code/{flowId}

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    path

    flowId

    The ID of the flow which contains the task to be updated. See Get Resource ID for further details on how to retrieve IDs.

    str

    querystring

    task

    The name of the task to be updated.

    str.

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
      "status": "completed",
      "code": 0,
      "data": [],
      "desc": "",
      "status_code": 200,
      "topic": "session/Delete/Code/4c0e6962-8e35-4060-bbc1-aa1ee5b42846"
    }
    

    Get Code

    Description: Gets the history of a manager task in a flow identified with the ID {flowId}.

    GET /session/get/code/{flowId}

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    path

    flowId

    The ID of the flow which contains the history to be retrieved. See Get Resource ID for further details on how to retrieve IDs.

    str

    querystring

    task

    The name of the task from which the history has to be retrieved.

    str.

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
      "status": "completed",
      "code": 0,
      "data": [
          {
              "id": 1,
              "operation": "ADD ATTRIBUTES",
              "code": "//DATASET OPERATION\n//ADD ATTRIBUTES\nt.dataset.addAttribute([\"Var_1\"], [\"nominal\"], [\"input\"], True, False)",
              "scope": null,
              "environment": "dataset",
              "status": 2,
              "desc": "Add attribute/s <i>Var_1</i>"
          },
          {
              "id": 2,
              "operation": "FORMULA",
              "code": "//DATASET OPERATION\n//FORMULA\n$\"Var_1\" = \"mamma\"\n//DATASET OPERATION\n//EDIT ATTRIBUTES\nt.dataset.changeAttribute(\"Var_1\", \"formula\", \"\\\"mamma\\\"\")",
              "scope": null,
              "environment": "dataset",
              "status": 2,
              "desc": "Assign to attribute <i>Var_1</i> result of formula <i>&quot;mamma&quot;</i>"
          },
          {
              "id": 3,
              "operation": "FORMULA",
              "code": "//DATASET OPERATION\n//FORMULA\n$\"average_cost\" = enum()\n//DATASET OPERATION\n//EDIT ATTRIBUTES\nt.dataset.changeAttribute(\"average_cost\", \"formula\", \"enum()\")",
              "scope": null,
              "environment": "dataset",
              "status": 2,
              "desc": "Assign to attribute <i>average_cost</i> result of formula <i>enum()</i>"
          }
      ],
      "desc": "",
      "status_code": 200,
      "topic": "session/Get/Code/4c0e6962-8e35-4060-bbc1-aa1ee5b42846"
    }
    

    List Option

    Description: Lists all the modified options in a task belonging to a flow identified with the ID {flowId}.

    GET /session/list/option/{flowId}

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    path

    flowId

    The ID of the flow which contains the task to be listed. See Get Resource ID for further details on how to retrieve IDs.

    str

    querystring

    task

    The name of the task whose options need to be listed.

    str.

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
      "status": "completed",
      "code": 0,
      "data": {
          "addfilename": true,
          "byname": "name",
          "casesens": false,
          "cattype": "outer",
          "checkfile": false,
          "continue": false,
          "decsep": ".",
          "delemptycols": false,
          "delemptyrows": false,
          "filecoding": "ascii",
          "firstline": 1,
          "indcol": null,
          "lastline": 0,
          "missingstr": null,
          "nameline": 1,
          "nosmarttype": false,
          "nrecord": 1000,
          "onlyonespace": true,
          "quotech": null,
          "sleeptime": 1.0,
          "stripspaces": true,
          "thousep": null,
          "twoasone": false,
          "useolddata": true,
          "asauth": "sharedkey",
          "aspwd": null,
          "asproxy": null,
          "asurl": null,
          "ftpport": null,
          "ftppwd": null,
          "ftpproxy": null,
          "ftpurl": null,
          "ftpusr": null,
          "gdurl": null,
          "gdusr": null,
          "gdpwd": null,
          "gdconnstring": null,
          "gdproxy": null,
          "hdfsport": null,
          "hdfspwd": null,
          "hdfsproxy": null,
          "hdfsurl": null,
          "hdfsusr": null,
          "httpauth": "basic",
          "httpgranttype": "ccba",
          "httpscope": null,
          "httpresource": null,
          "httppwd": null,
          "httpproxy": null,
          "httpauthurl": null,
          "httpusr": null,
          "httpheaders": null,
          "httpmethod": null,
          "olauth": "refreshtoken",
          "olscope": null,
          "olshare": null,
          "olstartdate": null,
          "olenddate": null,
          "olproxy": null,
          "olpwd": null,
          "oldomain": null,
          "olconnstring": null,
          "olpath": null,
          "olauthurl": null,
          "olurl": null,
          "olusr": null,
          "s3auth": "standard",
          "s3bucket": null,
          "s3connstring": null,
          "s3domain": null,
          "s3path": null,
          "s3granttype": "AES256",
          "s3pwd": null,
          "s3proxy": null,
          "s3usr": null,
          "sddomain": null,
          "sdport": 445,
          "sdpwd": null,
          "sdproxy": null,
          "sdshare": null,
          "sdurl": null,
          "sdusr": null,
          "sftpport": null,
          "sftppwd": null,
          "sftpproxy": null,
          "sftpurl": null,
          "sftpusr": null,
          "spauth": "direct",
          "sppwd": null,
          "spproxy": null,
          "sptenant": null,
          "spurl": null,
          "spusr": null,
          "uri": "local",
          "delim": "\t",
          "filelist": [
              "C:/Users/SaraSanguineti/Software/platform/src/ms/rulexserver/data/localfiles/e26311de-c53b-48bf-80f0-b616afa41159/978007d5-371b-4685-866a-7802e620c797/Adult.csv"
          ],
          "typeline": 2
      },
      "desc": "",
      "status_code": 200,
      "topic": "session/List/Option/e26311de-c53b-48bf-80f0-b616afa41159"
    }
    

    List Task

    Description: Gets the list of tasks present in a flow identified with the ID {flowId}.

    GET /session/list/task/{flowId}

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    path

    flowId

    The ID of the flow. See Get Resource ID for further details on how to retrieve IDs.

    str

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
      "status": "completed",
      "code": 0,
      "data": {
          "dataman": "datamanager",
          "adult_new": "sourcetextfile",
          "adultdata": "datamanager",
          "child": "datamanager"
      },
      "desc": "",
      "status_code": 200,
      "topic": "session/List/Task/4c0e6962-8e35-4060-bbc1-aa1ee5b42846"
    }
    

    Set Code

    Description: Updates an existing history of a manager task in a flow identified with the ID {flowId}.

    POST /session/set/code/{flowId}

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    path

    flowId

    The ID of the flow which contains the task to be updated. See Get Resource ID for further details on how to retrieve IDs.

    str

    querystring

    task

    The name of the task to be updated.

    str.

    body

    option

    The name of the task options to be updated. You can use the task context help

    list.

    body

    code

    The actual code of the options to be updates in the task.

    list.

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
      "status": "completed",
      "code": 0,
      "data": {},
      "desc": "",
      "status_code": 200,
      "topic": "session/Set/Option/4c0e6962-8e35-4060-bbc1-aa1ee5b42846"
     }
    

    Set Option

    Description: Sets an option within a task, identified with the {task}, within a flow identified with the ID {flowID}.

    POST /session/Set/Option/{{rflId}}

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    querystring

    task

    The name of the task whose options will be set.

    str

    body

    option

    The name of the option which will be affected by the change.

    list

    body

    code

    The value which will be inserted in the corresponding option.

    list

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
      "status": "completed",
      "code": 0,
      "data": {},
      "desc": "",
      "status_code": 200,
      "topic": "session/Set/Option/e26311de-c53b-48bf-80f0-b616afa41159"
    

    Insert Code

    Description: Inserts some new rows at a target position of an existing history of a manager task in a flow identified with the ID {flowId}.

    POST /session/insert/code/{flowId}

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    path

    flowId

    The ID of the flow which contains the task to be updated. See Get Resource ID for more details on how to retrieve IDs.

    str

    querystring

    task

    The name of the task to be updated.

    str.

    body

    code

    The actual code of the rows to be added to the task history.

    list.

    querystring

    target

    The target index position for the insertion. If it is not provided, the top or the bottom of the whole list according to the before flag is considered.

    str.

    querystring

    before

    A flag to control if the new rows should be inserted before or after the target position.

    str.

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
      "status": "completed",
      "code": 0,
      "data": [
          {
              "id": 1,
              "operation": "ADD ATTRIBUTES",
              "code": "//DATASET OPERATION\n//ADD ATTRIBUTES\nt.dataset.addAttribute([\"Var_1\"], [\"nominal\"], [\"input\"], True, False)",
              "scope": null,
              "environment": "dataset",
              "status": 2,
              "desc": "Add attribute/s <i>Var_1</i>"
          },
          {
              "id": 2,
              "operation": "FORMULA",
              "code": "//DATASET OPERATION\n//FORMULA\n$\"Var_1\" = \"mamma\"\n//DATASET OPERATION\n//EDIT ATTRIBUTES\nt.dataset.changeAttribute(\"Var_1\", \"formula\", \"\\\"mamma\\\"\")",
              "scope": null,
              "environment": "dataset",
              "status": 2,
              "desc": "Assign to attribute <i>Var_1</i> result of formula <i>&quot;mamma&quot;</i>"
          },
          {
              "id": 3,
              "operation": "FORMULA",
              "code": "//DATASET OPERATION\n//FORMULA\n$\"average_cost\" = enum()\n//DATASET OPERATION\n//EDIT ATTRIBUTES\nt.dataset.changeAttribute(\"average_cost\", \"formula\", \"enum()\")",
              "scope": null,
              "environment": "dataset",
              "status": 2,
              "desc": "Assign to attribute <i>average_cost</i> result of formula <i>enum()</i>"
          }
      ],
      "desc": "",
      "status_code": 200,
      "topic": "session/Insert/Code/4c0e6962-8e35-4060-bbc1-aa1ee5b42846"
    }
    

    Delete Task

    Description: Deletes a task inside a flow referenced by its flowID.

    POST /session/delete/task/{flowId}

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    path

    flowId

    The ID of the flow to be modified. See Get Resource ID for more details on how to retrieve IDs.

    str

    querystring

    task

    The name of the task to be deleted.

    str

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
      "status": "completed",
      "code": 0,
      "data": {},
      "desc": "",
      "status_code": 200,
      "topic": "session/Delete/Task/4c0e6962-8e35-4060-bbc1-aa1ee5b42846"
      }
    

    Rename Task

    Description: Renames a task inside a flow referenced by its flowID.

    POST /session/rename/task/{flowId}

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    path

    flowId

    The ID of the flow to be modified. See Get Resource ID for more details on how to retrieve IDs.

    str

    querystring

    oldname

    The original name of the task.

    str

    querystring

    newname

    The new name of the task.

    str

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
      "status": "completed",
      "code": 0,
      "data": {},
      "desc": "",
      "status_code": 200,
      "topic": "session/Rename/Task/4c0e6962-8e35-4060-bbc1-aa1ee5b42846"
    }
    

    Create Task Linked

    Description: Creates a task inside a flow referenced by its flowID automatically connected to a provided list of parent tasks.

    POST /session/create/tasklinked/{flowId}

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    path

    flowId

    The ID of the flow to be modified. See Get Resource ID for more details on how to retrieve IDs.

    str

    querystring

    name

    The name of the added task.

    str

    querystring

    category

    The category of the task. See this section for more details.

    str

    body

    position

    The coordinates (x,y,z) of the newly created task. It is a dictionary with keys ‘x’, ‘y’, ‘z’ and float values.

    dict

    body

    parents

    The list of task which are going to be connected to the newly created task.

    list

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
        "status": "completed",
        "code": 0,
        "data": {
            "topology": {
                "parents": {
                    "child": [
                        "adultdata"
                    ]
                },
                "children": {
                    "child": []
                }
            },
            "tasks": {
                "child": {
                    "category": "datamanager",
                    "id": "d7404fda-8b58-4e71-995b-5f9329231d93",
                    "status": 2,
                    "progress": 0,
                    "priority": 0,
                    "loc": "100 100",
                    "zOrder": "1"
                }
            },
            "graphics": null,
            "events": {}
        },
        "desc": "",
        "status_code": 200,
        "topic": "session/Create/TaskLinked/4c0e6962-8e35-4060-bbc1-aa1ee5b42846"
    }
    


    Delete Multi Objects

    Description: Deletes a set of objects (tasks, links or widgets) from a flow stage referenced by its flowID.

    POST /session/delete/multiobjects/{flowId}

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    path

    flowId

    The ID of the flow to be modified. See Get Resource ID for more details on how to retrieve IDs.

    str

    body

    link

    A dictionary containing the keys parent and child pointing to a list value formed by the sequence of task name which are parent and child respectively of the links to be erased.

    dict

    body

    task

    A dictionary with a unique key task pointing to a list value formed by the sequence of task names to be erased.

    dict

    body

    graphics

    A dictionary containing the updated graphics of the flow.

    dict

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
      "status": "completed",
      "code": 0,
      "data": {},
      "desc": "",
      "status_code": 200,
      "progress": "100%"
    }
    

    Reset Flow

    Description: Resets all the tasks belonging to a flow identified with the ID {flowId}.

    GET /session/reset/flow/{flowId}

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    path

    flowId

    The ID of the flow containing the task to be updated. See Get Resource ID for more details on how to retrieve IDs.

    str

    querystring

    mode

    The reset mode which could be:
    • soft: only the status will be restored to ready, even if data structures of a previous computation are not erased.

    • hard: status is restored to ready, and all the internal structures are erased.

    str.

    body

    taskList

    The list of tasks to be reset

    list.

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
      "status": "completed",
      "code": 0,
      "data": {},
      "desc": "",
      "status_code": 200,
      "topic": "session/Reset/Flow/543a4e15-cedb-47b3-8c75-ea884e1a5ae8"
    }
    

    Execute Event

    Warning

    This API request refers to Rulex Factory Events, explained here.

    If you are looking for the API request referring to Rulex Studio Events, browse to the link here.

    Description: Executes an event stored in a specific flow identified by flowId.

    POST /session/execute/event

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    querystring

    flowId

    The id or path of the flow which contains the event to be executed. To know more about the flow paths in Rulex Factory, click here.

    str

    querystring

    eventName

    The name of the event to be executed.

    str

    querystring

    failurePolicy

    The failure policy for the execution of the event. Can be stopmacro, to stop the execution at the first encountered error, or continue, to show all errors at the end of the execution.

    str

    body

    license

    The license to be passed to the Rulex API.

    dict

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
        "status": "completed",
        "code": 0,
        "data": [
            {
                "status_code": 200,
                "response_timestamp": "2025-05-12T07:48:34.539543Z",
                "request_id": "6c64d023-ad64-498d-b520-2f0905b24df5",
                "elapsed_seconds": 1.967684,
                "content-type": "application/json",
                "body": {
                    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJyYXV0aCIsImF1ZCI6InJ1bGV4U2VydmVyIiwic3ViIjoic2FyYXNhbl9yZXN0YXBpIiwiZXhwIjoxNzQ3MDM5NTAyLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJzYXJhc2FuX3Jlc3RhcGkiLCJwcm9kdWN0a2V5IjoiTjNOV1otVjQ2U0ItSExaUFktWUlCNUMtSU5ZNkktICAiLCJhdHRyaWJ1dGVzIjp7IlByb2R1Y3RLZXkiOiJOM05XWi1WNDZTQi1ITFpQWS1ZSUI1Qy1JTlk2SS0gICJ9LCJzZXJ2aWNlX2dyb3VwcyI6WyJBbGwgVXNlcnMiXSwicm9sZXMiOltdfQ.lj36hJKEcjIzEagOd0Z4hi6nebWR_vw1GODzblV4EZbeIdN5ztCRggffnBRhX7NyJ8aV0DR9mBn71KMkCmuailE60l4jTT9vm_UEn_abYzaLvlGX9ZjQtQFmUhSF-Xh3l2B9lQSGB9x0NGn8cfoLkCAE3rlHEtChqpnDZnKxy0g",
                    "refreshToken": "fakeRESTAPIRefreshToken",
                    "code": 0,
                    "data": "f3bec975-9365-45ab-9ad4-ffdb38678788",
                    "desc": ""
                }
            },
            {
                "status_code": 200,
                "response_timestamp": "2025-05-12T07:48:37.621474Z",
                "request_id": "6c64d023-ad64-498d-b520-2f0905b24df5",
                "elapsed_seconds": 1.995112,
                "content-type": "application/json",
                "body": {
                    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJyYXV0aCIsImF1ZCI6InJ1bGV4U2VydmVyIiwic3ViIjoic2FyYXNhbl9yZXN0YXBpIiwiZXhwIjoxNzQ3MDM5NTAyLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJzYXJhc2FuX3Jlc3RhcGkiLCJwcm9kdWN0a2V5IjoiTjNOV1otVjQ2U0ItSExaUFktWUlCNUMtSU5ZNkktICAiLCJhdHRyaWJ1dGVzIjp7IlByb2R1Y3RLZXkiOiJOM05XWi1WNDZTQi1ITFpQWS1ZSUI1Qy1JTlk2SS0gICJ9LCJzZXJ2aWNlX2dyb3VwcyI6WyJBbGwgVXNlcnMiXSwicm9sZXMiOltdfQ.lj36hJKEcjIzEagOd0Z4hi6nebWR_vw1GODzblV4EZbeIdN5ztCRggffnBRhX7NyJ8aV0DR9mBn71KMkCmuailE60l4jTT9vm_UEn_abYzaLvlGX9ZjQtQFmUhSF-Xh3l2B9lQSGB9x0NGn8cfoLkCAE3rlHEtChqpnDZnKxy0g",
                    "refreshToken": "fakeRESTAPIRefreshToken",
                    "code": 0,
                    "data": {
                        "textfile1": 5,
                        "dataman1": 2
                    },
                    "desc": ""
                }
            }
        ],
        "desc": "",
        "status_code": 200,
        "progress": "100%"
    }
    

    Stop Event

    Description: Stops the execution of a running event contained in a flow identified with the ID {rflId}.

    POST /session/Stop/Event/{rflId}

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    path

    flowId

    The ID of the flow which contains the running event. See Get Resource ID for more details on how to retrieve IDs.

    str

    querystring

    eventName

    The name of the event to be stopped.

    str

    body

    license

    The license to be passed to the Rulex API.

    dict

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
        "status": "completed",
        "code": 0,
        "data": {},
        "desc": "",
        "status_code": 200,
        "topic": "session/Stop/Event/e26311de-c53b-48bf-80f0-b616afa41159"
    }
    

    Compute Flow

    Description: Computes a flow, which is identified with the {rflId}.

    POST /compute/compute/flow/{rflId}

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    path

    rflId

    The ID of the flow. See Get Resource ID for more details on how to retrieve IDs.

    str

    querystring

    mode

    The computation mode, which can be:
    • “flow”, to compute the whole flow;

    • “upto”, to compute upstream of the selected tasks;

    • “onwards”, to compute downstream the selected tasks;

    • “selected” to compute only the selected tasks.

    str

    querystring

    ismodule

    Flag to determine if the flow is a module.

    bool

    querystring

    onetime

    Performs a one-time computation starting from a .rfl file or a flow version on a repository. It can be true or false (default).

    The imported file is automatically disambiguated from the other flows on the working area to permit infinite parallel computations of the same flow.

    The flow at the end can be deleted according to an ad-hoc compute params entry.

    bool

    body

    taskList

    The list of the tasks to be computed.

    str, or list for multiple tasks.

    body

    compute_params

    The computation parameters for the chosen flow, which can be:
    • “inmemory”: in which case:
      • 0 for a standard full computation (default)

      • 1 for a complete in memory computation

      • 2 for an in memory source saving computation

    • “procvar”: it contains a key/value dict with the list of flow variables to be overwritten for the current run. The values passed are not persistent.

    • “nparallel”: the maximum number of task which can be computed at the same time.

    • “failpolicy”: the policy to use if the computation fails; it can be “stopprocess”, “stopneighbours”, “continue”.

    • “prioritypolicy”: the policy to use to calculate the priorities; it can be “parentfirst” or “priorityfirst”.

    • “failpolicymacro”: the policy to use if the macro fails; it can be “continue”, “stopmacro”.

    • “floatprec”: the digit precision for real number operations.

    • “cache_vault_var”: if true, the vault variables’ values are cached.

    • “suppress_alert”: if true, alerts are not used in computation.

    • “deleteFlow”: in which case:
      • 0 is the default flow is not cancelled at the end of the computation

      • 1 flow is cancelled only in case of successful run

      • 2 flow is cancelled in any case

    • “inputdata”: a dictionary containing as key the name of the tasks we want to data fill, and as value the actual dataset for the task expressed in json format. The computation of the selected task is going to be skipped, and the data imported from the provided json is going to be considered as the output dataset of the task.

    • “outputdata”: a list of task names. The dataset of the tasks inserted in this list is going to be exported as json and attached to the final response.

    dict

    body

    import_params

    The import information used in case of one-time computation (ignored in all other cases). Dictionary composed by:

    • “flowPath”: the internal path on the working area of Rulex Platform where to import the flow. Suffix is automatically added to prevent name conflicts between parallel computations. The path is intended as environment path and base flow name. Click here to know more about the flow path.

    • “params”: A dictionary describing the parameters of the import. Possible entries are:

      • path” the path to the .rfl file used in the import (considered only in ‘__filesystem__’ or ‘__local__’ origins)

      • components” used to select which components of the flow are considered. A dictionary with the following entries:

        • topology: if true, the topology will be imported.

        • data: if true, the data will be imported.

        • doc: if true, the documentation will be imported.

        • graphics: if true, graphics will be imported.

        • events: if true, events will be imported.

        • modules: if true, modules will be imported.

        • var: if true, variables will be imported.

      • source” a dictionary formed by the internal information of the source used (considered only in ‘__filesystem__’ case):

        • uri: the path of the Filesystem resource stored in the Rulex Platform working area.

    dict

    body

    license

    The license to be passed to the Rulex API.

    dict

    Note

    The syntax for the procvar parameter is the GOLD syntax, with specific rules whether the variable is ordinal or a string:

    • For all the variables: the @ symbol is not required before them, the variable is written in .json format.

    • For ordinal variables: numbers must be included into ". e.g. {"var1":"2"}

    • For nominal variables: the string must be included into “, and it must be further included in ". e.g. {"var2":"\"string\""}

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

      {
      "status": "warning",
      "code": -10500,
      "data": {
          "res": 1,
          "errstr": "The following tasks have finished the computation with warnings:\ntextfile1 : The file <path> can not be located., most recent computation data have been used.",
          "outputdata": "{\"uut\":{\"age\":[39,50,38,53,28,37,...],...}}",
          "uncomputable": null,
          "computechild": []
      },
      "desc": "Warning in operation compute.Computation: The following tasks have finished the computation with warnings:\ntextfile1 :  The file <path> can not be located., most recent computation data have been used.",
      "status_code": 230,
      "progress": "100%",
      "tasks": [
          {
              "name": "app1",
              "status": "computed",
              "progress": "100%"
          },
          {
              "name": "llm1",
              "status": "computed",
              "progress": "100%"
          },
          {
              "name": "split1",
              "status": "computed",
              "progress": "100%"
          },
          {
              "name": "textfile1",
              "status": "warning",
              "progress": "100%"
          },
          {
              "name": "uut",
              "status": "computed",
              "progress": "100%"
          }
      ]
    }
    

    Stop Computation

    Description: Ends the computation of the flow through the operation ID, identified with the {X-Rulex-Request-Id}.

    POST /compute/stop/computation/{X-Rulex-Request-Id}

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    path

    X-Rulex-Request-Id

    The ID of the computation request. See API Response Structure for more details on the response structure and on how to retrieve the X-Rulex-Request-Id.

    str

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
      "status": "completed"
      "code": 0
      "data": {}
      "desc": ""
      "status_code": 200
      "topic": "compute/Stop/Computation/543a4e15-cedb-47b3-8c75-ea884e1a5ae8"
    }
    

    Set Stop Computation

    Warning

    This API request is deprecated and reatained solely for backward compatibility reasons.

    We recommend using the Stop Computation API call instead.

    Description: Sets the end of the computation of the flow through the operation ID, identified with the {X-Rulex-Request-Id}.

    POST /compute/set/stopcomputation/{X-Rulex-Request-Id}

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    path

    X-Rulex-Request-Id

    The ID of the computation request. See API Response Structure for more details on the response structure and on how to retrieve the X-Rulex-Request-Id.

    str

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
        "status": "completed",
        "code": 0,
        "data": {},
        "desc": "",
        "status_code": 200,
        "topic": "compute/Set/StopComputation/e26311de-c53b-48bf-80f0-b616afa41159"
    }
    

    Get Flow Review Tool

    Description: Applies the Flow Review Tool to the given flows identified by the {flowIdlist}.

    POST /session/Get/FlowReviewTool

    Parameters

    Parameters in bold are mandatory.

    Location

    Name

    Description

    Type

    body

    flowIdlist

    List of ids of the flows to which the Flow Review Tool will be applied.

    str

    body

    settings

    Settings regarding the Flow Review Tool input file and output file. The following parameters must be set for two dictionaries, import and export.

    For the import dictionary, the following parameters must be set:

    • origin: the type of the origin where the configuration file is stored. The possible values are __filesystem__, __repo__.

    • type: the type of the origin.

    • filepath: the path of the flow review tool configuration file.

    For the export dictionary, the following parameters must be set:

    • origin: the type of origin where the output file will be stored. The possible values are __filesystem__, repo.

    • type: the type of the origin.

    • outfolder: the path of the folder where the output file will be stored.

    • outname: the name of the output file.

    dict

    querystring

    saveopt

    Flag to cache settings for GUI.

    bool

    Response

    The response schema for this specific request follows standard exposed in api response section. An example response is:

    {
    }