Description

Get information about directory objects. Directories are identified by sha1 checksums, compatible with Git directory identifiers. See swh.model.git_objects.directory_git_object in our data model module for details about how they are computed.

When given only a directory identifier, this endpoint returns information about the directory itself, returning its content (usually a list of directory entries). When given a directory identifier and a path, this endpoint returns information about the directory entry pointed by the relative path, starting path resolution from the given directory.

Request

GET https://archive.softwareheritage.org/api/1/directory/b4df9f86f76a7e10a7d98259980d4f5d5d1223a1/

Response

Body
[
    {
        "checksums": {
            "sha1": "b8549bdef083f634a6d99d937b7c789163766311",
            "sha1_git": "e439bed9ed113794118d34b80d8ad5068ed16aa8",
            "sha256": "fd4b48baeca2b22a31aea79c80a6a5402ee57a98d84eee5874d8eb9ecce1981d"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 449,
        "name": "WinMain.c",
        "perms": 33188,
        "status": "visible",
        "target": "e439bed9ed113794118d34b80d8ad5068ed16aa8",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:e439bed9ed113794118d34b80d8ad5068ed16aa8/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "5960576f8ec9e9a0f3fd3ba836016a3bfd183347",
            "sha1_git": "feb00882c097e4512ec8412becce1f9cd72d0872",
            "sha256": "fef4676e61cc8313838bab79c6524416a846fc6017460034e3f1f11c52cc10f6"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 32150,
        "name": "_msi.c",
        "perms": 33188,
        "status": "visible",
        "target": "feb00882c097e4512ec8412becce1f9cd72d0872",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:feb00882c097e4512ec8412becce1f9cd72d0872/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "1bece08cd0fdd80b6f38d7715a72b77290bb6093",
            "sha1_git": "1c93679e43542269422556bebc1d8b0a5b987fbf",
            "sha256": "41370db6f833a2a62fb370d9e0b0b4b08f096def64c40deb928d122e5e5f73be"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 3374,
        "name": "_testconsole.c",
        "perms": 33188,
        "status": "visible",
        "target": "1c93679e43542269422556bebc1d8b0a5b987fbf",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:1c93679e43542269422556bebc1d8b0a5b987fbf/",
        "type": "file"
    },
    {
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": null,
        "name": "bdist_wininst",
        "perms": 16384,
        "target": "aed743011201f2378808f46f8135fdeea02bc04f",
        "target_url": "https://archive.softwareheritage.org/api/1/directory/aed743011201f2378808f46f8135fdeea02bc04f/",
        "type": "dir"
    },
    {
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": null,
        "name": "clinic",
        "perms": 16384,
        "target": "700ecfe0c1c9ab411e56ceac597027c162078c44",
        "target_url": "https://archive.softwareheritage.org/api/1/directory/700ecfe0c1c9ab411e56ceac597027c162078c44/",
        "type": "dir"
    },
    {
        "checksums": {
            "sha1": "903c20988e61429eb20cd7393d36b8f09ca3f00e",
            "sha1_git": "43d9e208cca6b832445f3656b464b14788c6b885",
            "sha256": "94140ea36bf5157ffd4ad3ccc035748b4a2c732da2c094631de6a2e70c5d9e39"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 5291,
        "name": "config.c",
        "perms": 33188,
        "status": "visible",
        "target": "43d9e208cca6b832445f3656b464b14788c6b885",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:43d9e208cca6b832445f3656b464b14788c6b885/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "3060cbca2274c724f30fd20de9d42705d802983e",
            "sha1_git": "c87c51eb559f9734692e444e760c8da73f46075a",
            "sha256": "7c6578d40880c95902bde176e5be1b0712187f0c7af0a239b5041680788373eb"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 4684,
        "name": "dl_nt.c",
        "perms": 33188,
        "status": "visible",
        "target": "c87c51eb559f9734692e444e760c8da73f46075a",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:c87c51eb559f9734692e444e760c8da73f46075a/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "26033f6ae6859760e25aff4a6c091bf35b9f6ca9",
            "sha1_git": "93a15d12bf8462c50da6b6db96dcd014196a602b",
            "sha256": "67e71c9e304a4913ae41caee79e782e8924e1e17fecaef1dd2b565628691f3cc"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 3624,
        "name": "dllbase_nt.txt",
        "perms": 33188,
        "status": "visible",
        "target": "93a15d12bf8462c50da6b6db96dcd014196a602b",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:93a15d12bf8462c50da6b6db96dcd014196a602b/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "b1b8ef60982affe7160c950b514d80f5785debd7",
            "sha1_git": "846b4d0d646217f5ada73dba86c29ccf9ad87b0c",
            "sha256": "2294c9c714c6598a9f98ed83eccf049ba6c54478a2d5a004c28d5a96db1ba4c2"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 137,
        "name": "empty.c",
        "perms": 33188,
        "status": "visible",
        "target": "846b4d0d646217f5ada73dba86c29ccf9ad87b0c",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:846b4d0d646217f5ada73dba86c29ccf9ad87b0c/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "bcb035f2278f174e9809f0ff7810dcb9df5a5d5a",
            "sha1_git": "985f673a4649c8690b3abebd28463c78056582b2",
            "sha256": "e40394fc8c3a46c9da086ffd154ccc5f99d4ec33cbcc7ded3c92bab0d8348359"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 2179,
        "name": "errmap.h",
        "perms": 33188,
        "status": "visible",
        "target": "985f673a4649c8690b3abebd28463c78056582b2",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:985f673a4649c8690b3abebd28463c78056582b2/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "8d973fab639fae643992ab56f03818c0054feb08",
            "sha1_git": "646bcd0a2096f88e9f815f2fe8e9fbd99527aaba",
            "sha256": "c18489ba76258ba3ec827a14cd7b68624df57f78f9bbc9c044eb6712e6a704ad"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 95,
        "name": "errmap.mak",
        "perms": 33188,
        "status": "visible",
        "target": "646bcd0a2096f88e9f815f2fe8e9fbd99527aaba",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:646bcd0a2096f88e9f815f2fe8e9fbd99527aaba/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "cd52f033f4f4298b2147786a9ff6851315529cce",
            "sha1_git": "0156c5008bc93a905665ea2651a2fd8dc224edf9",
            "sha256": "c56bfa38b087021b4a1cfe412992ef815c6603c74b8e549634ab4d10abee2a03"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 3986,
        "name": "frozen_dllmain.c",
        "perms": 33188,
        "status": "visible",
        "target": "0156c5008bc93a905665ea2651a2fd8dc224edf9",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:0156c5008bc93a905665ea2651a2fd8dc224edf9/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "039ff306a81b935cd8da8247c6ba14607b20c586",
            "sha1_git": "953344c0d7959787189de3a16797f2b43ffa3c41",
            "sha256": "7f8c8e4cb6b819f502c2313f1a68d30510e9e816c7225d6c7037f2dfcbd5fb07"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 849,
        "name": "generrmap.c",
        "perms": 33188,
        "status": "visible",
        "target": "953344c0d7959787189de3a16797f2b43ffa3c41",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:953344c0d7959787189de3a16797f2b43ffa3c41/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "fd516b4604c1a4e46f3abf472b67a79233521fa8",
            "sha1_git": "e7be704a9a78dd8ab3a84b71ecdf22de8ecbe064",
            "sha256": "17ff125cfb7c179a969d1ce0d38a01f8131195b86d0c734d614c3d5c1562ca4c"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 30716,
        "name": "getpathp.c",
        "perms": 33188,
        "status": "visible",
        "target": "e7be704a9a78dd8ab3a84b71ecdf22de8ecbe064",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:e7be704a9a78dd8ab3a84b71ecdf22de8ecbe064/",
        "type": "file"
    },
    {
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": null,
        "name": "icons",
        "perms": 16384,
        "target": "0d1154c01dffe3a70da066589a02fc5d847ae7c1",
        "target_url": "https://archive.softwareheritage.org/api/1/directory/0d1154c01dffe3a70da066589a02fc5d847ae7c1/",
        "type": "dir"
    },
    {
        "checksums": {
            "sha1": "ab11396221892e2e0b40e85415879d518e4b5b0c",
            "sha1_git": "d634710cbec71439446067f2fd8df8d78998b5d2",
            "sha256": "72523fee5dc95aa0a5188cba1cff50797113c805d53c622e5d9c0c8c08271805"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 549,
        "name": "invalid_parameter_handler.c",
        "perms": 33188,
        "status": "visible",
        "target": "d634710cbec71439446067f2fd8df8d78998b5d2",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:d634710cbec71439446067f2fd8df8d78998b5d2/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "e17975a77e2c19551613036a7e3d141e1a6394bb",
            "sha1_git": "e6288451546d956bc58e23d63c93366472722cd9",
            "sha256": "4d356ec5a47d7e67e6b7a27267b058dde53f9167d34f690709525c1bd209567d"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 51330,
        "name": "launcher.c",
        "perms": 33188,
        "status": "visible",
        "target": "e6288451546d956bc58e23d63c93366472722cd9",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:e6288451546d956bc58e23d63c93366472722cd9/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "f8f375a173fe7d2e51fe15ce76e8fe428e3564b5",
            "sha1_git": "59bf54fa0b7743625aaf1d9b37883fcf5f7863a2",
            "sha256": "79b023046c73deabcbb82568c4b41b9c7ee1aa48c4c0d18647f83e91a51f5d6b"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 15137,
        "name": "msvcrtmodule.c",
        "perms": 33188,
        "status": "visible",
        "target": "59bf54fa0b7743625aaf1d9b37883fcf5f7863a2",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:59bf54fa0b7743625aaf1d9b37883fcf5f7863a2/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "56aff929c8fcb117cb55ab7199e90a9c732a623f",
            "sha1_git": "c96c231a05f241b0655558a674f2c825d40d6064",
            "sha256": "f20c3d0734a554aa5f5f837f79bb00dd9473a2602d0d8a8b6d534cfe9be020e3"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 19885,
        "name": "pyconfig.h",
        "perms": 33188,
        "status": "visible",
        "target": "c96c231a05f241b0655558a674f2c825d40d6064",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:c96c231a05f241b0655558a674f2c825d40d6064/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "2661c8a1a04e519cc3abf9ace8f3303797193e36",
            "sha1_git": "3da3445f5fc4c7ae0930e8ff10193064f8f9dd48",
            "sha256": "ba09b17cfad6c76560e20806d6ca8a3af1e89f1525e8a9c166cd9dda3e0b69d9"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 1393,
        "name": "pylauncher.rc",
        "perms": 33188,
        "status": "visible",
        "target": "3da3445f5fc4c7ae0930e8ff10193064f8f9dd48",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:3da3445f5fc4c7ae0930e8ff10193064f8f9dd48/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "f5ccec0cc314063962baf27d7b56bc295cc6ccf8",
            "sha1_git": "04fe61e89618bd78a16353b70654e804f94002a0",
            "sha256": "381d9769c12e8c91aded9bb42e54a5e61451fadfd3e12c48198ae31e4d0ea3a0"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 18504,
        "name": "pyshellext.cpp",
        "perms": 33188,
        "status": "visible",
        "target": "04fe61e89618bd78a16353b70654e804f94002a0",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:04fe61e89618bd78a16353b70654e804f94002a0/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "0a120437a94b353e68f7ea8419abab20af923e04",
            "sha1_git": "5424bd1180d24715db78e623458c7a62e7cb46f4",
            "sha256": "a50aa839fbdca3131052aeb46d729fdcf71f4fde2bd2869085b909ace52ac3d2"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 141,
        "name": "pyshellext.def",
        "perms": 33188,
        "status": "visible",
        "target": "5424bd1180d24715db78e623458c7a62e7cb46f4",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:5424bd1180d24715db78e623458c7a62e7cb46f4/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "34e96112e87d6a138ae9fc0ca31df7e04708ef06",
            "sha1_git": "c0a183876ad52b4dd9214a8c4b93bddbb3da47d2",
            "sha256": "42736593c539a26f20daea66dc8dbc1ed26a98f57935613458f17035f3c91eb2"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 277,
        "name": "pyshellext.idl",
        "perms": 33188,
        "status": "visible",
        "target": "c0a183876ad52b4dd9214a8c4b93bddbb3da47d2",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:c0a183876ad52b4dd9214a8c4b93bddbb3da47d2/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "209e030e509d0f60f2fe133507205aedc0fc897c",
            "sha1_git": "e5924a42dabe296deaa015200dcce37320e9b264",
            "sha256": "4597d2cb9e920d5f28e30cf5895d28425427ce7f92e9492744afe932f531fcbc"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 1153,
        "name": "pyshellext.rc",
        "perms": 33188,
        "status": "visible",
        "target": "e5924a42dabe296deaa015200dcce37320e9b264",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:e5924a42dabe296deaa015200dcce37320e9b264/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "7167bf159ffa2b53ca63ca3330721600e82d8f31",
            "sha1_git": "7d2148bb861edc7fc5bf3a8f6cff4fed76d6e1d6",
            "sha256": "501c39c6d10dd5fd619cd9d29e8348b5ca23587284996f788e4ad461e0ce9c70"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 143,
        "name": "pyshellext_d.def",
        "perms": 33188,
        "status": "visible",
        "target": "7d2148bb861edc7fc5bf3a8f6cff4fed76d6e1d6",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:7d2148bb861edc7fc5bf3a8f6cff4fed76d6e1d6/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "5ad390f7622665c1a488060240db01756f43ada4",
            "sha1_git": "4e73d60df2842d0aed31a57a4575161edddd3bb0",
            "sha256": "3948cb5181098f7884077071a703b60425395e585449088c47ba318c1931c73c"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 1282,
        "name": "python.manifest",
        "perms": 33188,
        "status": "visible",
        "target": "4e73d60df2842d0aed31a57a4575161edddd3bb0",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:4e73d60df2842d0aed31a57a4575161edddd3bb0/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "27b0318f174e74a50ae2990e35e969ea83a95178",
            "sha1_git": "bb3ca8814b4cef13aac1db3fd79130ea2adc614c",
            "sha256": "b1d0583a1328ea79166a6d619f3fa8317efc4c76faea610c4f709b3d89828b7f"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 41027,
        "name": "python3.def",
        "perms": 33188,
        "status": "visible",
        "target": "bb3ca8814b4cef13aac1db3fd79130ea2adc614c",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:bb3ca8814b4cef13aac1db3fd79130ea2adc614c/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "c4cea790fc82245e0dee93fd0abcfc5d5c58381a",
            "sha1_git": "ef2907112564fe4506d9733ba1407a1aec6095aa",
            "sha256": "99f1775efd41c7c4753f6d5053acc21ef4ae6f078734851d326abec89338d41c"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 134,
        "name": "python3dll.c",
        "perms": 33188,
        "status": "visible",
        "target": "ef2907112564fe4506d9733ba1407a1aec6095aa",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:ef2907112564fe4506d9733ba1407a1aec6095aa/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "d813d362902f1e27620c76476ad8074f2aad3ddf",
            "sha1_git": "ae0b029b8070a44c23a9da1b860f2bc888119158",
            "sha256": "41aefe16de0296ea29fb395ec2718a930783081a7992d455ac974a7595d73b72"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 1197,
        "name": "python_exe.rc",
        "perms": 33188,
        "status": "visible",
        "target": "ae0b029b8070a44c23a9da1b860f2bc888119158",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:ae0b029b8070a44c23a9da1b860f2bc888119158/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "93966bc04cfd0fe4b1d5e79477938be19147668c",
            "sha1_git": "fac6105d8a7721ab9293c5b80fb3d8aa2065e557",
            "sha256": "b08013d4f0076f698377fc593a342f966250c3524c9666e09480c192bddbc73c"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 1213,
        "name": "python_nt.rc",
        "perms": 33188,
        "status": "visible",
        "target": "fac6105d8a7721ab9293c5b80fb3d8aa2065e557",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:fac6105d8a7721ab9293c5b80fb3d8aa2065e557/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "6657da91576f186e781cd8d0c8edd56c98c98119",
            "sha1_git": "f95e755bb8bd786c641ba8e9107218ff78b43cb0",
            "sha256": "cbdb5f3b4d74a7817c3a2486328d2ad260f0a1ade483b8c118581f048ac7e5b8"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 970,
        "name": "python_ver_rc.h",
        "perms": 33188,
        "status": "visible",
        "target": "f95e755bb8bd786c641ba8e9107218ff78b43cb0",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:f95e755bb8bd786c641ba8e9107218ff78b43cb0/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "2a0d5d59f520211fd5e663c45687a86985c07ef7",
            "sha1_git": "88bf3592e18124bf6b7bbe19449ddce13cc4736c",
            "sha256": "103c5f2cc9710b0873a9382cc006ceaa887ba9d8945936c92a55b5982c30603d"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 1203,
        "name": "pythonw_exe.rc",
        "perms": 33188,
        "status": "visible",
        "target": "88bf3592e18124bf6b7bbe19449ddce13cc4736c",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:88bf3592e18124bf6b7bbe19449ddce13cc4736c/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "5dd3b4462c16460b8db4102f689dab175c1c54a7",
            "sha1_git": "0a96d269b0977d36eadc80a181931765f3427e2c",
            "sha256": "cc03173a87925eec9c282de518275421651e132a354360473c0cfca5ac0a4315"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 3620,
        "name": "readme.txt",
        "perms": 33188,
        "status": "visible",
        "target": "0a96d269b0977d36eadc80a181931765f3427e2c",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:0a96d269b0977d36eadc80a181931765f3427e2c/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "09276f4616fc6473bae4691df79b678f96722b27",
            "sha1_git": "84bd87d9d575d6e1f13f17fa646cf16ef645e63b",
            "sha256": "e3559b01b89b3e32a3007ea766586f8611911e35cf6c5bac120995761b2597da"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 1309,
        "name": "sqlite3.rc",
        "perms": 33188,
        "status": "visible",
        "target": "84bd87d9d575d6e1f13f17fa646cf16ef645e63b",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:84bd87d9d575d6e1f13f17fa646cf16ef645e63b/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "c50c330a5ef179b0914e2532fd4cc9b267eb61f0",
            "sha1_git": "709f35c4525877275269703f23974aa0727661aa",
            "sha256": "3de195feb39f37b58a11af21bdb35bec8aab7232773de9d19fbc8e5286e11faa"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 831,
        "name": "testpy.py",
        "perms": 33188,
        "status": "visible",
        "target": "709f35c4525877275269703f23974aa0727661aa",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:709f35c4525877275269703f23974aa0727661aa/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "968c93374cbe95d558b1c1df323afbf5dade97e8",
            "sha1_git": "0ba54ab3bb42df8ea3c8954b0ad5ab628e3222ec",
            "sha256": "c7245dd4493caa232e730dabbb45c1c9926d1a337a3e069e40f5c62df1a7d781"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 2757,
        "name": "validate_ucrtbase.py",
        "perms": 33188,
        "status": "visible",
        "target": "0ba54ab3bb42df8ea3c8954b0ad5ab628e3222ec",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:0ba54ab3bb42df8ea3c8954b0ad5ab628e3222ec/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "6dedb6558c6f2e0601af69dad83e05049da8fb99",
            "sha1_git": "5efdc5e0efec6c8aed78434bdb7b9297e887c41d",
            "sha256": "5f1e934d8a52ce4be083755315208500e8583c75c6d5cea7ce5440800e345e4d"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 61179,
        "name": "winreg.c",
        "perms": 33188,
        "status": "visible",
        "target": "5efdc5e0efec6c8aed78434bdb7b9297e887c41d",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:5efdc5e0efec6c8aed78434bdb7b9297e887c41d/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "cb6ff6f7ae337d81b75c3c4804f9b4a7c109ee0b",
            "sha1_git": "7feebcbcf4377f76290364b163b38b81ed87ba55",
            "sha256": "32defb46b826a121cf6fb55410b8cd0e3fd681a48c61ea8af43ff6b601b2d7ed"
        },
        "dir_id": "b4df9f86f76a7e10a7d98259980d4f5d5d1223a1",
        "length": 6625,
        "name": "winsound.c",
        "perms": 33188,
        "status": "visible",
        "target": "7feebcbcf4377f76290364b163b38b81ed87ba55",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:7feebcbcf4377f76290364b163b38b81ed87ba55/",
        "type": "file"
    }
]

URL Allowed Methods

https://archive.softwareheritage.org/api/1/directory/ (sha1_git) /[ (path) /]

GET, HEAD, OPTIONS

Arguments

sha1_git (string)

hexadecimal representation of the directory sha1_git identifier

path (string)

optional parameter to get information about the directory entry pointed by that relative path


Request headers

Accept

the requested response content type, either application/json (default) or application/yaml


Response headers

Content-Type

this depends on Accept header of request


Returns

array

an array of objects containing the following keys:

  • checksums (object): object holding the computed checksum values for a directory entry (only for file entries)

  • dir_id (string): sha1_git identifier of the requested directory

  • length (number): length of a directory entry in bytes (only for file entries) for getting information about the content MIME type

  • name (string): the directory entry name

  • perms (number): permissions for the directory entry

  • target (string): sha1_git identifier of the directory entry

  • target_url (string): link to /api/1/content/ or /api/1/directory/ depending on the directory entry type

  • type (string): the type of the directory entry, can be either dir, file or rev


HTTP status codes

200

no error

400

an invalid hash_type or hash has been provided

404

requested directory cannot be found in the archive


Examples

/api/1/directory/977fc4b98c0e85816348cebd3b12026407c368b6/
back to top