Opero Docs
API OperoReguły

Lista wykonań reguły

GET
/v1/rules/{id}/executions

Zwraca historię wykonań reguły organizacji.

Autoryzacja

api-token
AutoryzacjaBearer <token>

Token Opero API. Przekaż go jako Authorization: Bearer ek_...

In: header

Parametry ścieżki

id*tekst

Parametry zapytania

page?liczba

Numer strony (liczony od 1)

limit?liczba

Liczba elementów na stronie. Maksymalnie 100.

count?tekst

Strategia liczenia. exact zachowuje obecne dokładne liczenie wyników, none pomija liczenie, a hasMore pozwala zwrócić informację, czy istnieje kolejna strona, gdy endpoint to obsługuje.

filters?tekst

Drzewo filtrów zakodowane jako JSON. Przykład: {"op":"AND","items":[{"field":"status","operator":"eq","value":"ACTIVE"}]}

sort?tekst

Uporządkowana lista reguł sortowania zakodowana jako JSON. Dla pojedynczego pola opartego na słowniku można ustawić dictionaryMetadataKey na klucz metadanych udostępniany przez to pole, aby sortować według niego zamiast według zapisanego klucza wpisu.

columns?tekst

Uporządkowana lista wymaganych kolumn zakodowana jako JSON. W v1 jest to walidowany kontrakt prezentacji danych.

Treść odpowiedzi

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/rules/string/executions"
{  "data": [    {      "id": "string",      "executedAt": "2019-08-24T14:15:22Z",      "eventType": "string",      "recordId": "string",      "status": "SUCCESS",      "error": "string",      "durationMs": 0,      "contextSnapshot": {},      "failedStepId": "string",      "failedStepPosition": 0,      "steps": {        "entries": [          {            "seq": 0,            "stepId": "string",            "stepType": "string",            "stepName": "string",            "status": "success",            "branchTaken": "string",            "durationMs": 0,            "contextKey": "string",            "output": {},            "loop": {              "loopStepId": "string",              "index": 0,              "item": {},              "count": 0            },            "error": {              "code": "string",              "message": "string"            },            "captured": true          }        ],        "truncated": true,        "totalVisits": 0      }    }  ],  "meta": {    "page": 1,    "limit": 20,    "total": 100,    "hasMore": true  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Resource not found",    "meta": {      "partiallyApplied": true,      "failedPhase": "defaultForms",      "committedObjects": [        {          "id": "5e2af9bc-be0b-4ad8-af57-e8319fb115d3",          "key": "session",          "created": true        }      ],      "fieldsWritten": 1,      "fieldsDeleted": 0    },    "fieldErrors": {      "name": [        "Field \"name\" is required"      ]    },    "unavailableMutationScopes": [      "contractor.bankAccounts"    ],    "clientMutationId": "019f2e3a-7c8b-7a33-9fc8-90db2b5b1e50",    "relationTableErrors": {},    "idempotencyConflict": {},    "errors": [      {        "message": "relation \"foo\" does not exist"      }    ],    "impacts": [      {}    ],    "validation": {}  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Resource not found",    "meta": {      "partiallyApplied": true,      "failedPhase": "defaultForms",      "committedObjects": [        {          "id": "5e2af9bc-be0b-4ad8-af57-e8319fb115d3",          "key": "session",          "created": true        }      ],      "fieldsWritten": 1,      "fieldsDeleted": 0    },    "fieldErrors": {      "name": [        "Field \"name\" is required"      ]    },    "unavailableMutationScopes": [      "contractor.bankAccounts"    ],    "clientMutationId": "019f2e3a-7c8b-7a33-9fc8-90db2b5b1e50",    "relationTableErrors": {},    "idempotencyConflict": {},    "errors": [      {        "message": "relation \"foo\" does not exist"      }    ],    "impacts": [      {}    ],    "validation": {}  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Resource not found",    "meta": {      "partiallyApplied": true,      "failedPhase": "defaultForms",      "committedObjects": [        {          "id": "5e2af9bc-be0b-4ad8-af57-e8319fb115d3",          "key": "session",          "created": true        }      ],      "fieldsWritten": 1,      "fieldsDeleted": 0    },    "fieldErrors": {      "name": [        "Field \"name\" is required"      ]    },    "unavailableMutationScopes": [      "contractor.bankAccounts"    ],    "clientMutationId": "019f2e3a-7c8b-7a33-9fc8-90db2b5b1e50",    "relationTableErrors": {},    "idempotencyConflict": {},    "errors": [      {        "message": "relation \"foo\" does not exist"      }    ],    "impacts": [      {}    ],    "validation": {}  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Resource not found",    "meta": {      "partiallyApplied": true,      "failedPhase": "defaultForms",      "committedObjects": [        {          "id": "5e2af9bc-be0b-4ad8-af57-e8319fb115d3",          "key": "session",          "created": true        }      ],      "fieldsWritten": 1,      "fieldsDeleted": 0    },    "fieldErrors": {      "name": [        "Field \"name\" is required"      ]    },    "unavailableMutationScopes": [      "contractor.bankAccounts"    ],    "clientMutationId": "019f2e3a-7c8b-7a33-9fc8-90db2b5b1e50",    "relationTableErrors": {},    "idempotencyConflict": {},    "errors": [      {        "message": "relation \"foo\" does not exist"      }    ],    "impacts": [      {}    ],    "validation": {}  }}