# Developer Web API Playground - Notes of geeky oneliners

**URL:** <https://community.homey.app/t/developer-web-api-playground-notes-of-geeky-oneliners/24392>\
**Category:** Developers\
**Created:** [January 13, 2020, 9:08pm UTC](https://community.homey.app/t/developer-web-api-playground-notes-of-geeky-oneliners/24392 "2020-01-13T21:08:40Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [January 13, 2020, 9:08pm UTC](https://community.homey.app/t/developer-web-api-playground-notes-of-geeky-oneliners/24392/1 "2020-01-13T21:08:40Z")

</div>

For the developers and geeks that want to investigate their Homey’s config.

Run from [Homey Developer Tools](https://developer.athom.com/tools/api-playground)

I write this to remember what I did but also to inspire others that I know are better JS developer that can do more magic. (and hope they share to inspire!)

WARNING: Be Careful! you can ruïne your config by deleting the wrong objects from there! Only use it if you know what you are doing !

```
// Get Trigger counts for Flows
Homey.flow.getFlows().then(f => Object.values(f).reduce((r,b)=>Object.assign(r, {[b.name]:b.triggerCount}), {}));

// Get broken flows
// Run and search for the result true
Homey.flow.getFlows().then(f => Object.values(f).reduce((r,b)=>Object.assign(r, {[b.name]:b.broken}), {}));

// Or Get broken flows
// Run and only the broken flows are returned ;-)
Homey.flow.getFlows().then(f => Object.values(f).reduce((r,b)=> Object.assign(r, b.broken ? {[b.name]:b.broken} : ''), {}) );

// Search for disabled flows: by Le_Cactus
Homey.flow.getFlows().then(f => Object.values(f).reduce((r,b)=>Object.assign(r, {[b.name]:b.enabled}), {}));

// Get All installed Apps with versions
Homey.apps.getApps().then(f => Object.values(f).reduce((r,b)=>Object.assign(r, 
{[b.name]:b.version}), {}));

// Get Available Updates for Apps in AppStore
Homey.apps.getApps().then(f => Object.values(f).reduce((r,b)=>Object.assign(r, {[b.name]:b.updateAvailable}), {}));

// Get Devices Names and IDs for Towanda
Homey.devices.getDevices().then(f => Object.values(f).reduce((r,b)=>Object.assign(r,{[b.name]:b.id}), {}));

// List Zone names and parent
Homey.zones.getZones().then(f => Object.values(f).reduce((r,b)=>Object.assign(r, {[b.name]:b.parent}), {}));;

// Get list all Apps with Auto Update setting
Homey.apps.getApps().then(f => Object.values(f).reduce((r,b)=>Object.assign(r, {[b.name]:b.autoupdate}), {}));

// Get list Auto Update list disabled
Homey.apps.getApps().then(f => Object.values(f).reduce((r,b)=>Object.assign(r, !b.autoupdate ? {[b.name]:b.autoupdate} : '' ), {}));

// Get list Auto Update list enabled
Homey.apps.getApps().then(f => Object.values(f).reduce((r,b)=>Object.assign(r, b.autoupdate ? {[b.name]:b.autoupdate} : '' ), {}));

// Disable Auto Update on All Apps
Homey.apps.getApps().then(f => Object.values(f).reduce((r,b)=>Object.assign(r, b.autoupdate ? Homey.apps.updateApp( { id : b.id , "app" : { "autoupdate" : false }} ) : {[b.name]:b.autoupdate}), {}));

// Disable All Apps
// Homey.apps.getApps().then(f => Object.values(f).reduce((r,b)=>Object.assign(r, b.enabled ? Homey.apps.disableApp( { id : b.id} ) : {[b.name]:b.enabled}), {}));

// Enable All Apps
Homey.apps.getApps().then(f => Object.values(f).reduce((r,b)=>Object.assign(r, !b.enabled ? Homey.apps.enableApp( { id : b.id} ) : {[b.name]:b.enabled}), {}));

// Some ZigBee Queries Online devices:
// online receiveWhenIdle name modelId type 
Homey.zigBee.getState().then(f => Object.values(f.nodes).reduce((r,b)=> Object.assign(r, b.online ? {[b.name]:b.type} : ''), {}) );
// receiveWhenIdle => name 
Homey.zigBee.getState().then(f => Object.values(f.nodes).reduce((r,b)=> Object.assign(r, b.receiveWhenIdle ? {[b.name]:b.type} : ''), {}) );
// receiveWhenIdle => modelId
Homey.zigBee.getState().then(f => Object.values(f.nodes).reduce((r,b)=> Object.assign(r, b.receiveWhenIdle ? {[b.modelId]:b.type} : ''), {}) );
```

---

_[View the full topic](https://community.homey.app/t/developer-web-api-playground-notes-of-geeky-oneliners/24392)._
