Skip to content

REST API Reference

All endpoints are under /api/ and return JSON.

Search the catalog.

ParameterTypeDefaultDescription
qstringFilename search query (FTS5)
serverstringFilter by NFS server
formatstringFilter by sonar format
hashstringSearch by content hash
min_sizeintMinimum file size (bytes)
max_sizeintMaximum file size (bytes)
limitint100Max results
offsetint0Pagination offset

Response: Array of file objects.

[
{
"content_hash": "6017380fd98a...",
"file_name": "swath_251.xtf",
"file_size": 479391423,
"sonar_format": "xtf",
"nfs_server": "sonar-nas-01",
"nfs_export": "/export/sonar",
"canonical_path": "sonar-nas-01:/export/sonar/coastal/swath_251.xtf",
"access_path": "/mnt/sonar-nas-01/export/sonar/coastal/swath_251.xtf",
"mtime": "2024-08-02T15:29:33",
"discovered_at": "2026-02-12 21:29:33"
}
]

Get file info and all locations for a content hash.

Response:

{
"file": { ... },
"locations": [
{
"canonical_path": "nas01:/export/survey/line_001.xtf",
"access_path": "/mnt/nas01/export/survey/line_001.xtf",
"nfs_server": "nas01",
"is_local": false
},
{
"canonical_path": "nas02:/backup/survey/line_001.xtf",
"access_path": "/mnt/nas02/backup/survey/line_001.xtf",
"nfs_server": "nas02",
"is_local": false
}
]
}

Find duplicate files.

ParameterTypeDefaultDescription
min_countint2Minimum location count
limitint50Max results

Get catalog statistics.

Response:

{
"unique_files": 12847,
"total_locations": 19283,
"unique_bytes": 4523456789012,
"nfs_servers_with_data": 8,
"nfs_locations": 19283,
"local_locations": 0,
"sonar_formats": 6,
"total_hosts": 12,
"accessible_hosts": 8
}

List discovered hosts with file counts.

Response:

[
{
"ip": "192.168.1.10",
"hostname": "sonar-nas-01",
"method": "autofs",
"ssh": true,
"last_scan": "2026-02-12 15:30:00",
"status": "complete",
"files": 4521
}
]

Get distinct NFS server names (for filter dropdowns).

Response: ["sonar-nas-01", "sonar-nas-02", "backup-nas"]

Get distinct sonar formats (for filter dropdowns).

Response: ["all", "bag", "jsf", "kmall", "s7k", "xtf"]


Get file locations as map points for the globe view.

ParameterTypeDefaultDescription
lat_minfloatSouthern bound
lat_maxfloatNorthern bound
lon_minfloatWestern bound
lon_maxfloatEastern bound
formatstringFilter by sonar format
limitint10000Max points

Response:

[
{
"content_hash": "6017380fd98a...",
"file_name": "swath_251.xtf",
"file_size": 479391423,
"sonar_format": "xtf",
"lat": 28.0005,
"lon": -89.9985
}
]

Get the full navigation track for a file.

Response:

{
"content_hash": "6017380fd98a...",
"track": [[28.0, -90.0], [28.001, -89.999], [28.002, -89.998]],
"lat_min": 28.0,
"lat_max": 28.002,
"lon_min": -90.0,
"lon_max": -89.998,
"point_count": 342
}

Get the overall geographic extent of all files with nav data.

Response:

{
"lat_min": -18.5,
"lat_max": 62.5,
"lon_min": -90.0,
"lon_max": 147.5,
"file_count": 847
}