feat: add a new API capability that returns the details of a single file #1465
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently we have the
GET /files/<project_id>/endpoint, that returns the full list metadata of project files, but we do not have a mechanism to get the metadata of a single file. Sometimes we need the metadata of a single file instead of everything.So a new endpoint is introduced
GET /files/metadata/project_id/filename/Example response :
{ "name": "example.qgs", "size": 70989, "uploaded_at": "2025-12-11T12:45:13.814867+01:00", "is_attachment": false, "md5sum": "b6073c9090ade803b27ebea246d05dc0", "last_modified": "11.12.2025 11:46:37 UTC", "sha256": "b90038f2c92e4f467ffc35d2340fe8474cb37fc59df101014080701c8706796d", "versions": [ { "version_id": "889e2e7b-b737-45a5-bd86-305bf47c1480", "md5sum": "b6073c9090ade803b27ebea246d05dc0", "size": 70989, "uploaded_at": "2025-12-11T12:46:37.777819+01:00", "display": "v20251211114637", "is_latest": true, "last_modified": "11.12.2025 11:46:37 UTC", "sha256": "b90038f2c92e4f467ffc35d2340fe8474cb37fc59df101014080701c8706796d" }, { "version_id": "b798c092-2940-45ef-bf76-e5df3863fc56", "md5sum": "33a9af5beeb27bea3ff501dd337f814c", "size": 52536, "uploaded_at": "2025-12-11T12:46:14.627636+01:00", "display": "v20251211114614", "is_latest": false, "last_modified": "11.12.2025 11:46:14 UTC", "sha256": "c877d23aad89c92c7ad2fda11f056f82c6b866c4546857a68458db37046a045c" }, { "version_id": "a3850bbd-450e-40df-8aec-a8cb070feb66", "md5sum": "baf0391def3de3f99d6af65b4df295f1", "size": 28596, "uploaded_at": "2025-12-11T12:45:13.814867+01:00", "display": "v20251211114513", "is_latest": false, "last_modified": "11.12.2025 11:45:13 UTC", "sha256": "2c3aefce237b6443c49289d8f61cb5f4d4f20f3bec44b3fd679b617be4a33ccd" } ] }