Given the following request URLs:
- https://example.com/api/foos/123/bars/456
- https://example.com/api/foos/123/bars/456
Common structure: https://example.com/api/foos/
{foo-id}
/bars/{bar-id}
I wish to get separate columns for the values of {foo-id}
and {bar-id}
What I tried
requests
| where timestamp > ago(1d)
| extend parsed_url=parse_url(url)
| extend path = tostring(parsed_url["Path"])
| extend: foo = "value of foo-id"
| extend: bar = "value of bar-id"
This gives me /api/foos/{foo-id}/bars/{bar-id}
as a new path column.
Can I solve this question without using regular expressions?
Related, but not the same question: Application Insights: Analytics - how to extract string at specific position