# Watcher, multiple web posts

**URL:** <https://discuss.elastic.co/t/watcher-multiple-web-posts/290643>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting\
**Created:** [December 1, 2021, 9:34am UTC](https://discuss.elastic.co/t/watcher-multiple-web-posts/290643 "2021-12-01T09:34:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![runtman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/runtman/32/18136_2.png) [@runtman](https://discuss.elastic.co/u/runtman)\
**Post date:** [December 1, 2021, 9:34am UTC](https://discuss.elastic.co/t/watcher-multiple-web-posts/290643/1 "2021-12-01T09:34:05Z")

</div>

I've looked through the docs and can't really find an answer if this is possible.

I want a watcher job to fire every 5 minutes to hit an API.

First of all it must hit the API to gain an authorization token, then once it has the token it needs to use it in a subsequential api call to get what I need. Is this possible in watcher?

1. Step one, gain a token  
[https://www.arcgis.com/sharing/rest/oauth2/token?grant\_type=client\_credentials&client\_id={{REDACTED}](https://www.arcgis.com/sharing/rest/oauth2/token?grant_type=client_credentials&client_id=%7B%7BREDACTED%7D)}&client\_secret={{REDACTED}}

2. Some how store the token for step 3.

3. Fire off the API call

[http://wvdep.maps.arcgis.com/sharing/rest/portals/self?culture=en&f=json&token=](http://wvdep.maps.arcgis.com/sharing/rest/portals/self?culture=en&f=json&token=){{ TOKEN }}

I can use zabbix if not, but i'd like to use watcher.

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [December 2, 2021, 9:02pm UTC](https://discuss.elastic.co/t/watcher-multiple-web-posts/290643/2 "2021-12-02T21:02:17Z")

</div>

That's pretty advanced for watcher to do, so it's not possible. It's mostly a tool to query Elasticsearch that sends out a request to a few configured options. You'll have to use zabbix for that.

---

<div class="post-metadata">

**Author:** ![runtman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/runtman/32/18136_2.png) [@runtman](https://discuss.elastic.co/u/runtman)\
**Post date:** [December 2, 2021, 9:33pm UTC](https://discuss.elastic.co/t/watcher-multiple-web-posts/290643/3 "2021-12-02T21:33:50Z")

</div>

Yeh, I've gone ahead and made it in Zabbix. Thanks for replying

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [December 15, 2021, 4:03pm UTC](https://discuss.elastic.co/t/watcher-multiple-web-posts/290643/4 "2021-12-15T16:03:49Z")

</div>

This could indeed be done, using a chained input, retrieving the API key first, then using a transform to properly extract it, and then use it in the next input.

Happy as long as you got it working 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 12, 2022, 4:04pm UTC](https://discuss.elastic.co/t/watcher-multiple-web-posts/290643/5 "2022-01-12T16:04:16Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
