Get a File

Get a File in your account.

GET https://{region}.getafile.io/api/v1/teams/:team_id/file/:id

This endpoint allows you to get a File entry in your account.

Path Parameters

Name
Type
Description

id*

integer

ID of the File

team_id*

integer

ID of the Team

{
    "id": 1,
    "user_id": 1,
    "domain_id": 8,
    "name": "Test",
    "path_id": null,
    "tags": null,
    "url": "test",
    "fullurl": "test",
    "published": 1,
    "type": "document",
    "password": null,
    "ips": null,
    "external_id": null,
    "created_at": "2020-10-03T01:55:48.000Z",
    "updated_at": "2020-10-03T06:36:13.000Z",
    "deleted_at": null,
    "filereferrer": [
            {
                "id": 28,
                "user_id": 1,
                "team_id": 8,
                "hostname": "example.canserve.com",
                "created_at": "2024-12-19T13:23:15.000+10:00",
                "updated_at": "2024-12-19T13:23:15.000+10:00"
            }
    ],
    "filepath": {
            "id": 88,
            "name": "deep",
            "slug": "deep",
            "parent_id": 87,
            "meta": {
                "label": "deep (1)",
                "fullname": "Test -> emails -> default",
                "fullurl": "test/emails/default"
            }
    },
    "versions": [
        {
            "id": 1,
            "file_id": 1,
            "user_id": 1,
            "filename": "Test_2.pdf",
            "active": 1,
            "verified": 1,
            "created_at": "2020-10-03T02:02:12.000Z",
            "updated_at": "2020-10-03T22:36:35.000Z",
            "thumbnail": "/api/fileversion/thumbnail/98",
            "url": "/api/fileversion/98",
            "version_name": "Version 2.0",
            "version_description": "New version requested by customer"
        },
        {
            "id": 2,
            "file_id": 1,
            "user_id": 1,
            "filename": "TestVersion.pdf",
            "active": 0,
            "verified": 0,
            "created_at": "2020-10-04T23:22:40.000Z",
            "updated_at": "2020-10-04T23:22:40.000Z",
            "thumbnail": "/api/fileversion/thumbnail/111",
            "url": "/api/fileversion/111",
            "version_name": "Version 1.0",
            "version_description": "New version requested by customer"
        }
    ],
    "meta": {
        "uri": {
            "getafile": "https://testing.getafile.online/test",
            "custom": [
                "https://mycustom.domain.com/test",
                "https://mycustom.domain2.com/test"
            ]
        }
    }
}

Last updated

Was this helpful?