{"id":19294584,"url":"https://github.com/web3-storage/linkdex-api","last_synced_at":"2026-05-14T08:41:01.277Z","repository":{"id":58640074,"uuid":"531994836","full_name":"web3-storage/linkdex-api","owner":"web3-storage","description":"REST API for checking if a DAG is complete across one or more CARs","archived":false,"fork":false,"pushed_at":"2023-05-11T13:59:32.000Z","size":352,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-05T21:10:56.408Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/web3-storage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-02T16:10:07.000Z","updated_at":"2023-10-05T14:30:57.000Z","dependencies_parsed_at":"2024-11-09T22:38:54.510Z","dependency_job_id":"c10730be-f69c-4ed0-91ec-6e03646021ce","html_url":"https://github.com/web3-storage/linkdex-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Flinkdex-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Flinkdex-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Flinkdex-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Flinkdex-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/web3-storage","download_url":"https://codeload.github.com/web3-storage/linkdex-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240397571,"owners_count":19794885,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T22:38:46.884Z","updated_at":"2026-05-14T08:41:01.218Z","avatar_url":"https://github.com/web3-storage.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# linkdex-api\n\nA lambda and REST api to check DAG completeness across one or more CARs\n\nGive it an s3 key to a CAR you just upladed as `key`, and it tells you if we have a complete DAG for the root CID.\n\nWe check if the key provided exists first. If you know the path and hash of CAR then you are probably dotStorage.\n\n```console\ncurl https://linkdex.api?key=raw/bafy/userid-ish/1.car\n{\n  cars: [\n    'raw/bafybeifxyl3vcq4utm4rwfmoqn3cryc7bmuu3rxz47mrgftmayem3sewum/user/part1.car',\n    'raw/bafybeifxyl3vcq4utm4rwfmoqn3cryc7bmuu3rxz47mrgftmayem3sewum/user/part2.car'\n  ],\n  structure: 'Partial',\n  blocksIndexed: 4,\n  uniqueCids: 3,\n  undecodeable: 0\n```\n\nUses [`linkdex`](https://github.com/web3-storage/linkdex) to figure out if the dag the DAG structure\n\n## Getting started\n\nUses [SST](https://sst.dev) to wrangle AWS infra. Ensure you are logged in to aws-cli locally then\n\n```console\n# install deps\n$ npm i\n\n# test it. Uses docker, check dag completeness over CARs in an S3\n$ npm test -w services\n\n# deploy dev infra\n$ npm start\n```\n\nYou now have a dev copy of the infra deployed pointing to an empty bucket. You should add some cars under `raw/\u003ccid\u003e/\u003cuid\u003e/\u003cfoo.car\u003e` and then query for them to try it out.\n\nTo test it against the `staging` dotstorage bucket you need to\n- open `.env` and uncomment the `BUCKET_NAME` var.\n- sign in to the `aws` cli with a user on the `nitro` account, or set up a profile by adding keys to your `~/.aws/credentials` file like\n\n```\n[nitro]\naws_access_key_id = \u003cyour key id here\u003e\naws_secret_access_key = \u003cyour secret key here\u003e\n```\n\n- deploy using that profile like \n```shell\n$ AWS_PROFILE=nitro npx sst deploy --stage \u003cyour username, e.g olizilla\u003e\nStack olizilla-linkdex-api-LinkdexStack\n  Status: deployed\n  Outputs:\n    ApiEndpoint: https://???.execute-api.us-east-2.amazonaws.com\n```\n  - the `stage` value is used as a prefix on all the resources to identify them, allowing multiple environements to co-exist on a single account.\n- the lambda and api will be deployed to `us-east-2` by default as defined in `sst.json`\n- the `ApiEndpoint` is given at the end of the deployment and can now be used to test out the api\n```shell\ncurl -sS 'https://???.execute-api.us-east-2.amazonaws.com?key=raw/bafkreia223gzz3t46ajnosijo3mgajipbyjyikwbhbkabmsqdal6o4k6uu/315318734258473247/ciqi26nuu3dnsi2dirisvxmz3jlamyocdpmfpdpxniktfjsffmcodnq.car' | jq\n{\n  \"cars\": [\n    \"raw/bafkreia223gzz3t46ajnosijo3mgajipbyjyikwbhbkabmsqdal6o4k6uu/315318734258473247/ciqi26nuu3dnsi2dirisvxmz3jlamyocdpmfpdpxniktfjsffmcodnq.car\"\n  ],\n  \"structure\": \"Complete\",\n  \"blocksIndexed\": 1,\n  \"uniqueCids\": 1,\n  \"undecodeable\": 0\n}\n```\n\nsee: https://sst.dev/chapters/configure-the-aws-cli.html\n\n\n## Outputs\n\nWhen deploying `linkdex-api` the following \"outputs\" are reported\n\n- `CustomDomain` – Human friendly alias for the ApiEnpoint. Limited to 30s max response time.\n- `ApiEndpoint` – Generated api gateway url. Useful for debugging other access routes.\n\nWhen configuring prod, get the Function URL from the aws console for the prod worker.\n- find the prod worker lambda name in the seed.run dashboard\n- in the aws console, go to the lambda page, look up the lambda by name, in the prod region. The Function URL is listed in the overview.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3-storage%2Flinkdex-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweb3-storage%2Flinkdex-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3-storage%2Flinkdex-api/lists"}