The location of an item relative to a StorageRoot.

Writable Fields:

path: Path from a StorageRoot uri to the item location, when appended to a StorageRoot uri produces a complete URI.

hash: If StorageLocation references a file, this is the calculated SHA1 hash of the file. If StorageLocation references a directory TODO: can't be git sha for validation (doesn't care about local changes), could be recursive sha1 of all files in the directory (excluding .git and things referenced in .gitignore), but needs to be OS independent (order matters) and things like logging output might affect it...

public (optional): Boolean indicating whether the StorageLocation is public or not (default is True)

storage_root: Reference to the StorageRoot to append the path to.

Read-only Fields:

url: Reference to the instance of the StorageLocation, final integer is the StorageLocation id

last_updated: Datetime that this record was last updated

updated_by: Reference to the user that updated this record

GET /api/storage_location/?format=api
HTTP 200 OK
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "count": 6,
    "next": null,
    "previous": null,
    "results": [
        {
            "url": "https://data.fairdatapipeline.org/api/storage_location/7/?format=api",
            "last_updated": "2024-02-09T15:38:27.709814Z",
            "path": "eea65411916d24f0e34e578a172a7e66efcac145",
            "hash": "eea65411916d24f0e34e578a172a7e66efcac145",
            "public": true,
            "updated_by": "https://data.fairdatapipeline.org/api/users/2/?format=api",
            "storage_root": "https://data.fairdatapipeline.org/api/storage_root/1/?format=api"
        },
        {
            "url": "https://data.fairdatapipeline.org/api/storage_location/6/?format=api",
            "last_updated": "2024-02-09T15:38:19.284427Z",
            "path": "fa2b738ff8363e84eb3ce5382545d79fd2528cc7",
            "hash": "fa2b738ff8363e84eb3ce5382545d79fd2528cc7",
            "public": true,
            "updated_by": "https://data.fairdatapipeline.org/api/users/2/?format=api",
            "storage_root": "https://data.fairdatapipeline.org/api/storage_root/1/?format=api"
        },
        {
            "url": "https://data.fairdatapipeline.org/api/storage_location/5/?format=api",
            "last_updated": "2024-02-09T15:38:10.604858Z",
            "path": "f35c1cd83fbe1a458d71da1aae90ed2e8db2b031",
            "hash": "f35c1cd83fbe1a458d71da1aae90ed2e8db2b031",
            "public": true,
            "updated_by": "https://data.fairdatapipeline.org/api/users/2/?format=api",
            "storage_root": "https://data.fairdatapipeline.org/api/storage_root/1/?format=api"
        },
        {
            "url": "https://data.fairdatapipeline.org/api/storage_location/4/?format=api",
            "last_updated": "2024-02-09T15:38:06.570286Z",
            "path": "ddcbb77a75b941b56417802bce20f2d9a7f32b26",
            "hash": "ddcbb77a75b941b56417802bce20f2d9a7f32b26",
            "public": true,
            "updated_by": "https://data.fairdatapipeline.org/api/users/2/?format=api",
            "storage_root": "https://data.fairdatapipeline.org/api/storage_root/1/?format=api"
        },
        {
            "url": "https://data.fairdatapipeline.org/api/storage_location/3/?format=api",
            "last_updated": "2024-02-09T15:36:47.202147Z",
            "path": "10dcfada1135420f3e4dd97b9b8ab4b45fd9ccc6",
            "hash": "10dcfada1135420f3e4dd97b9b8ab4b45fd9ccc6",
            "public": true,
            "updated_by": "https://data.fairdatapipeline.org/api/users/2/?format=api",
            "storage_root": "https://data.fairdatapipeline.org/api/storage_root/1/?format=api"
        },
        {
            "url": "https://data.fairdatapipeline.org/api/storage_location/1/?format=api",
            "last_updated": "2024-02-09T15:36:27.950356Z",
            "path": "6294a5951677e6b8438cabf55234b7974adeaee3",
            "hash": "6294a5951677e6b8438cabf55234b7974adeaee3",
            "public": true,
            "updated_by": "https://data.fairdatapipeline.org/api/users/2/?format=api",
            "storage_root": "https://data.fairdatapipeline.org/api/storage_root/1/?format=api"
        }
    ]
}