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/06e40820601a63a04fc9f9baa54c442dfbeb1a6c/

Response

Body
[
    {
        "checksums": {
            "sha1": "5bf7272a86e1f940f2cfb3daf01ac933af40e7a9",
            "sha1_git": "854b103f7bd606aea86b1d232f9b04d81c384f64",
            "sha256": "ec7dd8ef882e5dad22cba60a80f0ec41ebbecd65af9d3683c60a61def7a98cd4"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 41,
        "name": "README",
        "perms": 33188,
        "status": "visible",
        "target": "854b103f7bd606aea86b1d232f9b04d81c384f64",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:854b103f7bd606aea86b1d232f9b04d81c384f64/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "9572ed19a707dd49254d7d63001c199da66dee13",
            "sha1_git": "0f1ee9dbbaf545c4523c3c137d71026b6823a004",
            "sha256": "a9fb1ad36851c98d9a1f1bf990ac0417a9f90344e97387ff5f756c6e861dccc0"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 67214,
        "name": "abstract.c",
        "perms": 33188,
        "status": "visible",
        "target": "0f1ee9dbbaf545c4523c3c137d71026b6823a004",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:0f1ee9dbbaf545c4523c3c137d71026b6823a004/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "5c2d04c74eb69347673575448f7c1ea5b41b6f35",
            "sha1_git": "5bd2ee41fef7b666e731f5413316a0e2ee4ba295",
            "sha256": "aef6c56232c06888873c03abf6a24d8d591c02d4fe6471e2d882f6b292c20351"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 2456,
        "name": "accu.c",
        "perms": 33188,
        "status": "visible",
        "target": "5bd2ee41fef7b666e731f5413316a0e2ee4ba295",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:5bd2ee41fef7b666e731f5413316a0e2ee4ba295/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "371a21b82689ad0cb0804a678956d88196f0f229",
            "sha1_git": "becdfcbbb477230c33d5f5603cb2408c2c1417c3",
            "sha256": "14eefb4b27e65ce4e350f17c687a8fa5e7497d919a71764c4b00ef0e80a56fb2"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 6705,
        "name": "boolobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "becdfcbbb477230c33d5f5603cb2408c2c1417c3",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:becdfcbbb477230c33d5f5603cb2408c2c1417c3/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "77386ebecc62f7e6f93235d7d7ab2322ea11f4ef",
            "sha1_git": "22dd810a7dd88d082c7e5a212f17b448beee28c8",
            "sha256": "3185497fecb5955ee45fc3cf6e158f740fa838fc0db5eaaa2a7940e39f83c7cb"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 70240,
        "name": "bytearrayobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "22dd810a7dd88d082c7e5a212f17b448beee28c8",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:22dd810a7dd88d082c7e5a212f17b448beee28c8/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "2afe6de0f20595393333365706c5e9306a27d91f",
            "sha1_git": "bd79773a54eabff285796caedf79954d400c6239",
            "sha256": "0b6f9c6127b39ed935081a509d5f88c680edbb6b91a5f7474cfe31da30acfa07"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 21558,
        "name": "bytes_methods.c",
        "perms": 33188,
        "status": "visible",
        "target": "bd79773a54eabff285796caedf79954d400c6239",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:bd79773a54eabff285796caedf79954d400c6239/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "fa0779f6ffa57c78e4893fb9dbfab0d09da406a6",
            "sha1_git": "e95ab9c63b1b8d69a1e0491a077a24c9a3428f01",
            "sha256": "7e92938a743ee8d4253503e21cb99ae4ca083348d2ac7cb48cf26dfe924b1c27"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 101853,
        "name": "bytesobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "e95ab9c63b1b8d69a1e0491a077a24c9a3428f01",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:e95ab9c63b1b8d69a1e0491a077a24c9a3428f01/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "90a7d48b4f18a969b4dde35a3fe531bf25533885",
            "sha1_git": "4c74eab44f5e4386b57f3b5741c7a73c25eaaf5c",
            "sha256": "0f465cf403891044d90d59605c87552a35406724457dcd5938a7c95b94b5f917"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 37135,
        "name": "call.c",
        "perms": 33188,
        "status": "visible",
        "target": "4c74eab44f5e4386b57f3b5741c7a73c25eaaf5c",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:4c74eab44f5e4386b57f3b5741c7a73c25eaaf5c/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "05525538d7416ea6619152f5c7d749a5e170e4ae",
            "sha1_git": "acd3de637dd52e122b29a605877e0fa83b4bd285",
            "sha256": "73d5354a6c48e2ca78952e724723a4039b93a69dfe9ab831ac019b2ffe823bb7"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 7421,
        "name": "capsule.c",
        "perms": 33188,
        "status": "visible",
        "target": "acd3de637dd52e122b29a605877e0fa83b4bd285",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:acd3de637dd52e122b29a605877e0fa83b4bd285/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "a81579e7c8456cc04a3e0a739248cce97a53011a",
            "sha1_git": "9f4eddb846835c3b32b76622cb78e63076e0115e",
            "sha256": "b1dd72bc3d34d7ac3c9c9a3822146ad5395e6e488006e17fc43f5e06cfe8d89f"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 4886,
        "name": "cellobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "9f4eddb846835c3b32b76622cb78e63076e0115e",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:9f4eddb846835c3b32b76622cb78e63076e0115e/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "6e3c4aa8e3579c1e622262ce0a923c32c10e7c61",
            "sha1_git": "b0ed02305695da2bf2754e7defadd4a71b1ce5d9",
            "sha256": "89aa39453d056d9ad76814c51c3d7593354d9a1be24eb1841f3e1a78f171464b"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 18628,
        "name": "classobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "b0ed02305695da2bf2754e7defadd4a71b1ce5d9",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:b0ed02305695da2bf2754e7defadd4a71b1ce5d9/",
        "type": "file"
    },
    {
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": null,
        "name": "clinic",
        "perms": 16384,
        "target": "731a9005e2df06df27e6b906178110fff0dd6e64",
        "target_url": "https://archive.softwareheritage.org/api/1/directory/731a9005e2df06df27e6b906178110fff0dd6e64/",
        "type": "dir"
    },
    {
        "checksums": {
            "sha1": "b4b76d56a7141976ac9a05f974fac20d69539991",
            "sha1_git": "46bc45d5ac186d10d65a08a01ff395625399c7da",
            "sha256": "d22ebf55a9036234e50845b5959f49012f9139a065bd80ab58f38e57711c4940"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 27902,
        "name": "codeobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "46bc45d5ac186d10d65a08a01ff395625399c7da",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:46bc45d5ac186d10d65a08a01ff395625399c7da/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "dd378b7fb14e0f249df90a923d8cd1c1ec59010b",
            "sha1_git": "3bf37ee437f557604b695bc4b149b614df253506",
            "sha256": "64c52c0f9a81ca77008ff569ab50e553013b63760a0a9b2c7fb453f3397aaf8d"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 33020,
        "name": "complexobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "3bf37ee437f557604b695bc4b149b614df253506",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:3bf37ee437f557604b695bc4b149b614df253506/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "388d30c9f47bf2bf27d5f6ac551d4790c8c4b1d4",
            "sha1_git": "1d11605a9b8d3bf1ad8b38752a186f3368339567",
            "sha256": "90862b2d806088c1e115d840a28c3c2d4eee83eb82b7af0f5d93d9ca4ec5c4fc"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 56735,
        "name": "descrobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "1d11605a9b8d3bf1ad8b38752a186f3368339567",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:1d11605a9b8d3bf1ad8b38752a186f3368339567/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "e65f5b1a19e319296f0f73e14ffcc5432f6d65e6",
            "sha1_git": "621855273472e9596d81b00edabc5171a3d8fa0e",
            "sha256": "217a65b5654067607d01d17b10d6d10b70e38b3a6afce6a37ce4422484c82e17"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 2361,
        "name": "dict-common.h",
        "perms": 33188,
        "status": "visible",
        "target": "621855273472e9596d81b00edabc5171a3d8fa0e",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:621855273472e9596d81b00edabc5171a3d8fa0e/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "0539b1aa1e8aaea88efef69e16a9931e819d1ad1",
            "sha1_git": "f89720c9f604e021549b3b3895f5d52cb426dd88",
            "sha256": "ac997a421f919b256260ebf6263c4e913d8bcf0daa6f1b2af35a5fb511ef5dbd"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 6108,
        "name": "dictnotes.txt",
        "perms": 33188,
        "status": "visible",
        "target": "f89720c9f604e021549b3b3895f5d52cb426dd88",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:f89720c9f604e021549b3b3895f5d52cb426dd88/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "4181d947def4644a929c3990a2b7ec4cf31822a7",
            "sha1_git": "254311869b6f4be25af92f2a46b0ac577851e57d",
            "sha256": "edfa4b5b3014beea1e8e398b81be0cf793c474bc991c1933028637a5c1fef0d0"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 133198,
        "name": "dictobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "254311869b6f4be25af92f2a46b0ac577851e57d",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:254311869b6f4be25af92f2a46b0ac577851e57d/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "90212e131a7caf1cf1a026eb9782f0aa7ce27faa",
            "sha1_git": "3eb1736200c6ddbd9dc3bff8c29280438a2e37eb",
            "sha256": "8f412beaba3a14d3b91bd3daef5e59b1d74dcc0bc8977cf65354195df00ab9b7"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 13186,
        "name": "enumobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "3eb1736200c6ddbd9dc3bff8c29280438a2e37eb",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:3eb1736200c6ddbd9dc3bff8c29280438a2e37eb/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "83b32b85842d885de4ff2203043e71a5b6686549",
            "sha1_git": "858eff5fc26c344dc4a8e4114c458d01c4a99553",
            "sha256": "c3deac5e8aceef337a80c993ab5480f487f49207c7e6809a049bc99d5231ee43"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 87201,
        "name": "exceptions.c",
        "perms": 33188,
        "status": "visible",
        "target": "858eff5fc26c344dc4a8e4114c458d01c4a99553",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:858eff5fc26c344dc4a8e4114c458d01c4a99553/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "92c25b1dfe0b06fa82e138979f0f64aec1f5b173",
            "sha1_git": "0f71944d526ec8c8a164e2ca346fa05276845727",
            "sha256": "cae22be6a298e9510a6a948f8d7fb3f4a770d258399815051abb589c8211b53c"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 15171,
        "name": "fileobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "0f71944d526ec8c8a164e2ca346fa05276845727",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:0f71944d526ec8c8a164e2ca346fa05276845727/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "ea1779d8d300b978844faa30be005652789e55e2",
            "sha1_git": "8c4fe74d1b83ab9d164028bbab2c09eee7a38a9b",
            "sha256": "e98afa47c764b70a231410d47c7ff33113fddb0886bc449d0eb30021c71cc41f"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 72718,
        "name": "floatobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "8c4fe74d1b83ab9d164028bbab2c09eee7a38a9b",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:8c4fe74d1b83ab9d164028bbab2c09eee7a38a9b/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "2a887243d967de01c652684f8e6497bbc636dd16",
            "sha1_git": "84483195ab2ad48970ab9802b5581ef56fdb3abd",
            "sha256": "da978e32e308431a76bad697f99af199ce59248efbfb37564ccef5d910efb675"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 33294,
        "name": "frameobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "84483195ab2ad48970ab9802b5581ef56fdb3abd",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:84483195ab2ad48970ab9802b5581ef56fdb3abd/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "d1fb96b207c552db520c56aeb884e1e9c053b3f7",
            "sha1_git": "841000152f79a671d64c9d1135776f35945d1ef0",
            "sha256": "306abb7e7513ca76a169bcd43f1d4cdbd302125a9edbebddf924ba0af8790f1c"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 29834,
        "name": "funcobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "841000152f79a671d64c9d1135776f35945d1ef0",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:841000152f79a671d64c9d1135776f35945d1ef0/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "0acc6586dd5706813d5cf8bec9b02b3836d4c86b",
            "sha1_git": "8c2213e5bf229aac5a993c1df11ad85ba6900b93",
            "sha256": "217e38014b0db62d1027e62748371cbe4ef805ab124596add77ceec1e9aaff37"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 69404,
        "name": "genobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "8c2213e5bf229aac5a993c1df11ad85ba6900b93",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:8c2213e5bf229aac5a993c1df11ad85ba6900b93/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "352a3ecf798384f189834420c0e46f1fe3e44c38",
            "sha1_git": "75b2fcbd411302f9a892de03cabc391225b03462",
            "sha256": "3c5c6922419db99cad93769b4791b00804da9d382af1f05121a5efefb852f80d"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 9137,
        "name": "iterobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "75b2fcbd411302f9a892de03cabc391225b03462",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:75b2fcbd411302f9a892de03cabc391225b03462/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "615be138edc98fcb6b5cc275e9edeaea39b9c23b",
            "sha1_git": "314a13c4c8fa5af53928f955c014f88cbb10ed24",
            "sha256": "ea79b90820135605eff44ac341412a4b7eb93d013f290abd032ee9ef48b36998"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 88905,
        "name": "listobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "314a13c4c8fa5af53928f955c014f88cbb10ed24",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:314a13c4c8fa5af53928f955c014f88cbb10ed24/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "ca0707e6afa558921b0032d45b2b168e94029e97",
            "sha1_git": "17d27973f82676afaaa4e07cda7b266eec9b7113",
            "sha256": "f06d44798f3f36be52665967e285dce7d7faef7c0bf54e5e89b5749d3ec2584c"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 35733,
        "name": "listsort.txt",
        "perms": 33188,
        "status": "visible",
        "target": "17d27973f82676afaaa4e07cda7b266eec9b7113",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:17d27973f82676afaaa4e07cda7b266eec9b7113/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "24fabaa1a9dfda87fbba4ae7adc28126dd5b029b",
            "sha1_git": "3dab2b98661695a6089d1668d0054c997df09efb",
            "sha256": "571930aaec080e40be73299b2ed8c470f8bd11a2c2408dbc073d5ef67322a281"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 5855,
        "name": "lnotab_notes.txt",
        "perms": 33188,
        "status": "visible",
        "target": "3dab2b98661695a6089d1668d0054c997df09efb",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:3dab2b98661695a6089d1668d0054c997df09efb/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "70824d085b999ae41e7f0ef534cd4d24a308c9bc",
            "sha1_git": "4862b76da6b3574cfb9d5af8f13545114969969c",
            "sha256": "3422d9f6370a8f8d0703bc0248a129ba2037f740698d64a7e4d51e08173d6221"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 170703,
        "name": "longobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "4862b76da6b3574cfb9d5af8f13545114969969c",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:4862b76da6b3574cfb9d5af8f13545114969969c/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "cc1f421502eb8bffd36876cb3fb3504f9208899d",
            "sha1_git": "1b95af2d4a8e8a77f40c78cfe5fca81bdf9da8f1",
            "sha256": "f055f8477dbd93cb927e4b10ba989447a8b612829b449d90d236e066f0108f26"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 90731,
        "name": "memoryobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "1b95af2d4a8e8a77f40c78cfe5fca81bdf9da8f1",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:1b95af2d4a8e8a77f40c78cfe5fca81bdf9da8f1/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "985d0ec87b60e3defda685cfe2699b94739faac1",
            "sha1_git": "4050922e03c1de4a1167928f4a4827ca3aaec145",
            "sha256": "f5b60b9679204f312f223bb4c6c2542c0e34af495a568c52d00cb858fda054b7"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 9318,
        "name": "methodobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "4050922e03c1de4a1167928f4a4827ca3aaec145",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:4050922e03c1de4a1167928f4a4827ca3aaec145/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "c98c7428d8f22453e025b164b7ad5d9209a006e3",
            "sha1_git": "02a8cf0cb6e02f0e3bb45c36ad3cb3d0be675f72",
            "sha256": "62afd975724a767c7e82350b208b1b9575da51045c239a2157eecdc764137a59"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 22704,
        "name": "moduleobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "02a8cf0cb6e02f0e3bb45c36ad3cb3d0be675f72",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:02a8cf0cb6e02f0e3bb45c36ad3cb3d0be675f72/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "f6e9e8606ab83ef5d6cdfa1809b3f022b3ea6d09",
            "sha1_git": "6deca961a4f11796c4e9b0e8f6f34815c5b8b298",
            "sha256": "227a147ebdb5fe74d6d09577f843a7d4e730beffdff5148bf2318e7275b96a2a"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 7291,
        "name": "namespaceobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "6deca961a4f11796c4e9b0e8f6f34815c5b8b298",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:6deca961a4f11796c4e9b0e8f6f34815c5b8b298/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "f854ace2b722ee7d79def51e77ca945b7a7cd474",
            "sha1_git": "2d79e2f9c131d98d47aceea17b4a45e8a0ed8ed8",
            "sha256": "7e1e099f4d7dde602dcf1f129ff7f159822162f4bf78275f4712f7da72edc347"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 60186,
        "name": "object.c",
        "perms": 33188,
        "status": "visible",
        "target": "2d79e2f9c131d98d47aceea17b4a45e8a0ed8ed8",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:2d79e2f9c131d98d47aceea17b4a45e8a0ed8ed8/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "d0aff28ecc1f64244ec7f00c18042d146094dcab",
            "sha1_git": "32e7ecbe1e0436867cca5262abd3e12c8f72f23a",
            "sha256": "d0a72e019c034937c2c8aabbe1c45fa5b37647c729330ca663ccd33a4a1c3d0c"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 81330,
        "name": "obmalloc.c",
        "perms": 33188,
        "status": "visible",
        "target": "32e7ecbe1e0436867cca5262abd3e12c8f72f23a",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:32e7ecbe1e0436867cca5262abd3e12c8f72f23a/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "4166692034f2d4297a779858bd00a3bc53211e53",
            "sha1_git": "771dcc308c51a824e81e8ec2abc5cfdbf1d11e2d",
            "sha256": "7c1c6f2c28d2e6df9c583bc50d1455ebd81a8ef6bbf99073661513a446360350"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 78039,
        "name": "odictobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "771dcc308c51a824e81e8ec2abc5cfdbf1d11e2d",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:771dcc308c51a824e81e8ec2abc5cfdbf1d11e2d/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "a018503c79715e881fd1b1fa72b05a6710c668fe",
            "sha1_git": "554528db0d8c2bb3f6d69393079ce47a184257b8",
            "sha256": "7fd4521973f2e0b695bdc9e3f9f299a588b048cbb40b5e2dcd25584bf3f576ab"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 35125,
        "name": "rangeobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "554528db0d8c2bb3f6d69393079ce47a184257b8",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:554528db0d8c2bb3f6d69393079ce47a184257b8/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "62fd079511e899d5558e6902cb5365e2692fc5af",
            "sha1_git": "a9dba31c4238594049c98f4229f2f3b55ba14585",
            "sha256": "fc1c9053b99d79acebeb1698801653571d19e11c69317a5258043782bda1487c"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 74469,
        "name": "setobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "a9dba31c4238594049c98f4229f2f3b55ba14585",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:a9dba31c4238594049c98f4229f2f3b55ba14585/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "7da3f7dd95a21742eed514cd8312a08096818891",
            "sha1_git": "ebc44642fea423cf703cac5d95dc49985999974a",
            "sha256": "275a8b1158953359acf0d470cd36fdfb73f70c781182e36b0772e0d6af62b164"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 19564,
        "name": "sliceobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "ebc44642fea423cf703cac5d95dc49985999974a",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:ebc44642fea423cf703cac5d95dc49985999974a/",
        "type": "file"
    },
    {
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": null,
        "name": "stringlib",
        "perms": 16384,
        "target": "b8f2a8b7ea2e615d8f9346dded8dbba98edab678",
        "target_url": "https://archive.softwareheritage.org/api/1/directory/b8f2a8b7ea2e615d8f9346dded8dbba98edab678/",
        "type": "dir"
    },
    {
        "checksums": {
            "sha1": "0518ae6ecbd31edb23dc6f2e483538182a662452",
            "sha1_git": "1b71f724a66b096c2e21e6818b8413e522111515",
            "sha256": "de83c295c29fc2ae1e77e9f0f97c8334860a68170e951182ece87c28d3c4419e"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 13428,
        "name": "structseq.c",
        "perms": 33188,
        "status": "visible",
        "target": "1b71f724a66b096c2e21e6818b8413e522111515",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:1b71f724a66b096c2e21e6818b8413e522111515/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "cc4c38c0dc372055911da027ddc5562e834be9eb",
            "sha1_git": "2a9049049935e6bc22f7aeb1653b941ee2130c0f",
            "sha256": "26c7303d620c2a3183917af1de953d8c8466cb32958f2691ad2c7606ebac7cdc"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 31349,
        "name": "tupleobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "2a9049049935e6bc22f7aeb1653b941ee2130c0f",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:2a9049049935e6bc22f7aeb1653b941ee2130c0f/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "27dfabd20908527d3b3181246ad013d4bfe0d1d2",
            "sha1_git": "9eb725f062ba56259f94e4b7318c1854d91fc28f",
            "sha256": "3a217bdb2cba5b4133a03c2cf0b0258fc12cc469bf549468a747cdfd89c2e1ac"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 240911,
        "name": "typeobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "9eb725f062ba56259f94e4b7318c1854d91fc28f",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:9eb725f062ba56259f94e4b7318c1854d91fc28f/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "4fa5e32c1a143dac420651bc53a609688ef19a94",
            "sha1_git": "dc750cc0c41975963fb3af1a94286c6a2e356e5f",
            "sha256": "8eaa0ff0b2fd725087c5deae9bb29c25b3a1aaeca507015d618d41896aabf844"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 3968,
        "name": "typeslots.inc",
        "perms": 33188,
        "status": "visible",
        "target": "dc750cc0c41975963fb3af1a94286c6a2e356e5f",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:dc750cc0c41975963fb3af1a94286c6a2e356e5f/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "b42ad0e76df539b6c34de5c4ea6a27f1f4b4d3e3",
            "sha1_git": "9b6d4adbc7533b5abc00b0e41e0b78872d0560c3",
            "sha256": "ef7b44ad4df7957663eb2845a8923a71681b61f90e8de62feba384bb86a50ba0"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 1246,
        "name": "typeslots.py",
        "perms": 33261,
        "status": "visible",
        "target": "9b6d4adbc7533b5abc00b0e41e0b78872d0560c3",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:9b6d4adbc7533b5abc00b0e41e0b78872d0560c3/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "00bd719b974792253b6748443f87a80ccbbddaa5",
            "sha1_git": "d8c95c8b44cea71ec201812af4a0c4884b933555",
            "sha256": "aefe7bfc42440a76cc0a866e6ef827fc9b19aa5a86f6b38157f0797f58382a50"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 7670,
        "name": "unicodectype.c",
        "perms": 33188,
        "status": "visible",
        "target": "d8c95c8b44cea71ec201812af4a0c4884b933555",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:d8c95c8b44cea71ec201812af4a0c4884b933555/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "8ce068dd7df6a7ba959cf7566cf374eb205f5c3c",
            "sha1_git": "b68042179f0903222254cee885cf161b14b8eefb",
            "sha256": "090645958bc0fc35e340f42b6f09b7323e824d07075e99e72ef93f54757ad4eb"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 464071,
        "name": "unicodeobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "b68042179f0903222254cee885cf161b14b8eefb",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:b68042179f0903222254cee885cf161b14b8eefb/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "bc71c0f9ed394b6cb11997714c757a9004a963be",
            "sha1_git": "39af9208a88b71c2bab7a5f32659fa9ebb1b4375",
            "sha256": "d1a882182112b1a6f930a0a0fc57992cd4b1f6ec189be11194cead4f5fa049be"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 239714,
        "name": "unicodetype_db.h",
        "perms": 33188,
        "status": "visible",
        "target": "39af9208a88b71c2bab7a5f32659fa9ebb1b4375",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:39af9208a88b71c2bab7a5f32659fa9ebb1b4375/",
        "type": "file"
    },
    {
        "checksums": {
            "sha1": "c759e86d5736dba706ecc1cbdcf68b5030ad8f19",
            "sha1_git": "da05950f3f42071d1d8ef0cf1287b05b76a1d13d",
            "sha256": "c166621b7ea57b41c2cad4c6b918509172a40c098ba4969228ac3da4b27ed6c6"
        },
        "dir_id": "06e40820601a63a04fc9f9baa54c442dfbeb1a6c",
        "length": 30201,
        "name": "weakrefobject.c",
        "perms": 33188,
        "status": "visible",
        "target": "da05950f3f42071d1d8ef0cf1287b05b76a1d13d",
        "target_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:da05950f3f42071d1d8ef0cf1287b05b76a1d13d/",
        "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