Back to Smartcitizen.me

Tag Request Netherlands

Hallo (Dutch for Hello), requesting a tag to be able to select all devices in the Netherlands.

Kind regards,
Nord-Jan Vermeer

Hi!
Here it is!
https://api.smartcitizen.me/tags/133

Hoi (Dutch for Hi),
thanks very much for creating this tag so fast.
However, if I apply it, there seem to be no devices in the Netherlands, and we know there are, around 235. So, I might have suggested the wrong tag. Should it be “The Netherlands”? Can it be changed, so all devices in the Netherlands are shown?
Cheers,
Nord

Hi @n.vermeer

So tags are set manually for each device, but they don’t serve “geofiltering”.

Currently, the way to get all devices from “The Netherlands” is to do:

  1. Make a query for a Global search (devices and users):
    Paginated: https://api.smartcitizen.me/v0/search?q=Netherlands (using next and per_page in future requests)
    Or all: https://api.smartcitizen.me/v0/search?q=Netherlands&per_page=2000
  2. Filter the response by type (user or device)

Note: this should be supported in the “Basic search”, but it’s currently not. I have added an internal ticket for that: Add country to ransackable attributes of device · Issue #433 · fablabbcn/smartcitizen-api · GitHub