> For the complete documentation index, see [llms.txt](https://docs.decisionrules.io/doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decisionrules.io/doc/api/archive/console-logs-api-retired.md).

# Console Logs API (RETIRED)

{% hint style="warning" %}
Console Logs API is retired from version 1.25.1. To save and fetch debug logs, please use Audit Logs with our Business Intelligence API.
{% endhint %}

## Get console logs for a specific solve.

> Retrieves console logs for a specific rule solve identified by its \`correlationId\`.\
> The \`correlationId\` can be obtained from the \`X-Correlation-Id\` response header of the Rule Solver API.\
> Logs are only generated when the solve is run in debug mode (e.g., using the \`X-Debug: true\` header).<br>

```json
{"openapi":"3.0.0","info":{"title":"Console Logs API","version":"1.0.0"},"servers":[{"url":"https://api.decisionrules.io/consoleLogs"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"ApiKey"}},"schemas":{"LogDetailResponse":{"type":"object","properties":{"_id":{"type":"string"},"apiKey":{"$ref":"#/components/schemas/ApiKey"},"id":{"type":"string"},"time":{"type":"string","format":"date-time"},"logs":{"type":"array","items":{"$ref":"#/components/schemas/ConsoleLogEntry"}},"baseId":{"type":"string"},"input":{"$ref":"#/components/schemas/Input"},"output":{"type":"array","items":{"$ref":"#/components/schemas/OutputItem"}},"correlationId":{"type":"string","format":"uuid"}}},"ApiKey":{"type":"object","properties":{"created":{"type":"string","format":"date-time"},"type":{"type":"string"},"key":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"}}},"ConsoleLogEntry":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"The timestamp of the log entry."},"level":{"type":"string","description":"The severity level of the log entry (e.g., INFO, WARN, ERROR)."},"message":{"type":"string","description":"The log message."}}},"Input":{"type":"object","additionalProperties":true},"OutputItem":{"type":"object","properties":{"prices":{"type":"object","properties":{"finalPrice":{"type":"number"},"crudePrice":{"type":"number"}}},"message":{"type":"string"}}}}},"paths":{"/{correlationId}":{"get":{"summary":"Get console logs for a specific solve.","description":"Retrieves console logs for a specific rule solve identified by its `correlationId`.\nThe `correlationId` can be obtained from the `X-Correlation-Id` response header of the Rule Solver API.\nLogs are only generated when the solve is run in debug mode (e.g., using the `X-Debug: true` header).\n","operationId":"getConsoleLogs","parameters":[{"name":"correlationId","in":"path","required":true,"description":"The unique identifier for a rule solve.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Console logs retrieved successfully.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LogDetailResponse"}}}}},"401":{"description":"Unauthorized. Invalid or missing API key."},"404":{"description":"Not Found. No logs found for the given `correlationId`, or the logs have expired."}}}}}}
```

## The ConsoleLogEntry object

```json
{"openapi":"3.0.0","info":{"title":"Console Logs API","version":"1.0.0"},"components":{"schemas":{"ConsoleLogEntry":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"The timestamp of the log entry."},"level":{"type":"string","description":"The severity level of the log entry (e.g., INFO, WARN, ERROR)."},"message":{"type":"string","description":"The log message."}}}}}}
```

## The LogsResponse object

```json
{"openapi":"3.0.0","info":{"title":"Console Logs API","version":"1.0.0"},"components":{"schemas":{"LogsResponse":{"type":"object","properties":{"correlationId":{"type":"string","format":"uuid","description":"The correlation ID for the solve."},"logs":{"type":"array","items":{"$ref":"#/components/schemas/ConsoleLogEntry"},"description":"An array of console log entries."}}},"ConsoleLogEntry":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"The timestamp of the log entry."},"level":{"type":"string","description":"The severity level of the log entry (e.g., INFO, WARN, ERROR)."},"message":{"type":"string","description":"The log message."}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.decisionrules.io/doc/api/archive/console-logs-api-retired.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
