# Passing parameters via platform.api.get

**URL:** <https://community.dreamfactory.com/t/passing-parameters-via-platform-api-get/586>\
**Category:** Server-Side Scripting\
**Created:** [November 26, 2014, 5:06am UTC](https://community.dreamfactory.com/t/passing-parameters-via-platform-api-get/586 "2014-11-26T05:06:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![portado](https://avatars.discourse-cdn.com/v4/letter/p/51bf81/32.png) [@portado](https://community.dreamfactory.com/u/portado)\
**Post date:** [November 26, 2014, 5:06am UTC](https://community.dreamfactory.com/t/passing-parameters-via-platform-api-get/586/1 "2014-11-26T05:06:59Z")

</div>

Title just about sums it up. How can I pass GET data in a url through the platform.api.get call?

For example, running the getRecordsByFilter function through swagger on one of my tables will send the data to the correct table and include a “filter” member to the event request. I can also accomplish this by running a GET query using postman and using the /db/Sites?filter=FILTERSTR format.

What I cannot do is seem to do this with the platform.api.get call.  
I’ve tried doing platform.api.get(‘db/Sites?filter=FILTERSTR’) which confuses the system into thinking that whole thing is my table name.

I’ve tried using platform.api.get(‘RDSdb/Sites’, JSON.stringify(params)) as well and that usually ends up with DSP trying to use my object as an id, which is obviously wrong.

What can I do to get this working?

---

<div class="post-metadata">

**Author:** ![toddappleton](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/toddappleton/32/159_2.png) [@toddappleton](https://community.dreamfactory.com/u/toddappleton)\
**Post date:** [November 27, 2014, 1:49pm UTC](https://community.dreamfactory.com/t/passing-parameters-via-platform-api-get/586/2 "2014-11-27T13:49:14Z")

</div>

This appears to be a bug. We are looking into it.

---

<div class="post-metadata">

**Author:** ![toddappleton](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/toddappleton/32/159_2.png) [@toddappleton](https://community.dreamfactory.com/u/toddappleton)\
**Post date:** [December 1, 2014, 6:39pm UTC](https://community.dreamfactory.com/t/passing-parameters-via-platform-api-get/586/3 "2014-12-01T18:39:11Z")

</div>

Try this:

platform.api.get(‘db/Sites’, {‘filter’:FILTERSTR})

---

<div class="post-metadata">

**Author:** ![antonyjsmith](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/antonyjsmith/32/1203_2.png) [@antonyjsmith](https://community.dreamfactory.com/u/antonyjsmith)\
**Post date:** [December 2, 2014, 12:17pm UTC](https://community.dreamfactory.com/t/passing-parameters-via-platform-api-get/586/4 "2014-12-02T12:17:44Z")

</div>

Here’s an example of a query I’ve built for server side scripting which works and might help with the syntax:

```
var queryString = 'foo';
var filter_data = {"fields": "myField" , "filter": "anotherField='" +queryString+ "'"};
var request = platform.api.get("sql/data_table",filter_data);
```
