API Get Transaction Items

Hi,

I want to get list of QueueItems, I’m using following request:

OrchestratorURL & "odata/QueueItems?$expand=Robot&$filter=QueueDefinitionId eq " & QueueID & " and EndProcessing gt " & StartTime & " and EndProcessing lt " & EndTime

It works ok, but it gives me multiple values for the same transaction. For example if I have Application Exception and item was successfully retried I see 2 entries in result. What I want to see is only last attempt. How can I do that?