This message originated from Cribl Community Slack.
Click here to view the original link.
Hi :wave:
Apologies if this has been solved, I haven't been able to find anything using Slack's search option.
The scenario is that we have a REST endpoint that we need to call to download a report with data, but in order to download the right report we need to first query a slightly different endpoint to get the last report ID. :sigh:
Cribl's REST can do OAuth -> API call just fine, but then I need to store the returned value in a global variable so that the second REST call can look it up and use it.
Not pretty, it's what we have.
So the question is, is there an internal call that can perform an update of a global variable, or a REST/HTTP call that I can set as the destination to do this? The CoPilot AI says I can use /lib/vars/ endpoint to do this, however I can't find that endpoint in the API docs.
The second problem I've run into is that there doesn't appear to be a REST destination that I can use, the closes being Cribl HTTP.
So if the API endpoint is there and works it looks like I'd have to use an external program to set the global variable before running the source collector in Cribl.
:thankyou:
Solved
Cribl REST API Issues: Unable To Update Global Variable; Missing /lib/vars/ Endpoint Documentation
Best answer by Jon Rust
I recommend to start your work in our REST Collector Repo so you don't re-invent the wheel
Sign up
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
