LogoLogo
API Documentation
Version 1.19.5 and Older
Version 1.19.5 and Older
  • DecisionRules Documentation
  • API
    • API Introduction
    • API Keys
      • Solver API Keys
      • Management API keys
      • BI API keys
    • Rule Solver API
    • Management API
      • Deprecated Endpoints
    • Console Logs API
    • Business Intelligence API
      • Deprecated Endpoints
    • Datacenters & Locations
      • Global Cloud
      • Regional Cloud
    • Apache Kafka Solver API
    • Endpoint Settings
    • Archive
      • Rule Flow Solver API (DEPRECATED)
  • Decision tables
    • Decision Tables Introduction
    • Table Designer
    • Input & Output JSON Model
      • Simple Editor
      • JSON Editor
      • Binding to Model
    • Supported Data Types
    • Operators and Functions
      • Basic operators
      • Date operators
      • Functions
        • Logical Functions
        • Math Functions
        • Date and Time Functions
        • Text Functions
        • Data Functions
        • Array Functions
        • Integration functions
        • Functions and JSON
    • Export & Import of Decision Tables
      • Export Decision Table
      • Import Decision Table
      • File Structure of JSON Format
      • Managing Decision Table in Excel/Google Sheets
      • Deprecated Formats: XLSX v.1 and CSV
    • Table Operations
      • Filter Values
      • Valid Values
      • Sorting
  • Decision Trees
    • Decision Trees Introduction
    • Decision Tree Designer
    • Export & Import Decision Trees
      • Export Decision Tree
      • Import Decision Tree
  • Scripting Rules
    • Scripting Rule Introduction
    • Custom functions in Scripting Rules
    • Calling external API within ScriptingRules
    • Use Rule Variables in Scripting Rules
    • Call Embedded Rules in Scripting Rules
    • Export & Import Scripting Rules
      • Export Scripting Rule
      • Import Scripting Rule
    • Tips
  • Rule Flow
    • Rule Flow Designer
    • Rule Flow Mapping
    • Rule States in Rule Flow
    • Warnings & Errors
    • Rule Flow Limits
    • Export & Import Rule Flows
      • Export Rule Flow
      • Import Rule Flow
  • Workflow
    • Workflow Introduction
    • Workflow Designer
    • Workflow Nodes Overview
    • Workflow Limits
  • Other
    • Rule Alias
    • Execution Strategy
    • Rule State
    • Rule Versioning
    • Favorite Rules
    • Rule Variables
    • Rule Comparison
      • Decision Table Comparison
      • Decision Tree Comparison
      • Scripting Rule Comparison
    • Rule Tags
    • Rule Dependencies
    • Test Bench
    • Single Sign-On (SSO)
    • Event timeline
    • Rule Lock
    • Rule Migration Strategies
    • Changes in Version 1.19.0 (10/2024)
  • Organizations
    • Introduction
      • Access to Organization
    • Structure
      • Organization Roles
      • Members
      • Teams
      • Spaces
      • Space Roles
      • Policies
      • Settings
  • Teamwork
    • Dashboard
    • Folders
    • Spaces
    • Manage Spaces
    • Share Rules Between Spaces
    • Users & Roles
    • Teamwork Indicator
  • SDK and Integrations
    • Languages / Frameworks
      • SQL Server
      • Oracle PL/SQL
      • PostgreSQL
      • JavaScript
      • Java Spring Example
      • PHP Library
      • Python Library
      • .NET Library
      • Google Tag Manager
    • Excel Add-in
  • Business Intelligence
    • Audit Logs
    • Create a Power BI Report
    • Connect Power BI to Business Intelligence API
    • Connecting from Power BI (deprecated)
    • Connect DecisionRules to Power BI Using Our Custom Connector
  • Billing
    • Invoices & Billing
    • Change Product Plan
    • Billing Information
    • Plan Limits Explained
  • Regional Cloud
    • Regional Cloud
    • Region Specific API URLs
  • On-Premise / Docker
    • Environment Variables
    • Redis Connection Modes
    • Setup Single Sign-On (SSO)
      • Set up Microsoft Entra ID SSO
      • Set up Google SSO
    • DecisionRules Application
      • Minimal Requirements
      • DecisionRules Server
      • DecisionRules Client
      • DecisionRules Business Intelligence
      • Networking Between Docker Containers
    • Docker Showcase App
      • Showcase
      • Showcase + Business Intelligence
    • AWS Setup
      • AWS ECS/Fargate
      • Cache - Amazon ElastiCache
    • Microsoft Azure Setup
      • Database - Azure CosmosDB
      • Cache - Azure Cache for Redis
      • Azure Container Apps
    • Azure Red Hat OpenShift
    • Google Kubernetes Engine (GKE)
    • Kubernetes Setup
      • Kubernetes Setup with Business Intelligence
    • Logging options
    • CD/CI Pipelines
      • Azure DevOps CICD Pipelines
      • Using Migration script (old way)
    • Offline License
  • Terms & Conditions
    • Terms and Conditions
    • Privacy Policy
    • Service Level Agreement
      • Community Support
      • Standard Cloud (SaaS)
      • Silver SLA
      • Gold SLA
      • Custom SLA
    • Sub-Processor List
  • Roadmap 🚲 🗺️
  • Release Notes
    • Public Cloud
    • On-Premise / Private Cloud
