Skip to content

Conversation

@Rakanhf
Copy link
Contributor

@Rakanhf Rakanhf commented Jan 16, 2026

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"
        }
    ]
}

@duke-nyuki
Copy link
Collaborator

Copy link
Collaborator

@suricactus suricactus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the nice PR!

Small things to address, feel free to merge afterwards.

@Rakanhf Rakanhf merged commit 671968e into master Jan 26, 2026
21 checks passed
@Rakanhf Rakanhf deleted the QF-6821-Add-get-file-metadata-endpoint branch January 26, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants