# Process Operation Log

## Process instance flow log
Interface Request Invoking Description <br>
HTTP Request Method: POST <br>
Request Address: http://127.0.0.1:8080/demo/horizon/workflow/rest/flow/log/page${suffix} <br>
**Post Data Description：**
```
{
  "accessToken": "",
  "page": "1",
  "limit": "10",
  "sort": "flowName",
  "search": "",
  "type": ""
}
```
Request Parameter Description:

| Parameter   | Required | Description                                                                                                                                         |
|-------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
| accessToken | Yes      | Call interface credentials, unique user ID                                                                                                          |
| page        | No       | Page number, if left blank, all data will be displayed                                                                                              |
| limit       | No       | The number of data items displayed per page, if left blank, 10 items will be displayed per page                                                     |
| sort        | No       | Sort, default to positive order. If a minus sign is added before a field, such as sort=- flowName, it will be arranged in reverse order of flowName |
| search      | No       | Query the process title, process name, and node name fields. If it is empty by default, all data will be queried                                    |
| type        | No       | Process type, when type is empty or has no value, the query is for unclassified process instance flow records                                       |
**Example of returned results：**
```
{
  "code": 0,
  "data": [
    {
      "action": "autofirst",
      "actionName": "Startflow",
      "actionTime": "2020-06-16 10:01:49",
      "doTime": "0 Days 0 Hours 0 MInutes",
      "doTimeMin": "0",
      "flowId": "www",
      "flowName": "Newflowwww",
      "id": "HZ28811c72badc560172badc73ae0008",
      "isOver": "0",
      "limitTime": "",
      "nextNodeIds": "Node1;",
      "nodeId": "Start",
      "nodeName": "Start",
      "sxcomments": "",
      "title": "Newflowwww",
      "trackId": "HZ28811c72badc560172badc725a0006",
      "type": "",
      "userId": "admin",
      "userName": "Admin",
      "workId": "HZ28811c72badc560172badc72580005"
    }
  ],
  "message": "",
  "recordsTotal": "9",
  "success": true
}
```
**Result parameter description:**

| Parameter   | Type   | Description                                          |
|-------------|--------|------------------------------------------------------|
| action      | String | Operation identification                             |
| actionName  | String | Operation                                            |
| actionTime  | String | Operation time                                       |
| doTime      | String | Duration from receipt to operation                   |
| doTimeMin   | String | Duration (minutes)                                   |
| flowId      | String | Flow ID                                              |
| flowName    | String | FLow name                                            |
| id          | String | Operation record ID                                  |
| isOver      | String | Has the operation exceeded the deadline? 1 Yes, 0 No |
| nodeId      | String | Node id                                              |
| nodeName    | String | Node name                                            |
| limitTime   | String | Node processing deadline                             |
| sxcomments  | String | Approval comments                                    |
| title       | String | Title                                                |
| trackId     | String | Process instance path ID                             |
| type        | String | Flow type                                            |
| nextNodeIds | String | Next node id                                         |
| userId      | String | User ID                                              |
| userName    | String | User Name                                            |
| workId      | String | Process Instance ID                                  |

## Process Definition Update Log
Interface Request Invoking Description <br>
HTTP Request Method: POST <br>
Request Address: http://127.0.0.1:8080/demo/horizon/workflow/rest/flow/def/log/page${suffix} <br>
**Post Data Description：**
```
{
  "accessToken": "",
  "page": "1",
  "limit": "10",
  "sort": "flowName",
  "search": "",
  "type": ""
}
```
Request Parameter Description:

| Parameter   | Required | Description                                                                                                                                         |
|-------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
| accessToken | Yes      | Call interface credentials, unique user ID                                                                                                          |
| page        | No       | Page number, if left blank, all data will be displayed                                                                                              |
| limit       | No       | The number of data items displayed per page, if left blank, 10 items will be displayed per page                                                     |
| sort        | No       | Sort, default to positive order. If a minus sign is added before a field, such as sort=- flowName, it will be arranged in reverse order of flowName |
| search      | No       | Query the process name, operation name, and operator. The default is to query all data when it is empty                                             |
| type        | No       | Process type, when type is empty, the query is for unclassified process instance flow records                                                       |
**Example of returned results：**
```
{
  "code": 0,
  "data": [
    {
      "actionName": "Modify the process and keep the version unchanged",
      "actionTime": "2022-05-11 14:32:06",
      "flowId": "test",
      "flowName": "Newflowtest",
      "id": "HZ28858f80b0f42d0180b1d14f1d0989",
      "type": "Unclassified",
      "userId": "admin",
      "userName": "admin",
      "version": 1,
      "workId": ""
    }
  ],
  "message": "",
  "recordsTotal": "11",
  "success": true
}
```
**Result parameter description:**

| Parameter  | Type   | Description                                                                           |
|------------|--------|---------------------------------------------------------------------------------------|
| actionTime | String | Operation time                                                                        |
| actionName | String | Operation name                                                                        |
| flowId     | String | Flow id                                                                               |
| flowName   | String | Flow name                                                                             |
| id         | String | Operation record ID                                                                   |
| type       | String | Operation type                                                                        |
| userId     | String | Operator user id                                                                      |
| userName   | String | Operator user name                                                                    |
| version    | String | Version                                                                               |
| workId     | String | The process instance ID，it will only be recorded when modifying the instance modeling |

