Skip to content

Bulk Export with Metadata

If the Include Metadata option is enabled for an export rule, then a JSON "sidecar" file will be placed next to each file that is exported from Flywheel by the associated export rule.

If the Unzip Files option is enabled, the metadata file will be placed next to the directory representing the extracted archive. This is because the metadata file describes the archive file (the full package) as it was stored in Flywheel, not each of its contents individually.

This sidecar file contains the extensive Flywheel metadata describing the file itself and each of its parent containers from the Acquisition level up to and including the Project level.

Metadata Import

The metadata can also be imported from the JSON sidecar into Flywheel alongside the related files via Bulk Import.

Example Metadata Sidecar File (JSON)
{
    "project": {
        "_id": "65b407f03a1b66c54af9c279",
        "label": "Aperture Clinical Trial",
        "description": "",
        "parents": {
            "group": "demos"
        },
        "editions": {
            "lab": false
        },
        "info": {},
        "notes": [],
        "tags": [],
        "templates": [],
        "locked": null,
        "modified": "2024-01-26T19:28:48.050000Z",
        "created": "2024-01-26T19:28:48.050000Z",
        "deleted": null,
        "settings": {
            "viewer_apps": [],
            "deid_profile": {},
            "forms": null,
            "external_routing_id": null,
            "sharing": null,
            "workspaces": {
                "jupyterhub": {
                    "enabled": false
                }
            }
        },
        "copyable": false,
        "copy_status": null,
        "copy_failure_reason": null,
        "copy_of": null,
        "original_copy_of": null,
        "stats": {
            "number_of": {
                "subjects": 1,
                "sessions": 1,
                "acquisitions": 5,
                "files": 5,
                "jobs": 0,
                "analyses": 0,
                "acquisition_files": 5,
                "compliant_sessions": 0
            },
            "age_groups": [],
            "measurements": [],
            "file_types": [
                "dicom"
            ],
            "modalities": []
        }
    },
    "subject": {
        "_id": "66b245f8986c3db10e893e0e",
        "created": "2024-08-06T15:49:12.422000Z",
        "modified": "2024-08-06T15:49:12.422000Z",
        "date_of_birth": null,
        "deleted": null,
        "parents": {
            "group": "demos",
            "project": "65b407f03a1b66c54af9c279"
        },
        "firstname": null,
        "lastname": null,
        "sex": null,
        "cohort": null,
        "mlset": null,
        "type": null,
        "race": null,
        "ethnicity": null,
        "species": null,
        "strain": null,
        "label": "PGBM-017",
        "code": "PGBM-017",
        "notes": [],
        "tags": [],
        "info": {},
        "state": null,
        "copy_of": null,
        "original_copy_of": null
    },
    "session": {
        "_id": "66b245f8986c3db10e893e0f",
        "created": "2024-08-06T15:49:12.422000Z",
        "modified": "2024-08-06T15:49:12.422000Z",
        "deleted": null,
        "timezone": null,
        "timestamp": null,
        "parents": {
            "group": "demos",
            "subject": "66b245f8986c3db10e893e0e",
            "project": "65b407f03a1b66c54af9c279"
        },
        "label": "1997-09-17 09_20_43",
        "uid": null,
        "info": {},
        "tags": [],
        "notes": [],
        "age": null,
        "weight": null,
        "operator": null,
        "satisfies_template": null,
        "project_has_template": false,
        "copy_of": null,
        "original_copy_of": null,
        "group": "demos"
    },
    "acquisition": {
        "_id": "66b2460a986c3db10e893e29",
        "parents": {
            "group": "demos",
            "project": "65b407f03a1b66c54af9c279",
            "subject": "66b245f8986c3db10e893e0e",
            "session": "66b245f8986c3db10e893e0f"
        },
        "label": "ADC_reg",
        "info": {},
        "timestamp": "1997-09-17T14:45:48Z",
        "created": "2024-08-06T15:49:30.375000Z",
        "modified": "2024-08-06T15:49:30.375000Z",
        "tags": [],
        "notes": [],
        "analyses": [],
        "collections": []
    },
    "file": {
        "_id": {
            "file_id": "66b2460a986c3db10e893e2a",
            "version": 1
        },
        "parent_ref": {
            "id": "66b2460a986c3db10e893e29",
            "type": "acquisition"
        },
        "name": "ADC_reg.zip",
        "file_group": "files",
        "provider_id": "659d4d38960091ab9f0e4b18",
        "uuid": "247d4595-397a-48ae-8bd5-309ae6775598",
        "path": "247d4595-397a-48ae-8bd5-309ae6775598",
        "reference": null,
        "size": 4495698,
        "hash": "23b823afc3a6bce17d0a84fe6f5ab3254b07787a5e0dbb3976697dbd9cef74ad0fca8a082465cffb2c12f34d57a4188b",
        "client_hash": null,
        "zip_member_count": 23,
        "source_file_id": null,
        "restored_from": null,
        "restored_by": null,
        "parents": {
            "group": "demos",
            "project": "65b407f03a1b66c54af9c279",
            "subject": "66b245f8986c3db10e893e0e",
            "session": "66b245f8986c3db10e893e0f",
            "acquisition": "66b2460a986c3db10e893e29"
        },
        "origin": {
            "type": "user",
            "id": "jdoe@acme.com"
        },
        "source": null,
        "type": "dicom",
        "mimetype": "application/zip",
        "modality": null,
        "classification": {},
        "tags": [],
        "info": {},
        "deid_log_id": null,
        "deid_log_skip_reason": null,
        "gear_info": null,
        "created": "2024-08-06T15:49:30.529000Z",
        "modified": "2024-08-06T15:49:30.529000Z",
        "replaced": null,
        "deleted": null,
        "copy_of": null,
        "original_copy_of": null
    }
}