8. Tags

You can get a list of tags, either the most used by public sensors or by a sensor query.

8.1. Querying Sensor Tags

A list of matching tags. The query parameters are as follows:

Name Value Description
scope
all-all tags used by sensors that the current user has access to; | subscribed-tags for sensors the user has subscribed to; | contributed-tags for sensors the user has contributed to the system.
private
true - private sensors only; false - public only
(Deprecated, use visibility instead)
visibility filter by the visibility of the sensors, either of public, organization or private
text text to search in the sensors’s name, long name and description
active when true, only returns tags for sensors that have been updated in the last 15 minutes.
offset offset into list of tags for paging
limit limit to show for paging. The maximum number of tags to display is 1000.
location
geo coordinates for a bounding box to search within.
Format is yy.yyy,xx.xxx:yy.yyy,xx.xxx, the order of the coordinates are North,West:South,East. Example: location=56.89,-114.55:17.43,-106.219

To query for tags, add query parameters after the sensors URL as follows:

URL http://wotkit.sensetecnic.com/api/tags?{query}
Privacy Public or Private
Format json
Method GET
Returns On error, an appropriate HTTP status code; On success, OK 200 and a list of tag count objects matching the query.

example

curl --user {id}:{password}
"http://wotkit.sensetecnic.com/api/sensors/tags?text=bicycles"

Output:

[
        {
                'name': 'bicycle',
                'count': 3,
                'lastUsed': 1370887340845
        },{
                'name': 'bike',
                'count': 3,
                'lastUsed': 1350687440754
        },{
                'name': 'montreal',
                'count': 1,
                'lastUsed': 1365857340341
        }
]

The lastUsed field represents the creation date of the newest sensor that uses this tag.

Project Versions

Table Of Contents

Previous topic

7. Sensor Control Channel: Actuators

Next topic

9. Users

This Page