Hi,
We’re trying to read the logs generated from the management API using a Lucene query to filter the result as documented here:
The problem is when we use some fields present in the JSON representation of the log, we receive 0 results while others are working as expected. I’m aware there’s a list of searchable fields, but we we’re able to filter on fields that are undocumented so…
For example, I get results when filtering the field details.request.method:“post”, but no result when filtering details.request.query.user_id:“[REDACTED]”. It’s not throwing an error, we just have no result.
Here’s the simplified log (JSON representation)
{ "date": "2022-06-27T19:13:54.992Z", "type": "sapi", "description": "Assign one or more roles to a given user that will be applied in the context of the provided organization", "client_id": "REDACTED", "client_name": "", "ip": "REDACTED", "user_agent": "CREDACTED", "details": { "request": { "method": "post", "path": "[REDACTED]", "query": { "user_id": "[REDACTED]" }, "userAgent": "REDACTED", ...REDACTED }, "user_id": "REDACTED", "log_id": "REDACTED", "_id": "REDACTED", "isMobile": false, "id": "REDACTED" }
We would like to use the lucene query to avoid re-filtering the logs in our backend. Is this a limitation or maybe we’re not using the query correctly? Either way I think it should be documented because it’s confusing.
Thanks