Difference between revisions of "NPS-API Webservice"

From NP Tracker projects
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 +
High volume number plate testing against the NP Tracker suspect and suspicious vehicle database.
 
== Webservice ==
 
== Webservice ==
 
Webservice is a computer communications protocol, providing full-duplex communication channels over a single TCP connection.<br>
 
Webservice is a computer communications protocol, providing full-duplex communication channels over a single TCP connection.<br>
 
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 <strong>40</strong>.<br>
 
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 <strong>40</strong>.<br>
 +
=== Commands ===
 +
==== ping ====
 +
Communication test -reply with pong- used to keep client-side connection alive send at least a command every 60 seconds.<br>
 +
Usage: <strong>ping</strong>
 +
==== 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.<br>
 +
Usage: <strong>test abc123gp</strong>
 +
==== nps ====
 +
Will return a JSON result set containing the lookout reports registered against the plate.<br>
 +
Usage: <strong>nps abc123gp</strong>
 
=== Example (telnet) ===
 
=== Example (telnet) ===
 
* Open a connection to the server (serv.nptracker.co.za) port 40
 
* Open a connection to the server (serv.nptracker.co.za) port 40
Line 12: Line 23:
 
* If you found a plate to get a report on just do.
 
* If you found a plate to get a report on just do.
 
$><strong>nps abc123gp</strong>
 
$><strong>nps abc123gp</strong>
 +
=== Example (php) ===
 +
see [http://api.nptracker.co.za/phpexample.html api example]

Latest revision as of 07:58, 18 April 2019

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