# Calling web page URL and use return data

**URL:** <https://community.smartthings.com/t/calling-web-page-url-and-use-return-data/247097>\
**Category:** Rules API\
**Created:** [August 31, 2022, 10:11pm UTC](https://community.smartthings.com/t/calling-web-page-url-and-use-return-data/247097 "2022-08-31T22:11:45Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![DevDude](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/devdude/32/77303_2.png) [@DevDude](https://community.smartthings.com/u/DevDude)\
**Post date:** [August 31, 2022, 10:11pm UTC](https://community.smartthings.com/t/calling-web-page-url-and-use-return-data/247097/1 "2022-08-31T22:11:45Z")

</div>

I was told that the Rules API is not what I would need and I should use the SmartThings API (ST API). There are a lot of pages about this API that are from years ago. I don’t think they are relevant. This new API should have been renamed.

I am looking to convert my WebCore scripts that allowed this functionality. I do not want to create a smartapp or something other than create a routine that calls a URL and returns some data that I can parse.

Does someone have a simple tutorial link for this task?

Thanks

---

<div class="post-metadata">

**Author:** ![Jake\_Mohl](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jake_mohl/32/133492_2.png) [@Jake\_Mohl](https://community.smartthings.com/u/Jake_Mohl)\
**Post date:** [August 31, 2022, 10:18pm UTC](https://community.smartthings.com/t/calling-web-page-url-and-use-return-data/247097/2 "2022-08-31T22:18:07Z")

</div>

What are you exactly wanting to do. I’m in the same process. I have it worked out to Get device info (name and state(on/off, open/closed)) and the Post command to turn things on and off. All using a http post/get commands. If that’s what you want to do.

---

<div class="post-metadata">

**Author:** ![Bry](https://avatars.discourse-cdn.com/v4/letter/b/aeb1de/32.png) [@Bry](https://community.smartthings.com/u/Bry)\
**Post date:** [August 31, 2022, 10:26pm UTC](https://community.smartthings.com/t/calling-web-page-url-and-use-return-data/247097/3 "2022-08-31T22:26:19Z")

</div>

> [@DevDude](#):
>
> that calls a URL

Posts and Gets? Take a look at the Web Requestor.

> [@\[ST Edge\] Web Requestor: a driver to issue local POST and GET HTTP requests](https://community.smartthings.com/t/st-edge-web-requestor-a-driver-to-issue-local-post-and-get-http-requests/232911):
>
> I have a new Edge driver to share that provides the ability to issue POST and GET web requests to a specified URL. This functionality can help users that may today depend on webCoRE or other cloud-based means to do a similar task. Of course being an Edge driver it enables you to have fast & local automations. There are two ways this driver can be used: Pre-configure up to 50 different POST/GET URL strings, which can then be individually triggered through Automations/Rules or via a button in the mobile app. Issue custom URL POST/GET commands from within a Rule \>\>\>\>\>UPDATE: Please go to [this readme file](https://github.com/toddaustin07/webrequestor/blob/main/README.md) for the latest instructions Limitations Although GET method is supported, it currently does not actually do anything with the returned data from the server. I’m open to ideas he…

---

<div class="post-metadata">

**Author:** ![TAustin](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/taustin/32/45058_2.png) [@TAustin](https://community.smartthings.com/u/TAustin)\
**Post date:** [August 31, 2022, 10:43pm UTC](https://community.smartthings.com/t/calling-web-page-url-and-use-return-data/247097/4 "2022-08-31T22:43:03Z")

</div>

Parsing the return data may be a challenge, as you are pretty limited in what you can do with Rules. My driver has an option to specify a particular key that will be looked for in the response data and the key value is put in a separate field you can test. Don’t know if this will be sufficient for your needs.

---

<div class="post-metadata">

**Author:** ![TAustin](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/taustin/32/45058_2.png) [@TAustin](https://community.smartthings.com/u/TAustin)\
**Post date:** [August 31, 2022, 11:03pm UTC](https://community.smartthings.com/t/calling-web-page-url-and-use-return-data/247097/5 "2022-08-31T23:03:36Z")

</div>

Also be aware that you’ll need some kind of proxy to reach beyond your local LAN.

My edgebridge app might be of interest.

---

<div class="post-metadata">

**Author:** ![DevDude](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/devdude/32/77303_2.png) [@DevDude](https://community.smartthings.com/u/DevDude)\
**Post date:** [August 31, 2022, 11:41pm UTC](https://community.smartthings.com/t/calling-web-page-url-and-use-return-data/247097/6 "2022-08-31T23:41:57Z")

</div>

This is a simple example:

Make a GET request to [http://api.openweathermap.org/data/2.5/forecast](http://api.openweathermap.org/data/2.5/forecast) …

Then I get the return as JSON and parse it to see the temperature or something else

Then I make a GET request to VoiceMonkey to say a message on my Alexa Echo.

So I do not use any device in this example.

---

<div class="post-metadata">

**Author:** ![DevDude](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/devdude/32/77303_2.png) [@DevDude](https://community.smartthings.com/u/DevDude)\
**Post date:** [August 31, 2022, 11:57pm UTC](https://community.smartthings.com/t/calling-web-page-url-and-use-return-data/247097/7 "2022-08-31T23:57:44Z")

</div>

I was told by @nayelyz that I could use the ST API to make external calls. Your bridge is interesting however I do not understand why this would not be a core feature that could be called by the Rules API. WebCore has existed for years and they had Adrian there until he bolted (I think I see why). @TAustin your bridge info says that I can request a key. The JSON I get back is hierarchical. Can I choose the exact key in that hierarchy? Can I choose 2+ keys?

Maybe SmartThings should’ve just told everyone to use HASSIO and the SmartThings hardware?

😕

---

<div class="post-metadata">

**Author:** ![TAustin](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/taustin/32/45058_2.png) [@TAustin](https://community.smartthings.com/u/TAustin)\
**Post date:** [September 1, 2022, 1:08am UTC](https://community.smartthings.com/t/calling-web-page-url-and-use-return-data/247097/8 "2022-09-01T01:08:40Z")

</div>

> [@DevDude](#):
>
> I could use the ST API to make external calls

I’m not sure what that even means. Unless there is some new API I’m not aware (possible!)

Here is the [official API reference](https://developer-preview.smartthings.com/docs/api/public/#section/Overview).

Not sure you can achieve your goals without implementing a SmartApp. I don’t know how you are going to use the Rules engine to make use of the response data, then create a dynamic get request that you send to VoiceMonkey. Webrequestor is a tool to send your http requests, but the platform is quite limited in terms of using the returned data. I support just one key right now and its just a rudimentary search, so if there is an array, it will probably just return the first value found.

I think if I were you I wouldn’t even try to do this within SmartThings. Just write your own script on your computer. It would be much simpler but I don’t know why you were looking for SmartThings integration.

FYI, I have a weather driver and I’m just starting to add support for openweathermap, so you could have some use for that, which would already parse the data for you and make it available in a SmartThings device. From which you could create automations based on the data elements, but you still want to build something and send to VoiceMonkey. You could have an Edge driver send it to an app on your own computer, format it and send ahead to VoiceMonkey.

---

<div class="post-metadata">

**Author:** ![joshua\_lyon](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/joshua_lyon/32/12655_2.png) [@joshua\_lyon](https://community.smartthings.com/u/joshua_lyon)\
**Post date:** [September 1, 2022, 1:22am UTC](https://community.smartthings.com/t/calling-web-page-url-and-use-return-data/247097/9 "2022-09-01T01:22:41Z")

</div>

> [@DevDude](#):
>
> Make a GET request to [http://api.openweathermap.org/data/2.5/forecast](http://api.openweathermap.org/data/2.5/forecast) …
> 
> Then I get the return as JSON and parse it to see the temperature or something else

You can do this with [SharpTools.io](http://SharpTools.io)

@Damianeq is using this concept in one of his SharpTools rules:

> **[Rules / Variables based on Date or Calendar](https://community.sharptools.io/t/rules-variables-based-on-date-or-calendar/9567/14?u=josh)**
>
> You can do this with the HTTP Action in SharpTools today. I agree that it makes for a good feature request as a native integration though to simplify this process for people who don’t have weather devices attached to their SmartThings. 😃 Let’s...
