Objective
Retrieve TaskRouter logs for a specific duration for the purpose of historical reporting and auditing.
Product
Flex
Procedure
TaskRouter logs events for each state change in the Workspace, and it keeps that data for 30 days. You can filter TaskRouter logs using any of the following parameters:
- Task SID
- Reservation SID
- TaskQueue SID
- Workflow SID
- Worker SID
- Task Channel SID
- Event Type
- Minutes
- Start Date
- End Date
You can use the following Twilio CLI command to retrieve TaskRouter logs for a designated time frame. This particular example will also filter for a specific TaskQueue and all task.created events:
twilio api:taskrouter:v1:workspaces:events:list --workspace-sid WSxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --task-queue-sid=WQxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --event-type=task.created --start-date=YYYY-MM-DD --end-date=YYYY-MM-DD
Additional Information
You can find additional information about how TaskRouter events and their attributes at the following links: