How to call API and consume the output using exec #11527
Answered
by
jszwedko
satscreate
asked this question in
Q&A
-
Any example script for exec source, which calls an API every N minute and collects the response and transform.?
Any examples? |
Beta Was this translation helpful? Give feedback.
Answered by
jszwedko
Feb 23, 2022
Replies: 1 comment 5 replies
-
Hi @satscreate , If you want to call it on an interval, you should use sources:
my_source_id:
type: exec
command: ["curl","-k","https://gorest.co.in/public/v2/users"]
mode: scheduled
scheduled:
exec_interval_secs: 600 # five minutes Otherwise, what you have seems reasonable to me. |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
satscreate
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @satscreate ,
If you want to call it on an interval, you should use
mode.scheduled
withscheduled.exec_interval_secs
like:Otherwise, what you have seems reasonable to me.