I am trying to make a curl request to a direct json link and fetch the result. When i hardcode the URL it works fine but my url is dynamic and gets created based on the search result of another query.
I can see my curl command is correct but it doesnt give proper output
I have a search query S1 which gives me a result X with numeric values (203, 204, 205) and I am able to populate this in a table. Now I want to bind this number with a url to create a dynamic url specific to that number.
For example URL is https://cnac.ca/data/json/npas.json and from S1 query i get the result value as 203, I want to create URL : https://cnac.ca/data/json/npa203.json and want to hit this to get the response back to get the required data.
For this I am using curl command, but when I try to create a dynamic URL and pass it in curl command it doesn't accept it.
Please suggest.
Standard SPL doesn't have a curl command. You should ask the developer who developed the app that gives you curl, or consult its manual to find out the correct syntax and any limitations it may have. (Given that "Apps and Add-ons" forum is gone from this board, Splunk Dev might be a successor.)
Also, you talk about "dynamic url" as if it is a Splunk feature. It is not. Maybe you can illustrate your SPL snippet so volunteers can understand precisely what you are referring to?
Please can you provide a more detailed example of the issue you are facing (anonymising sensitive information such as ip addresses etc.)