Skip to main content

Use a URL to Run a Search

You can create a custom URL to launch a log search in Sumo Logic.

Syntax​

https://<endpoint>/ui/#/search/create?query=<urlEncodedQuery>&parameters=<param1:value1,param2:value2,param3=value3,...,paramN=valueN>&startTime=<start>&endTime=<end>
  • <endpoint> is your Sumo Logic service endpoint. See Sumo Logic Endpoints and Firewall Security for the endpoint URLs.
  • <urlEncodedQuery> is the text of your log search query in URL encoded format.
  • <param1:value1,param2:value2,param3=value3,...,paramN=valueN> is the query parameter part of a templatized query and the corresponding value for the query parameter.
  • <start> is the start of your log query time range, the value can be either:
  • <end> is the end of your log query time range, the value can be either:

Examples​

Standard query URL​

Create a URL for the following log query, using a relative time range expression of -10w to -1w.:

test query | count by _source

The custom URL that launches this log query in the Sumo Logic Search page would be similar to the following. The exact URL would depend on your Sumo Logic account endpoint, as listed in Sumo Logic Endpoints and Firewall Security. 

https://service.sumologic.com/ui/#/search/create?query=test%20query%20%7C%20count%20by%20_source&startTime=-10w&endTime=-1w

Templatized query URL​

Create a URL for the following log query, using a relative time range expression of -60m to -30m.:

{{app_name}} error | count

Assuming that user selects billing app from the list of apps, the final query is :

billing error | count

The custom URL that launches this log query in the Sumo Logic Search page would be similar to the following. The exact URL would depend on your Sumo Logic account endpoint, as listed in Sumo Logic Endpoints by Deployment and Firewall Security. 

https://service.sumologic.com/ui/#/search/create?query={{app_name}}%20error%20%7C%20count&parameters=app_name:billing&startTime=-60m&endTime=-30m
Status
Legal
Privacy Statement
Terms of Use

Copyright © 2024 by Sumo Logic, Inc.