Cannot filter by session/id in Application Insights API

Michael S. Scherotter 26 Reputation points

The Application Insights REST API seems to let me search for custom events by session/id.

A URL like this returns 0 values:$filter='session/id' eq '5Ir7eEKoMoRwsg6jpnX2j'&$top=500&$skip=0×pan=P2Y

User's image

knowing that i got the session/id from a previous call which showed the custom event with that session/id. I have no problem filtering by other fields, but I get no results when filtering by session/id Please advise.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,667 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AnuragSingh-MSFT 18,586 Reputation points

    @Michael S. Scherotter , Apologies for the delayed response.

    After working through this issue with the AppInsights team, I found that the issue was related to syntax. Please remove quotes (') from the $filter expression's first operand. Therefore, the expression

    $filter='session/id' <changes to> $filter=session/id

    The complete URL will be as below (note the absence of quotes around session/id)$filter=session/id eq '5Ir7eEKoMoRwsg6jpnX2j'&$top=500&$skip=0×pan=P2Y

    Hope this helps. Please let me know if you have any questions.

    0 comments No comments