The AIS Vessels endpoint retrieves real-time ship positions from the ais-relay microservice (port 8003), which maintains a persistent WebSocket connection to AISStream.io and caches the latest vessel state in memory. Unlike the military flights endpoint, which issues a single union-bbox request, the backend queries the relay once per active AOI in parallel using aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/danizd/GeoSentinel/llms.txt
Use this file to discover all available pages before exploring further.
ThreadPoolExecutor with up to 8 worker threads, then deduplicates the combined result by vessel id — keeping the first occurrence when the same vessel falls inside multiple overlapping AOIs. Staleness is determined per AOI: if any individual relay call returns an X-Stale: true response header (set when the relay’s WebSocket is disconnected and it is serving mock data), the top-level isStale flag is set to true for the entire response.
GET /v1/ais-vessels
Returns all AIS-tracked vessels currently present within any active Area of Interest bounding box. No query parameters are accepted — bounding box coordinates are derived automatically from the active AOI records in the database.
Response body
The response conforms toAISVesselsResponseDTO.
Deduplicated list of vessels observed within any active AOI. Each element is an
AISVesselDTO object.Reserved for future vessel clustering. Currently always returned as an empty array
[].true if any individual AOI relay call returned an X-Stale: true response header, meaning that at least one AOI’s vessel data was served from mock or cached state rather than a live AISStream feed.Example request
Example response
If no AOIs are marked active in the database, the backend skips all relay calls and returns an empty
AISVesselsResponseDTO — vessels and clusters will both be empty arrays and isStale will be false.The
isStale flag is set to true if any AOI’s relay query returned an X-Stale: true response header. The relay sets this header when its AISStream WebSocket connection is not active and it is falling back to mock vessel data. Stale responses should be surfaced to users with an appropriate visual indicator. The relay requires the AISSTREAM_API_KEY environment variable to establish a live connection; without it, all responses will be stale mock data.