NPS-API Webservice

From NP Tracker projects
Revision as of 07:58, 18 April 2019 by NPTracker (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

High volume number plate testing against the NP Tracker suspect and suspicious vehicle database.

Webservice

Webservice is a computer communications protocol, providing full-duplex communication channels over a single TCP connection.
The Webservice protocol enables interaction between a client-side application and a web server with lower overheads, facilitating real-time data transfer from and to the server. This is made possible by providing a standardized way for the server to send content to the client without being first requested by the client, and allowing messages to be passed back and forth while keeping the connection open. In this way, a two-way ongoing conversation can take place between the client and the server. The communications are done over TCP port number 40.

Commands

ping

Communication test -reply with pong- used to keep client-side connection alive send at least a command every 60 seconds.
Usage: ping

test

Command used to inquire if there is a lookout report for a specific vehicle numberplate, it will return with the plate followed by a true or false true being there is a report for the plate and false not.
Usage: test abc123gp

nps

Will return a JSON result set containing the lookout reports registered against the plate.
Usage: nps abc123gp

Example (telnet)

  • Open a connection to the server (serv.nptracker.co.za) port 40

telnet serv.nptracker.co.za 40

  • You will then be welcomed please authenticate it with your token

$> AUTH {API-Key}

  • You can now start testing plates.

$>test abc123gp

  • It will return with the plate followed by a true or false true being there is a report for the plate and false not
  • If you found a plate to get a report on just do.

$>nps abc123gp

Example (php)

see api example