Seantinel / kraken API
The backend service for the Seantinel Project built with NodeJS
Main Features:
- Supports Real-time Updates via Websockets using Socket.io
- Supports REST API endpoints
- Open, Cross-Origin Request Enabled.
Documentation
The complete project documentation can be found here:
Development:
with yarn:
Install Dependencies
Development:
Build:
with npm:
Installation:
Development:
Build:
REST API Endpoints:
/incidents
[GET] gives a list of incidents and reports available in the system
You can also search all incidents using the following endpoint.
[GET]/incidents/search
Required Parameters:query
- (String) the system will provided the closest match using a fuzzy search algorithm/
Sample Response:
/devices
[GET] Gives a list of all unique devices that is part of the network
you can also search devices that are registered in the system using:
[GET]/devices/search
Required Parameters:query
- (String) the system will provided the closest match using a fuzzy search algorithm
Sample Response:
/analytics
[GET] Gives an overview of data sorted by date. also contains a list and information of other fishery management areas.
Get more specific pieces of data:
/analytics/incidents/overview
/analytics/incidents/complete/
Date Search: -/analytics/incidents/date-search
Search data about recorded incidents and filter them by date.
Required parameters:
fma
- if not provided or invalid the all incidents data will be search and returned.startDate
- Start date of search (required).endDate
- End date of earch (required).
Sample Response:
Real-time Events
You can connect to the web socket server and get an instant stream of data from the service once an update occurs, you can do this by using the Socket.io Framework. this is available in multiple languages like JavaScript and Python, it can also be done both on the client and server-side.
Example connection from the client-side in a React Application using the socket.io-client
package: