Web-service API

Polaric-APRSD accept HTTP requests on port 8081 by default (port is configurable), It is also possible to configure the Apache webserver to act as a proxy for this, so that all HTTP requests to the server-side can go through the standard HTTP port (80). Servers where this is done do therefore not normally need to expose port 8081 externally.

The URL identifies the resource (or service) to be invoked. For REST APIs, the URL identifies the resource and the operation to be performed on it is determined by the HTTP method: GET (read object), PUT (update), POST (add, post), DELETE (remove it).

On aprs.no an Apache proxy is used, it adds a prefix 'srv', so if the server is located at aprs.no, services are called with the URL 'http://aprs.no/srv/<service>' . One can use URL parameters, or, if using the POST or PUT method, parameters (typically JSON enoded) in the message body.

Most services will require authorization: O=open, L=login, S=SAR, A=admin.

If you are deveoping a client app, i'll be happy to hear about it. The API described here may change..

Websocket services

/jmapdata WebsocketO,SRequest a websocket for real-time overlay updates.
/notify WebsocketLRequest a websocket for notifications, etc. A generic publish/subscribe service (development).

REST API services

System/misc. services:

/authStatus GETJSONOGet authorization info. Returns AuthInfo object (see jmapdata service)
/groups GETJSONAReturn a list of groups (group-id, group-name)
/users GETJSONAGet the list of users (userid, last used time)
/users/ {id} GETJSONAGet info about a given user.
PUTJSONAUpdate info about a given user
DELETE ARemove a user
/usernames GETJSONAGet a list of users (just userids)
/system/tags GETJSONOGet tags used
/system/ownpos GETJSONAGet position info of this server (symbol, latlong pos)
PUTJSONAUpdate position info of this server (symbol, latlong pos)
/system/sarmode GETJSONSSAR mode info. null means SAR mode is off.
PUTJSONSUpdate SAR mode info. null means SAR mode is turned off.
/system/icons/{directory} GETJSONOList of icons available in a subdirectory. 'default' is root icon dir.
/item/{id}/alias GETJSONSAlias for tracker with id (callsign). null means no alias.
PUTJSONSSet alias for tracker with id (callsign). null means no alias.
/item/{id}/trail GETJSONOGet trail of moving tracker. List of points.
/item/{id}/reset PUTJSONSReset trail and other info about item
//item/{id}/chcolor PUTJSONSChange color of trail.
/item{id}/tags GETJSONOGet list of tags set on an item
POSTJSONSAdd a tag to an item
/item/{id}/tags/{tag} DELETE SRemove a tag
/items GETJSONOSearch items. Takes query parameters: tags (list of tags) and srch (free text). Returns list of items

Own APRS objects (generated by this server):

/aprs/objects GETJSONSGet the list of active objects (owned by this server)
POSTJSONSAdd object.
/aprs/objects/{id} PUTJSONSUpdate object
/aprs/objects/{id} DELETE SRemove object

Short messages (mailbox):

/mailbox GETJSONLGet content of mailbox - list of messages
/mailbox POSTJSONLSend (post) a message
/mailbox/{msg-id} DELETE LDelete a message from inbox or outbox.

APRS Bulletins:

/bullboard/groups GETJSONOList of active bulletin groups.
/bullboard/{group-id} /senders GETJSONOList of callsigns of senders to a given group
/bullboard/{group-id} /messages/{sender} GETJSONOBulletins from a given sender in a given group.

SAR (Search and rescue):

/sar/ipp GETJSONLGet a list of IPPs (with diistance rings) for user.
/sar/ipp/{ident} GETJSONLGet a specific IPP
/sar/ipp POSTJSONLAdd a IPP (with distance rings)
/sar/ipp/{ident} PUTJSONLUpdate a IPP
/sar/ipp/{ident} DELETEJSONLDelette a IPP

Services offered by database plugin (running on aprs.no instance):

/hist/{ident}/trail GETJSONOGet historical trail for a given callsign. Time parameters: ?tfrom=…&tto=…
/hist/{ident}/hrdvia GETJSONOGet points heard for a given digi/igate callsign. Time parameters: ?tfrom=…&tto=…
/trackers GETJSONSGet a list of “my trackers” for the user.
POSTJSONSSave/update a tracker for the user. Return 'OK' or 'OK-ACTIVE'
/trackers/{id} DELETE SRemove a tracker for the user.
/signs GETJSONSGet all signs
/signs/ {id} PUTJSONSUpdate a sign
DELETEJSONSDelete a sign
/objects/{tag} GETJSONLList of (JSON) objects for the user. Tag is a freely chosen keyword.
POSTJSONLAdd an object for the user. Return an id for the object.
/objects/{tag}/{oid} DELETE LDelete an object.
/files/gpx POSTGPXLUpload a file (GPX format). Return an id for the file.
/files/gpx/{id} GETGPXLDownload a file (GPX format).
DELETE LRemove a file

Login service

Two services are available for login/logout. Successful login will create a session on the server (represented by a cookie). Logout will remove that session. Using HTTPS protocol is strongly recommended for servers that are widely available on the internet.

/formLogin?origin={url} HTML formLogin to server with username and password. Browser is redirected to {url} after sucessful login
/logout?url={url} Logout. Browser is redirected to {url} after successful logout.

Other services

These are not RESTful. Most of them can be used with GET and POST methods. HTML forms have a button that submit a POST request to perform some update on the server. Many of the following services will probably be replaced with REST methods consuming or returning JSON encoded data.

  • finditem . Comma separated list. Look up a station/object and return id, x and y coordinates.
  • station, HTML form, show information about station or object [O, L, S]
  • trailpoint. HTML fragment. Show info about a specific position report in a trail for a station [O].
  • admin. HTML page. Show server configuration info [A].
  • telemetry. HTML. Show telemetry for a station [O].
  • telhist. HTML. Show telemetry history for a station [O].

Admin/configuration web-interface. All these needs admin authorization except the first that can be used with SAR authorization (from v. 2.1). Services with prefix 'config' comes with a menu on the left side.

  • config_menu. HTML. Shows a menu and the first choice (in a iframe): A status page for the server.
  • config_clients. HTML. List of of active clients (with websocket connections).
  • config_users. HTML. List of users of the system with last used time.
  • config. HTML form. The main configuration of aprsd. Callsign, users, channels, igate, etc..
  • config_mapdisplay. HTML form. Settings related to showing tracks on map.
  • config_posreport. HTML form. Using the Polaric APRSD as a tracker that send position reports.
  • config_chan. HTML form. Config of channels (channel type is a request parameter).
  • passwd. HTML form. Set password.
  • restartserver. HTML. Restart aprsd.
xmloverlay.txt · Last modified: 2021/09/15 20:51 by la7eca
CC Attribution-Share Alike 4.0 International
Powered by PHP Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 Valid HTML5