Powered by GitBook
On this page

Was this helpful?

  1. API
  2. Business Intelligence API

Deprecated Endpoints

Was this helpful?

Get Audit Logs

This endpoint allows you to fetch audit logs from your rule solver, including metadata of the solver run as well as the input and output data.

The rule solver does not generate audit logs by default. If you want some rule to generate audits on each solve, you have to turn on audit logs in its Rule Settings. More information can be found on the Page.

Pagination v1

There can be a lot of audit logs in the database, of course. We therefore enforce a maximum page size, e.g. the number of audit logs that can be returned per one request. The maximum page size is 1.000, which means that you can never get more audits than 1.000 per one call.

Page Size

You can choose a custom page size smaller than 1.000 by defining the page_size query parameter. For example, if you set page_size=100, the API will always return maximum 100 audits per request, no matter how many matching audits there are in the database. If not set, the page size defaults to 1.000.

Page

To get more audit logs than those that can fit on one page, you can use the page parameter. For example, if you set page_size=100&page=2, you will get audits 101 - 200, while a request with page_size=100&page=3 yields audits 201 - 300. etc. If not set, page defaults to 1 so you get the first page.

Limit

You can also specify the total limit on the number of audits by setting the limit parameter. If set, the API will never fetch any further audits than that with index equal to the limit. For example, a request with page_size=100&page=2&limit=150 yields only the audits 101 - 150, while page_size=100&page=3&limit=150 returns just an empty array of audits because you have exceeded your limit. There is no limit by default.

Request example

URL
https://bi.decisionrules.io/audit?limit=1

Headers:
Content-Type: application/json
Authorization: Bearer DOZpz-h6xnOrKGIINlYvkd9hn41pRR3oG6cqH

BI Key

If you cannot send the Business Intelligence API Key inside the authorization header, you may use the bi_key query parameter; e.g. bi_key=DOZpz-h6xnOrKGIINlYvkd9hn41pRR3oG6cqH. In that case, the request could look as follows.

URL
https://bi.decisionrules.io/audit?limit=1&bi_key=DOZpz-h6xnOrKGIINlYvkd9hn41pRR3oG6cqH

Headers:
Content-Type: application/json

If the bi_key query parameter is not set, the server will look for the authorization header as described above.

Response example

