PM4Py-WS Analytics, Cases exploration and Statistics

PM4Py-WS Analytics, Cases exploration and Statistics Services

(GET) /getProcessSchema

If the user is allowed, gets a process schema from a given log

URI parameters:

session => the ID of the session that the user can use to communicate with the server

process => the name of the process that is considered

decoration => required decoration (values: freq for frequency, perf for performance)

typeOfModel => required type of model (values: dfg for the Directly-Follows Graph, tree for process tree, inductive for Inductive Miner Petri net, heuristics for Heuristics Net extraction).

simplicity => value from 0 to 1 that indicate how much the process shall be simplified (the higher is the value, the more the process is simplified).

Returns:

If the session is not valid or the user has not visibility on the log, an empty JSON.

If the session is valid and the user has visibility on the log, a JSON with the following properties:

  • base64: base 64 encoded SVG representation of the process schema, along possibly with the requested decoration.
  • model: for Petri nets, the export of the PNML of the process schema
  • format: for Petri nets, the format of ‘model’ that is pnml
  • handler: the type of the log handler (may be XES or Parquet)
(GET) /getSNA

If the user is allowed, gets a social network analysis representation from a given log

URI parameters:

session => the ID of the session that the user can use to communicate with the server

process => the name of the process that is considered

metric => The considered Social Network Analysis metric (handover, subcontracting, working_together, joint_activities)

threshold => Threshold that cut arcs

Returns:

If the session is not valid or the user has not visibility on the log, an empty HTML file.

If some exception happens in the calculation of the Social Network Analysis (for example, the log has not the resource attribute), then an empty HTML file.

If the session is valid, the user has visibility on the log and the services executes correctly, then a Pyvis HTML visualization of the Social Network in the given metric.

(GET) /transientAnalysis

If the user is allowed, performs a transient analysis on the given log

URI parameters:

session => the ID of the session that the user can use to communicate with the server

process => the name of the process that is considered

delay => the number of days that should be provided for the transient analysis of the CTMC

Returns:

If the session is not valid, or the user has not visibility on the given log, then an empty JSON.

If the session is valid and the user has visibility on the log, then a JSON containing the following properties:

  • base64: contains the base 64 of the SVG of the decorated tangible reachability graph with the result of the CTMC transient analysis starting from the given delay.
(GET) /getCaseDurationGraph

If the user is allowed, gets the case duration graph of the given log

URI parameters:

session => the ID of the session that the user can use to communicate with the server

process => the name of the process that is considered

Returns:

If the session is not valid, or the user has not visibility on the given log, then an empty JSON.

If the session is valid and the user has visibility on the log, then a JSON containing the following properties:

  • base64: contains the base 64 of SVG of the case duration graph of the given process.
(GET) /getEventsPerTimeGraph

If the user is allowed, gets the events per time graph of the given log

URI parameters:

session => the ID of the session that the user can use to communicate with the server

process => the name of the process that is considered

Returns:

If the session is not valid, or the user has not visibility on the given log, then an empty JSON.

If the session is valid and the user has visibility on the log, then a JSON containing the following properties:

  • base64: contains the base 64 of the SVG of the events per time graph of the given process.
(GET) /getStartActivities

If the user is allowed, gets the start activities of a specific log

URI parameters:

session => the ID of the session that the user can use to communicate with the server

process => the name of the process that is considered

Returns:

if the session is not valid, or the user has not visibility on the given log, then an empty JSON.

If the session is valid, and the user has visibility on the log, then a JSON containing the following properties:

  • startActivities: a list of lists containing the start activities of the given log along with their count (e.g. [[“Register”,100], [“Decline”,50]] if Register happens 100 times as start activity and Decline happens 50 times as start activity)
(GET) /getEndActivities

If the user is allowed, gets the end activities of a specific log

URI parameters:

session => the ID of the session that the user can use to communicate with the server

process => the name of the process that is considered

Returns:

if the session is not valid, or the user has not visibility on the given log, then an empty JSON.

If the session is valid, and the user has visibility on the log, then a JSON containing the following properties:

  • endActivities: a list of lists containing the start activities of the given log along with their count  (e.g. [[“Register”,100], [“Decline”,50]] if Register happens 100 times as end activity and Decline happens 50 times as end activity)
(GET) /getAttributesList

If the user is allowed, gets the attributes list from a specific log

URI parameters:

session => the ID of the session that the user can use to communicate with the server

process => the name of the process that is considered

Returns:

if the session is not valid, or the user has not visibility on the given log, then an empty JSON.

If the session is valid, and the user has visibility on the log, then a JSON containing the following properties:

  • attributesList: a list of strings that is the list of attributes of the given log
(GET) /getAttributeValues

If the user is allowed, gets the attribute values of a particular attribute from a specific log

URI parameters:

session => the ID of the session that the user can use to communicate with the server

process => the name of the process that is considered

attribute_key => the attribute (e.g. concept:name for the activity) for which we want to know the values

Returns:

if the session is not valid, or the user has not visibility on the given log, then an empty JSON.

If the session is valid, and the user has visibility on the log, then a JSON containing the following properties:

  • attributeValues: a list of values along with their number of occurrences (e.g. [[“Register”,100], [“Decline”,50]] if Register happens 100 times in the log and Decline happens 50 times in the log) for the specified attribute
(GET) /getAllVariants

If the user is allowed, gets all variants of the given log

URI parameters:

session => the ID of the session that the user can use to communicate with the server

process => the name of the process that is considered

Returns:

if the session is not valid, or the user has not visibility on the given log, then an empty JSON.

If the session is valid, and the user has visibility on the log, then a JSON containing the following properties:

  • variants: the list of variants (along with the number of occurrences) of the given log (e.g. [[“A,B,C”,100], [“A,C”,50], [“A,B”,30]])
(GET) /getAllCases

If the user is allowed, gets all cases of the given log (if specified, belonging to a specific variant)

URI parameters:

session => the ID of the session that the user can use to communicate with the server

process => the name of the process that is considered

variant => if provided, the variant the cases should belong to

Returns:

if the session is not valid, or the user has not visibility on the given log, then an empty JSON.

If the session is valid, and the user has visibility on the log, then a JSON containing the following properties:

cases => list of cases of the log along with

(GET) /getEvents

If the user is allowed, gets the events of a specific case of the given log

URI parameters:

session => the ID of the session that the user can use to communicate with the server

process => the name of the process that is considered

caseID => the case that we are interested to

Returns:

If the session is not valid or the user has not visibility on the event log, then an empty JSON

If the case ID is not in the log, then an empty JSON

If the session id is valid, the user has visibility on the event log, and the case ID is in the log, then a JSON with the following properties:

events: contains the list of events of the case. Each event is expressed as a key-value dictionary

(POST JSON) /getAlignmentsVisualization

If the user is allowed, perform alignments between the log and the model provided in the POST JSON to the service, and returns a Petri net decorated with the deviations and a table of alignments (that is equivalent to the one provided in ProM)

URI parameters:

session => the ID of the session that the user can use to communicate with the server

process => the name of the process that is considered

POST content (JSON): a JSON with the following properties:

model => the PNML string of the Petri net describing the model that the user wants to use for alignment

Returns:

If the session is not valid or the user has not visibility on the event log, then an empty JSON

If the alignments were performed, but an exception was encountered, then an empty JSON.

If the session is valid, the user has visibility on the event log, and the alignments were performed correctly, then a JSON with the following properties:

  • petri: a base64 string of the SVG representation of the Petri net decorated with alignments
  • table: a base64 string of the SVG representation of the alignments table