# Is there an API for goodcloud?

**URL:** <https://forum.gl-inet.com/t/is-there-an-api-for-goodcloud/11065>\
**Category:** Router\
**Created:** [June 8, 2020, 4:00pm UTC](https://forum.gl-inet.com/t/is-there-an-api-for-goodcloud/11065 "2020-06-08T16:00:19Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![arsenix](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@arsenix](https://forum.gl-inet.com/u/arsenix)\
**Post date:** [June 8, 2020, 4:00pm UTC](https://forum.gl-inet.com/t/is-there-an-api-for-goodcloud/11065/1 "2020-06-08T16:00:19Z")

</div>

Is there any type of API for goodcloud? I would like my routers to be able to query their “Description” in goodcloud for other monitoring purposes. It would also be nice if I could push information into the “TIMELINE” area of goodcloud. Is this possible?

Thank you!

---

<div class="post-metadata">

**Author:** ![Leo](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/leo/32/339_2.png) [@Leo](https://forum.gl-inet.com/u/Leo)\
**Post date:** [June 9, 2020, 1:50am UTC](https://forum.gl-inet.com/t/is-there-an-api-for-goodcloud/11065/2 "2020-06-09T01:50:24Z")

</div>

We don’t expose the API.

You can search the Description on Device List of GoodCloud.

You can push information to the Timeline of GoodCloud, even AWS IoT, this is the guide [GitHub - gl-inet/ble2mqtt: BLE 2 MQTT bridge on GL.iNet IoT gateway](https://github.com/gl-inet/ble2mqtt)

---

<div class="post-metadata">

**Author:** ![arsenix](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@arsenix](https://forum.gl-inet.com/u/arsenix)\
**Post date:** [June 10, 2020, 8:42pm UTC](https://forum.gl-inet.com/t/is-there-an-api-for-goodcloud/11065/4 "2020-06-10T20:42:04Z")

</div>

Thank you for this! I have tried the “ubus call” command from your link and that does work, although I note that on the MT300N it appears that in the log all messages in the log are prepended with “devicesList.” in the log. Is there a way to get around this? I have also not figured out how to put multiple lines yet.

![image](https://forum-static.gl-inet.com/original/2X/1/17955cf3cee2df5e8832c22011085d65560e88e0.png)

---

<div class="post-metadata">

**Author:** ![Leo](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/leo/32/339_2.png) [@Leo](https://forum.gl-inet.com/u/Leo)\
**Post date:** [June 11, 2020, 2:19am UTC](https://forum.gl-inet.com/t/is-there-an-api-for-goodcloud/11065/5 "2020-06-11T02:19:51Z")

</div>

The “deviceList.”, looks like it is a frontend bug, I will fix it.

what do you mean “multiple lines”? I think the “ubus call” just send a string to Timeline, if you want to send multiple lines, just send multiple times. Is this OK?

---

<div class="post-metadata">

**Author:** ![arsenix](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@arsenix](https://forum.gl-inet.com/u/arsenix)\
**Post date:** [June 11, 2020, 2:29am UTC](https://forum.gl-inet.com/t/is-there-an-api-for-goodcloud/11065/6 "2020-06-11T02:29:03Z")

</div>

Ah ok thank you for looking into that!

It is true I could send multiple messages. I was hoping to have multiple lines for a single entry, but I can do as you say. When I tried to send carriage returns in the string they appear to be stripped out.

---

<div class="post-metadata">

**Author:** ![Leo](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/leo/32/339_2.png) [@Leo](https://forum.gl-inet.com/u/Leo)\
**Post date:** [June 11, 2020, 2:33am UTC](https://forum.gl-inet.com/t/is-there-an-api-for-goodcloud/11065/7 "2020-06-11T02:33:29Z")

</div>

Could you show me your code? Is it like below?

```
ubus call mqtt pub '{"api":"/user/data", "data":"Fremont ,\n California, \n"}'

```

---

<div class="post-metadata">

**Author:** ![arsenix](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@arsenix](https://forum.gl-inet.com/u/arsenix)\
**Post date:** [June 11, 2020, 3:43am UTC](https://forum.gl-inet.com/t/is-there-an-api-for-goodcloud/11065/8 "2020-06-11T03:43:31Z")

</div>

This is the code, called from a shell script:

> ubus call mqtt pub ‘{“api”:“/user/data”, “data”:"’“$message”‘"}’

$message is a multiline shell string collected from a few prior commands. The same string is similarly put into a JSON that gets posted to slack and does come through as multiline. I haven’t poked into it too much to see if I can get it to do the multiline with different formatting.

---

<div class="post-metadata">

**Author:** ![Leo](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/leo/32/339_2.png) [@Leo](https://forum.gl-inet.com/u/Leo)\
**Post date:** [June 11, 2020, 4:35am UTC](https://forum.gl-inet.com/t/is-there-an-api-for-goodcloud/11065/9 "2020-06-11T04:35:51Z")

</div>

this bug fixed. please force fresh the page.

---

<div class="post-metadata">

**Author:** ![arsenix](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@arsenix](https://forum.gl-inet.com/u/arsenix)\
**Post date:** [June 11, 2020, 4:53am UTC](https://forum.gl-inet.com/t/is-there-an-api-for-goodcloud/11065/10 "2020-06-11T04:53:29Z")

</div>

Great! Confirm that it was fixed. Thank you for looking into this!

---

<div class="post-metadata">

**Author:** ![Leo](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/leo/32/339_2.png) [@Leo](https://forum.gl-inet.com/u/Leo)\
**Post date:** [September 20, 2024, 1:50am UTC](https://forum.gl-inet.com/t/is-there-an-api-for-goodcloud/11065/12 "2024-09-20T01:50:23Z")

</div>


