Logs and history API
Read-only access to the records the AI Assistant writes when automation rules run. Use these endpoints to audit which rules processed which entities and what content was applied. All endpoints require authentication.
Logs
The log captures one row per apply-rule step (info, warning, or error). It's the operational record of a rule run.
Log object
| Field | Type | Description |
|---|---|---|
log_id | Int | Unique log entry identifier (read-only) |
rule_id | Int | Rule this entry belongs to |
identifier | String | Entity identifier the entry refers to (e.g. product SKU) |
type | String | info, warning, or error |
message | String | Human-readable message |
additional_data | Object | Free-form structured data (request/response, model used, token counts, etc.) |
created_at | String | Timestamp |
Get log entry
GET /rest/V1/assistant/log/:logId
Response: the log object.
Errors: 404 log entry not found.
List log entries
GET /rest/V1/assistant/logs
Supports filtering and pagination.
Example — errors from rule 1, newest first:
GET /rest/V1/assistant/logs
?searchCriteria[filter_groups][0][filters][0][field]=rule_id
&searchCriteria[filter_groups][0][filters][0][value]=1
&searchCriteria[filter_groups][1][filters][0][field]=type
&searchCriteria[filter_groups][1][filters][0][value]=error
&searchCriteria[sort_orders][0][field]=created_at
&searchCriteria[sort_orders][0][direction]=DESC
History
The history table records every content change a rule made — old value, new value, and whether the value has since been removed. Use it to roll back, audit, or feed into downstream systems.
History object
| Field | Type | Description |
|---|---|---|
history_id | Int | Unique history entry identifier (read-only) |
rule_id | Int | Rule that produced the change |
entity_id | Int | Magento entity ID that was modified |
old_value | String | Field value before the change |
new_value | String | Field value after the change |
is_removed | Boolean | true if the new value has since been cleared or overwritten outside the rule |
created_at | String | Timestamp of the change |
Get history entry
GET /rest/V1/assistant/history/:historyId
Response: the history object.
Errors: 404 history entry not found.
List history entries
GET /rest/V1/assistant/history
Supports filtering and pagination.
Example — changes from rule 1 in the last 24h:
GET /rest/V1/assistant/history
?searchCriteria[filter_groups][0][filters][0][field]=rule_id
&searchCriteria[filter_groups][0][filters][0][value]=1
&searchCriteria[filter_groups][1][filters][0][field]=created_at
&searchCriteria[filter_groups][1][filters][0][value]=2026-05-27 00:00:00
&searchCriteria[filter_groups][1][filters][0][condition_type]=gteq
&searchCriteria[sort_orders][0][field]=created_at
&searchCriteria[sort_orders][0][direction]=DESC