{
    "audits": [
        {
            "correlationId": "7bac2e34-53c6-cbb0-d898-87f46ad50f77",
            "guid": "b88ba671-eae9-05e8-a547-f54d0cdedba7",
            "baseId": "d58e2518-57f6-a315-2458-b931b45cb543",
            "version": 1,
            "type": "decision-table",
            "status": "published",
            "outputSchema": {
                "finalPrice": {},
                "message": {}
            },
            "createdIn": "2022-06-28T13:22:11.875Z",
            "inputSchema": {
                "benefitCode": {},
                "promoCode": {},
                "price": {}
            },
            "tags": [
                "Benefit"
            ],
            "name": "Benefit Program",
            "lastUpdate": "2022-06-28T13:22:11.875Z",
            "solverKey": "QyjvIdGhdDgUP6_Lebo2DOyYaoSIA0axZlVcRrxbJzHazTOMn03GA5kiuIzgIw5z",
            "inputData": {
                "benefitCode": "SUMMER",
                "promoCode": {},
                "price": {}
            },
            "outputData": [
                {
                    "finalPrice": {},
                    "message": "discount 30%"
                },
                {
                    "finalPrice": {},
                    "message": "no discount"
                }
            ],
            "executionTime": 1,
            "statusCode": 200,
            "errorMessage": null,
            "debugData": null,
            "timestamp": "2022-06-28T13:22:28.579Z"
        }
    ]
}

You need to copy paste your own Business Intelligence API Key after Bearer . If you do not have it yet, generate your Business Intelligence API Key .

in the app
Audit Logging
Deprecated

Get audit logs

get
Query parameters
bi_keystringOptional

The BI API Key, when not provided in the header

pagestringOptional

The index of the page of audits

page_sizestringOptional

The size of the page (number of audits per request)

limitstringOptional

The total limit of audits requested

correlation_idstringOptional

The list of correlation IDs

rulesstringOptional

The list of the solved rules and optionally their versions

solver_keysstringOptional

The solver keys used to call the rules

tagsstringOptional

The tag list of the solved rules

date_gtestringOptional

Lower bound on the date of the solve

date_ltestringOptional

Upper bound on the date of the solve

orderstringOptional

The order in which the audits are returned

include_debugstringOptional

Whether debug data should be included within audits

status_codesstringOptional

Possible HTTP status codes

Responses
200
OK
application/json
400
Invalid API key or query parameter
401
Invalid or missing API key
get
GET /audit HTTP/1.1
Host: bi.decisionrules.io
Accept: */*
{
  "audits": [
    {
      "correlationId": "508e6d92-a81c-e30f-6f26-43ba84c6eb93",
      "id": "6ebb936f-17f4-8ba8-b9e0-289c141dfcdf",
      "baseId": "d8599999-b107-e266-04fa-84806f154568",
      "ruleAlias": "unique-bovid",
      "version": 1,
      "type": "composition",
      "status": "published",
      "outputSchema": {
        "finalPrice": {},
        "crudePrice": {},
        "message": {}
      },
      "createdIn": "2024-05-10T12:14:15.981Z",
      "inputSchema": {
        "period": {},
        "productType": {},
        "promoCode": {}
      },
      "tags": [],
      "name": "aaa",
      "lastUpdate": "2024-05-10T12:14:20.101Z",
      "solverKey": "xxxx",
      "inputData": {
        "period": {},
        "productType": {},
        "promoCode": {}
      },
      "outputData": [
        {
          "finalPrice": {},
          "crudePrice": {},
          "message": {}
        }
      ],
      "executionTime": 10,
      "statusCode": 200,
      "expirationDate": "2024-05-24T12:14:26.160Z",
      "errorMessage": null,
      "debugLogId": null,
      "userId": "xxxx",
      "spaceId": "xxxx",
      "timestamp": "2024-05-10T12:14:26.160Z"
    }
  ],
  "hasMore": true,
  "cursor": 1716189400398907
}
Deprecated

Delete audits from the database

delete
Query parameters
bi_keystringOptional

The BI API Key, when not provided in the header

correlation_idsstringOptional

The list of correlation IDs

rulesstringOptional

The list of the solved rules and optionally their versions

date_gtestringOptional

Lower bound on the date of the solve

date_ltestringOptional

Upper bound on the date of the solve

status_codesstringOptional

Possible HTTP status codes

Responses
200
OK
400
Invalid API key or query parameter
401
Invalid or missing API key
delete
DELETE /audit HTTP/1.1
Host: bi.decisionrules.io
Accept: */*

No content

  • Get Audit Logs
  • GETGet audit logs
  • DELETEDelete audits from the database
  • Pagination v1