Anna Misha
Anna Misha

Reputation: 21

Seq.Api.Client.SeqApiException: 400 - The filter expression could not be successfully parsed

I am getting Seq.Api.Client.SeqApiException: 400 - The filter expression could not be successfully parsed when running the following code:

 var firstCall = await connection.Events.ListAsync(
                        filter:"my string with spaces", 
                        render:true, 
                        count: 1);  
    
     Console.WriteLine(firstCall[0].RenderedMessage);

Even though passing "my string with spaces" using SEQ UI returns me expected results.The Dev Console shows that query looks like http://localhost:5341/api/events/signal?signal=&filter=%22my%20string%20with%20spaces%22&count=1

What is the right way to pass "my string with spaces" in the code?

Upvotes: 2

Views: 148

Answers (1)

RJFalconer
RJFalconer

Reputation: 11701

I believe you need to select the field of the event you want to filter on.

Try

 filter:"@Message like 'my string with spaces'", 

Upvotes: 2

Related Questions