Empty result obtained from REST API


#1

Hi brocaar. We’ve got the response but the result[] in JSON seemed to be empty.Please save the day again :stuck_out_tongue:

This is the response attained in POSTMAN.


#2

See

You need to provide the limit parameter, e.g. ?limit=10.


#3

Hi brocaar. Thanks for this wonderful setup its a marvelous server you have made. Thanks much. Thanks for the perfectly well laid out documentation and unbounded open source knowledge. I’m moving on to creating an application now and hitting this URL.


#4

I have done the same but still getting empty result, also on the UI built over this. Attached below is the screenshot of api response.


#5

hi guys,
Is the problem solved?


#6

A while ago I’ve fixed one issue in the API related to count and result mismatch. If the issue still persists when using the latest version, than there might be an other issue. However, I would need some input to reproduce the issue in that case :slight_smile:


#7

Hello,

I have the same problem on a fresh installation (I used apt-get install method on Ubuntu)
Everything works fine, I receive data from my devices.

On my database there is 1 organization, 1 application, 1 gateway and 2 devices.

Only problem the API replies with empty result on Arrays (example list devices), but the count is correct

{
“totalCount”: “2”,
“result”: []
}


#8

You need to provide a limit, by default this is 0 thus no result is returned.


#9

OK, I confirm it works!

Thank you!