Skip to content

MngGetWorkflowRunsByFilter

Returns workflow run logs with filters and pagination.

Access

Manager sessions: SESSION_MANAGER, SESSION_ADMIN, SESSION_DEALER, SESSION_CRM_MANAGER, SESSION_CRM_ADMIN.

Request Parameters

Name Type Required Description
rule_id int No Workflow rule id
brand string No Brand namespace
trigger string No Trigger code
status int No -1 or omitted means all statuses
scope int No 0 CRM, 1 BO, 2 both/all
limit int No Default 100, max 1000
offset int No Default 0

Scope filtering:

0 = CRM, returns CRM + BOTH run logs
1 = BO, returns BO + BOTH run logs
2 = BOTH, returns all run logs

If scope is omitted, backend infers it from __access.type:

SESSION_CRM_MANAGER / SESSION_CRM_ADMIN -> CRM
SESSION_MANAGER / SESSION_DEALER        -> BO
SESSION_ADMIN                           -> BOTH

Backend matches run scope by linked workflow_rules.scope. If the rule was deleted, backend falls back to trigger definition scope. For non-admin BO/CRM sessions backend always enforces session scope, even if client sends scope = 2.

Request

{
  "command": "MngGetWorkflowRunsByFilter",
  "extID": "1",
  "data": {
    "rule_id": 10,
    "brand": "brand-a",
    "trigger": "deposit.created",
    "status": -1,
    "scope": 0,
    "limit": 100,
    "offset": 0
  }
}

Response Data

{
  "rows": [
    {
      "id": 1,
      "rule_id": 10,
      "brand": "brand-a",
      "trigger": "deposit.created",
      "entity_type": "trade",
      "entity_id": 123456,
      "status": 2,
      "input": {},
      "result": {},
      "error": "",
      "created_time": 1778160000,
      "finished_time": 1778160001
    }
  ],
  "count": 1
}