plakar
plakar copied to clipboard
UI: provide an API call to return importer types used in a kloset
Plakar provides an API importer-types which returns all the importer types used in a Kloset:
{"total":3,"items":[{"name":"fs"},{"name":"s3"},{"name":"sftp"}]}
We want to update the UI to provide a new dashboard, displaying a summary for each source in the Kloset. Each source should contain:
- the info about the source (importer type, origin, directory)
- the info about the latest snapshot for this source
- number of snapshots for this source
The return value should be something like:
{
"total": 4,
"items": [
{
"sources": [
{
"type": "fs",
"origin": "localhost",
"directory": "/etc"
}
],
"total_snapshots": 133,
"<other useful info>": "...",
"latest_snapshot": {
"identifier": "...."
}
}
]
}
We will also need a filter on /snapshots to filter the snapshots having a given source.
Before implementing this endpoint, please let us know how you want to handle multi-sources snapshots: should we have one entry in the result, or should we duplicate the snapshots for each source?