View Operations

Copy View

Description: Copies a view inside the environment identified by {destenv_id}.

POST /resource/Copy/View/

Parameters

Parameters in bold are mandatory.

Location

Name

Description

Type

querystring

id

The id of the source view.

list

querystring

label

The label of the source view.

list

querystring

destenv_id

The id of the destination environment.

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": {
        "error": [],
        "new": [
            {
                "id": "a0f3d2d7-56e7-47a5-87b5-7c55a70bdb52",
                "label": "new_view_test2"
            }
        ]
    },
    "desc": "",
    "status_code": 200,
    "progress": "100%"
}

Create View

Description: Creates a new view inside the environment identified by {envId}.

POST /resource/create/view/{envId}

Parameters

Parameters in bold are mandatory.

Location

Name

Description

Type

path

envId

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

str

querystring

label

The name of the new view.

str

body

permissionList

The permissions assigned to the new environment. 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

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": "eca9d0f8-21ea-4c7a-8b43-382d1df0f674"
  },
  "desc": "",
  "status_code": 200,
  "topic": "resource/Create/View/c4ff0035-4a1b-4270-9821-66cc8b8cbf9e"
}

Import View

Description: Imports a view inside the environment identified by {envId}.

POST /resource/Import/View/{envId}

Parameters

Parameters in bold are mandatory.

Location

Name

Description

Type

querystring

origin

The origin from which the view will be imported. The possible values are __filesystem__, __local__ and __repo__.

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

label

The name of the newly created view.

str

body

permissionList

The permissions assigned to the new environment. 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

querystring

withprogress

If True, progress information will be calculated.

bool

body

license

The license which will be passed to Rulex Platform 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": {
      "label": "test_view",
      "timestamp": "2024-04-24 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%"
}

Rename View

Description: Renames a view with the ID {viewUui}.

POST /resource/Rename/View/{viewId}

Parameters

Parameters in bold are mandatory.

Location

Name

Description

Type

querystring

newlabel

The new name of the view.

str

body

isSelected

If True, the renamed flow is the flow currently 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/View/34d77b5f-952f-4992-aaaa-3fb0caf55f0d"
}

Delete View

Description: Deletes a view or more views with the IDs {id}.

POST /resource/Delete/View/

Parameters

Parameters in bold are mandatory.

Location

Name

Description

Type

querystring

id

The list of the ids of the views to be deleted.

str

querystring

withprogress

If True, progress information will be calculated.

bool

querystring

openid

The id of the opened view, if present.

str

body

license

The license to be passed to Rulex Platform 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,
    "progress": "100%"
}

Export View

Description: Exports view(s) with the IDs {id}.

POST /resource/Export/View/

Parameters

Parameters in bold are mandatory.

Location

Name

Description

Type

body

id

The list of the ids of the views to be exported.

str

body

params

Parameters regarding the export mode.

dict

body

label

The list of the names of the views to be exported.

str

body

fields

Parameters regarding the export mode.

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 beginning 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

dashList

List of the dashboards that must be exported.

str

querystring

newnames

The new names to be assigned to the exported views.

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": {
      "file_url": []
  },
  "desc": "",
  "status_code": 200,
  "progress": "100%"
}

List View

Description: Lists the view(s) in the parent environment with id {envId}.

POST /resource/List/View/<envId>

Parameters

Parameters in bold are mandatory.

Location

Name

Description

Type

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": {
            "34d77b5f-952f-4992-aaaa-3fb0caf55f0d": {
                "type": "view",
                "name": "test_API_view",
                "isversioned": false,
                "islocked": false,
                "info": {
                    "created_on": "2025-04-23 14:49:04",
                    "created_by": null,
                    "last_modified": "2025-04-23 14:49:04",
                    "last_modified_user": null
                },
                "isversioneddirty": false
            }
        },
        "n_resources": 1,
        "folder": {
            "id": "b121e388-900d-47c5-8612-7612d0f7387e",
            "name": "Env_sarasan"
        },
        "path": {
            "id": [
                "8c4e168f-b110-40fc-991d-c7e8fdcfd2df",
                "26176a7f-acdc-4b47-b721-5fb2aca8ce6b"
            ],
            "name": [
                "/",
                "rulex"
            ]
        },
        "create": true
    },
    "desc": "",
    "status_code": 200,
    "topic": "resource/List/View/b121e388-900d-47c5-8612-7612d0f7387e"
}

Execute Studio Event

Warning

This API request refers to Rulex Studio Events.

Description: Executes an event in Rulex Studio.

POST /studio/Execute/Event/<viewId>/<eventName>

Parameters

Parameters in bold are mandatory.

Location

Name

Description

Type

querystring

viewId

The Id of the view where the event will be executed.

str

querystring

eventName

The name of the event which will be executed.

str

querystring

failurePolicy

The failure policy for the execution of the event. The possible values can be:

  • stopmacro to stop the execution at the first encountered error.

  • continue to show all errors at the end of the execution.

str

body

license

The license which will be passed to Rulex API.

dict

Response

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

{

}