Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

RESTful API

salendron edited this page · 6 revisions

Back to start

This Plugin allows others to query data of the system using a RESTful API. At the moment you can query downloads and tags.

/api/tags

This Url lets you query tag data as a JSON of Tags. A tag consists of the following fields.

  • id: Id (unique)
  • name: Tag name
  • layer: Tag layer
  • clicks: Count of downloads using this tag
  • lat: Latitude
  • lon: Longitude
  • geofence_radius: Radius of Geofence in meter. Does nothing if geofence_enabled = 0!
  • geofence_enabled: 0 or 1 (on or off)
  • current_content_id: Long alphanumeric unique id of content. Example: *908BE2B7EB7D7567F7FF98716850F59BA69AA9DB

Parameters (optinal)

  • layer: Tag layer
  • box: All returned tags have to be inside this box - Format = lat1,lon1,lat2,lon2 – Default = All tags
  • order: Tags can be sorted by name,clicks or layer
  • orderAsc: Sortorder - Possible values: true, false – Default = true

Example

http://pingeb.org/api/tags?order=clicks&orderAsc=false

/api/downloads

This Url lets you query all downloads as a JSON of downloads. A download consists of the following fields.

  • time: date and time of the download
  • type: NFC or QR
  • tagname: Tag name
  • lat: Latitude
  • lon: Longitude
  • os: Operating system

Parameters (optinal)

  • from: Min. date - Format = yyyy-mm-dd hh24:mi:ss
  • to: Max. date - Format = yyyy-mm-dd hh24:mi:ss
  • page: Default = 1
  • pageSize: Default = 100 – Maximum = 1000

JSONP

All API calls can also be used as JSONP calls. To do so just replace /api with /apip

  • /apip/downloads
  • /apip/tags

GeoJSON

You can also query downloads and tags as GeoJSON format

  • /api/downloadsGeoJSON
  • /api/tagsGeoJSON
Something went wrong with that request. Please try again.