Skip to main content

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

FieldTypeDescription
log_idIntUnique log entry identifier (read-only)
rule_idIntRule this entry belongs to
identifierStringEntity identifier the entry refers to (e.g. product SKU)
typeStringinfo, warning, or error
messageStringHuman-readable message
additional_dataObjectFree-form structured data (request/response, model used, token counts, etc.)
created_atStringTimestamp

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

FieldTypeDescription
history_idIntUnique history entry identifier (read-only)
rule_idIntRule that produced the change
entity_idIntMagento entity ID that was modified
old_valueStringField value before the change
new_valueStringField value after the change
is_removedBooleantrue if the new value has since been cleared or overwritten outside the rule
created_atStringTimestamp 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