History Logging works only from Cockpit UI

Hi , I am seeing a weird issue.
With history level set as 4, I am able to see user operation logs in act_hi_op_log table on setting assignee to a task.
But when I set assignee through REST api, its not getting logged.

I tried all of the below configurations:

camunda.bpm.history-level=full
camunda.bpm…history-level-default=full
camunda.bpm.eventing.execution=true
camunda.bpm.eventing.history=true
camunda.bpm.eventing.task=true

Any help is appreciated.

Operations are logged when the operation is performed in the context of a logged in user.

More info: History and Audit Event Log | docs.camunda.org

I guess the request via Rest API are without authenticated user.

You can have a look at this option: