Deprecated Endpoints
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 BI API Key, when not provided in the header
The index of the page of audits
The size of the page (number of audits per request)
The total limit of audits requested
The list of correlation IDs
The list of the solved rules and optionally their versions
The solver keys used to call the rules
The tag list of the solved rules
Lower bound on the date of the solve
Upper bound on the date of the solve
The order in which the audits are returned
Whether debug data should be included within audits
Possible HTTP status codes
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
}
The BI API Key, when not provided in the header
The list of correlation IDs
The list of the solved rules and optionally their versions
Lower bound on the date of the solve
Upper bound on the date of the solve
Possible HTTP status codes
DELETE /audit HTTP/1.1
Host: bi.decisionrules.io
Accept: */*
No content
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"
}
]
}
Last updated
Was this helpful?