# WebDev Module

**URL:** <https://forum.inductiveautomation.com/t/webdev-module/11716>\
**Category:** Ignition\
**Created:** [May 24, 2016, 11:06pm UTC](https://forum.inductiveautomation.com/t/webdev-module/11716 "2016-05-24T23:06:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ks0](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ks0/32/6813_2.png) [@ks0](https://forum.inductiveautomation.com/u/ks0)\
**Post date:** [May 24, 2016, 11:06pm UTC](https://forum.inductiveautomation.com/t/webdev-module/11716/1 "2016-05-24T23:06:27Z")

</div>

Hi,

We are needing to provide a JSON API to our Ignition system for our customers. The WebDev seems to be the perfect module for doing this, and after a bit of experimentation, I’m left with a couple of questions…

1. We would definitely be wanting to limit the rate of the http requests that the customer can make to our gateway for each function we create - how can we do this? Is there a setting I am missing somewhere?

2. Most of what I want to return is results from a database query (returning as a pydataset). Is there an easy way to convert this pydataset to a list of dictionaries (to then be JSON encoded)? Row by row encoding and concatenation was all I could come up with.

Any help or pointers would be greatly appreciated!! 😃

Cheers,  
Keiran

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 24, 2016, 11:18pm UTC](https://forum.inductiveautomation.com/t/webdev-module/11716/2 "2016-05-24T23:18:14Z")

</div>

Python’s dict() function can accept a list of key,value tuples. I do something like this:`pyds = system.db.runPrepQuery(....)
headings = pyds.underlyingDataset.columnNames
result = [dict(zip(headings, [x for x in row])) for row in pyds]`et Voilà, a list of dictionaries.

---

<div class="post-metadata">

**Author:** ![ks0](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ks0/32/6813_2.png) [@ks0](https://forum.inductiveautomation.com/u/ks0)\
**Post date:** [May 24, 2016, 11:30pm UTC](https://forum.inductiveautomation.com/t/webdev-module/11716/3 "2016-05-24T23:30:14Z")

</div>

Phil that is fantastic! Very much appreciated. Hopefully I can figure out this request rate and then this module is all go.

Thanks again,  
Keiran
