Control storage of the system
fs_entry:
Paging response:
Get size of metadata partition on the disk (/data partition)
path: /storage/metadata
method: GET
data:
{
"capacity_bytes": 2343242,
"occupied_bytes": 3243
}capacity_bytes - size of the partitionoccupied_bytes - how much of the partition is occupiedDisplay storage information
/storage/dataGETdisk_usage
used: used space in bytestotal: total space in bytescleanup_in_progress: true if automatic cleanup is in progressenable_metadata_cleanup: if set to true, metadata will be cleaned up together with the files as part of the automatic cleanup process; if false, only files are getting removedage_cleanup: change parameters of automatic files/meta cleanup
mode: files, meta, both, disabled
max_age_hours: files/meta older than max_age_hours are selected for the deletion
constraint: 5 < max_age_hours < 260000
check_interval_hours: how often age of files/meta is checked against the max_age_hours
constraint: 0 < check_interval_hours < 86400
example:
{
"disk_space":
{
"total": 17056493568,
"used": 15184343040
},
"cleanup_in_progress": false,
"enable_automatic_metadata_cleanup": true,
"age_cleanup":
{
"mode": "both",
"max_age_hours": 7620,
"check_interval_hours": 6
}
}Change storage configuration
/storage/dataPUTformat: json object
example:
{
"enable_automatic_metadata_cleanup": false,
"age_cleanup":
{
"mode": "both",
"max_age_hours": 7620,
"check_interval_hours": 6
}
}Display captures
page: unsigned integer (1…n), default: 1
page_count: unsigned integer, default: 5000
order: “asc” (ascending) | “desc” (descending) (default: “asc”)
data
example
{
"page":1,
"page_count":1,
"total_count":4,
"data":
[
{
"key":"d83e3d630351e1ec752711e92fedcaf977e7dc1b1aa9698f71a4cb41675049ce",
"path":"/data/captures/1.pcap",
"file_size":1508,
"start_ts":1102274184312453000,
"end_ts":1102274184312453000,
"pending_deletion": false
},
{
"key":"d83e3d630351e1ec752711e92fedcaf977e7dc1b1aa9698f71a4cb41675049cf",
"path":"/data/captures/2.pcap",
"file_size":3202,
"start_ts":1102274184317113000,
"end_ts":1102274184312453000,
"pending_deletion": false
},
{
"key":"d83e3d630351e1ec752711e92fedcaf977e7dc1b1aa9698f71a4cb41675049cg",
"path":"/data/captures/3.pcap",
"file_size":4442,
"start_ts":1102274184227453000,
"end_ts":1102274184312453000,
"pending_deletion": false
},
{
"key":null,
"path":"/data/captures/3.pcap",
"file_size":3339,
"start_ts":null,
"end_ts":null,
"pending_deletion": false
}
]
}Filter by path
Filter by time
Get pcap-ng import status
path: /storage/data/captures/imported
method: GET
Response:
{
"message":"Success",
"data":
{
"status":"success",
"message":"Successfully imported pcap-ng file."
}
}Import pcap-ng
Delete by path
Delete by time
Delete all
Extract captures
if one of the paths don’t exist, it will return 404
if the frontend is unable to send headers, token can be used instead (*):
GET /storage/data/captures/joined?token=fcfa8093cf491577d84fa8a37572cc3fstart_ts: epoch (nanoseconds): 64-bit unsignedend_ts: epoch (nanoseconds): 64-bit unsignedfrom: grafana timestamp formatto: grafana timestamp formatvar-filters and var-or*: group of filters can be specified by this parameter. Each parameter name will form a group of ANDd values. Then, each group will be ORd as a final expression.var-need_adv_filter: if set to true, then tshark will be used for filteringvar-BPF: BPF filter to be applied; zero or one fields of this name can be in the query. BPF expressions will always be ORd to the final expression.token: string (*)html_errors: bool (“true” or “false”): returns errors as HTMLpaths in header or start_ts/end_ts/from/to in arguments must be specified, but not bothpaths is not present, either start_ts or end_ts or from/to must be specified, but not bothvar-filters and var-or*: "var-filters=exp1&var-filters=exp2&var-or=exp3&var-or=exp4&var-or1=exp5" will result in "(exp1 && exp2) || (exp3 && exp4) || (exp5)"Get capture extraction token
path: /storage/data/captures/joined?get_token=true
method: POST
body:
[
"path-1",
"path-n"
]response:
{"token": "fcfa8093cf491577d84fa8a37572cc3f"}