# Using external APIs

**URL:** <https://mangoh.discourse.group/t/using-external-apis/5767>\
**Category:** mangOH Yellow\
**Created:** [December 2, 2020, 8:03pm UTC](https://mangoh.discourse.group/t/using-external-apis/5767 "2020-12-02T20:03:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lisaflesch](https://avatars.discourse-cdn.com/v4/letter/l/a698b9/32.png) [@lisaflesch](https://mangoh.discourse.group/u/lisaflesch)\
**Post date:** [December 2, 2020, 8:03pm UTC](https://mangoh.discourse.group/t/using-external-apis/5767/1 "2020-12-02T20:03:41Z")

</div>

I have a mangOH yellow that I set up using these instructions:

> **[mangOH/mangOH](https://github.com/mangOH/mangOH/wiki/Building-the-Legato-%22system%22-(apps)-for-mangOH-Yellow)**
>
> Primary mangOH git repository. Contribute to mangOH/mangOH development by creating an account on GitHub.

Now, I am trying to interface with the existing apps on the device, like DataHub and the environmental sensor. It seems like I can’t compile my app with the bindings referencing the external API. I get an error that the server API does not exist.

I also tried adding “#include 'yellow.sdef” to bundle the yellow sdef with mine. I then hit an error  
“fatal error: bsec\_interface.h: No such file or directory”  
It seems that trying to compile the yellow system outside using the “make yellow” command in leaf shell does not work.

So, then I tried compiling just my app alone. It seemed to compile and install on the device, however the API calls aren’t actually doing anything. The component that connects to the API doesn’t seem to be failing to run, but it it isn’t doing anything else either.

Anyone know what the trick to using external APIs is?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [December 2, 2020, 11:56pm UTC](https://mangoh.discourse.group/t/using-external-apis/5767/2 "2020-12-02T23:56:10Z")

</div>

Can you attach an example to reproduce this issue?

Do you mean a hello world app cannot have a IPC communication with datahub app?

---

<div class="post-metadata">

**Author:** ![lisaflesch](https://avatars.discourse-cdn.com/v4/letter/l/a698b9/32.png) [@lisaflesch](https://mangoh.discourse.group/u/lisaflesch)\
**Post date:** [December 3, 2020, 2:17pm UTC](https://mangoh.discourse.group/t/using-external-apis/5767/3 "2020-12-03T14:17:38Z")

</div>

Lets say you tried to load a hello world app that uses DataHub. If you build and install it separately, after DataHub is already installed, it does not seem to interface properly.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [December 3, 2020, 3:55pm UTC](https://mangoh.discourse.group/t/using-external-apis/5767/4 "2020-12-03T15:55:04Z")

</div>

Can you attach a helloworld sample?  
I have mangoh red board running datahub

> **[DataHub - API calls high CPU usage](https://forum.legato.io/t/datahub-api-calls-high-cpu-usage/5526/2)**
>
> how to reproduce the issue step by step? I tried on WP76 with the mangoh source, I don’t see 20% cpu load: root@swi-mdm9x28-wp:~# app status | grep data \[running\] dataConnectionService \[running\] dataHub root@swi-mdm9x28-wp:~# ...
