Difference between revisions of "NPS-API"
(29 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | {{#seo: | ||
+ | |title=API | ||
+ | |titlemode=append | ||
+ | |keywords=NPS-API, API, Vehicle database, Twitter, NP Tracker suspect vehicles, NP Tracker, Suspect vehicle, Crime-fighting, Crime, numberplate, number plate | ||
+ | |description=API interface to do vehicle lookups and vehicle type checks on the NP Tracker database | ||
+ | }} | ||
[[File:Datasheet250.png|200px|thumb|right|Datasheet250 NPS-API NP Tracker suspect vehicle API interface]]<br> | [[File:Datasheet250.png|200px|thumb|right|Datasheet250 NPS-API NP Tracker suspect vehicle API interface]]<br> | ||
+ | {{API|1=This is the developer's corner to aid in integrating our RESTful API into their apps.}} | ||
+ | For a high-speed client-side application interface see our [[NPS-API Webservice]]. | ||
+ | == Interface == | ||
+ | This is a [[REST API]] endpoint using HTTP GET.<br> | ||
+ | Available to any device/server on the internet.<br> | ||
+ | == Usage == | ||
+ | To use this endpoint you will need a valid [[API Key]] available after registration on [[NPS-CLOUD]].<br> | ||
+ | See our [https://api.nptracker.co.za/docs/ API documentation page] for advanced help and examples on using this endpoint. | ||
+ | === Parameters === | ||
+ | ==== cmd ==== | ||
+ | Command to execute ie. add,demo,ping,nps,mute,unmute | ||
+ | ===== add ===== | ||
+ | Add a new lookout report for the supplied <i>str</i> vehicle registration numberplate. | ||
+ | ===== demo ===== | ||
+ | ===== ping ===== | ||
+ | |||
+ | ===== nps ===== | ||
+ | Test the supplied <i>str</i> vehicle registration numberplate. | ||
+ | ===== mute ===== | ||
+ | Mute the <i>str</i> vehicle registration numberplate and <strong>DON't</strong> provide a lookout report for this plate. | ||
+ | ===== unmute ===== | ||
+ | Unmute the <i>str</i> vehicle registration numberplate and provide a lookout report for this plate again. | ||
+ | |||
+ | ==== str ==== | ||
+ | Parameter to use for: | ||
+ | * Number plate to test(NPS)/mute/unmute | ||
+ | * Lookout report to be added ensure that the plate is in the lookout to ensure correct detection. | ||
+ | |||
+ | ==== token ==== | ||
+ | This is your [[NPS-CLOUD]] account access token ([[API Key]]) available under the NPS-API menu in your NPS-CLOUD account. | ||
+ | |||
+ | ==== id ==== | ||
+ | Provide a numerical value to the endpoint that will be echoed in the JSON reply. | ||
+ | |||
+ | ==== trim ==== | ||
+ | Used for trimming the desc output to the number of characters provided ensuring that lookouts will not be longer than the provided value.<br> | ||
+ | |||
+ | ==== history ==== | ||
+ | Only show reports not exceeding the provided value in months.<br> | ||
+ | This is used if you are only interested in the latest reports from the NP Tracker suspect and suspicious vehicle database. | ||
+ | |||
+ | == Output == | ||
+ | We provide a JSON formatted output of the results available from this API endpoint. | ||
+ | [[File:NP-API JSON.png|400px|thumb|right|NPS-API JSON output]] | ||
+ | === id === | ||
+ | Echo the supplied id parameter in the JSON result back to the calling program. | ||
+ | |||
+ | === response_ms === | ||
+ | Show the script's response time in milliseconds from the initial request to the display of results. | ||
+ | |||
+ | === plate === | ||
+ | The vehicle number plate the report will relate to. | ||
+ | |||
+ | === desc === | ||
+ | The Vehicle lookout report is as per the NP Tracker dataset.<br> | ||
+ | Report length can be trimmed to a specified length with the <u>trim</u> parameter.<br> | ||
+ | Each message picked up will be delimited with '''<strong>**@**</strong>'''. | ||
+ | |||
+ | === last_date === | ||
+ | The timestamp of the latest (last) report for the vehicle. | ||
+ | |||
+ | === report_date === | ||
+ | The timestamp of the first report for the vehicle. | ||
+ | |||
+ | === result === | ||
+ | Always returns a true. | ||
+ | |||
+ | === version === | ||
+ | The version of the API endpoint. |
Latest revision as of 09:38, 31 May 2023
This is the developer's corner to aid in integrating our RESTful API into their apps. |
For a high-speed client-side application interface see our NPS-API Webservice.
Contents
Interface
This is a REST API endpoint using HTTP GET.
Available to any device/server on the internet.
Usage
To use this endpoint you will need a valid API Key available after registration on NPS-CLOUD.
See our API documentation page for advanced help and examples on using this endpoint.
Parameters
cmd
Command to execute ie. add,demo,ping,nps,mute,unmute
add
Add a new lookout report for the supplied str vehicle registration numberplate.
demo
ping
nps
Test the supplied str vehicle registration numberplate.
mute
Mute the str vehicle registration numberplate and DON't provide a lookout report for this plate.
unmute
Unmute the str vehicle registration numberplate and provide a lookout report for this plate again.
str
Parameter to use for:
- Number plate to test(NPS)/mute/unmute
- Lookout report to be added ensure that the plate is in the lookout to ensure correct detection.
token
This is your NPS-CLOUD account access token (API Key) available under the NPS-API menu in your NPS-CLOUD account.
id
Provide a numerical value to the endpoint that will be echoed in the JSON reply.
trim
Used for trimming the desc output to the number of characters provided ensuring that lookouts will not be longer than the provided value.
history
Only show reports not exceeding the provided value in months.
This is used if you are only interested in the latest reports from the NP Tracker suspect and suspicious vehicle database.
Output
We provide a JSON formatted output of the results available from this API endpoint.
id
Echo the supplied id parameter in the JSON result back to the calling program.
response_ms
Show the script's response time in milliseconds from the initial request to the display of results.
plate
The vehicle number plate the report will relate to.
desc
The Vehicle lookout report is as per the NP Tracker dataset.
Report length can be trimmed to a specified length with the trim parameter.
Each message picked up will be delimited with **@**.
last_date
The timestamp of the latest (last) report for the vehicle.
report_date
The timestamp of the first report for the vehicle.
result
Always returns a true.
version
The version of the API endpoint.