{"id":51654178,"url":"https://github.com/cca/bynder-archive","last_synced_at":"2026-07-14T07:33:39.283Z","repository":{"id":357669162,"uuid":"1205326330","full_name":"cca/bynder-archive","owner":"cca","description":"Archiving CCA marketing assets in Bynder","archived":false,"fork":false,"pushed_at":"2026-06-01T23:21:22.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-02T01:14:42.047Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://medialibrary.cca.edu","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cca.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-08T21:25:23.000Z","updated_at":"2026-06-01T23:21:26.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cca/bynder-archive","commit_stats":null,"previous_names":["cca/bynder-archive"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cca/bynder-archive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cca%2Fbynder-archive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cca%2Fbynder-archive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cca%2Fbynder-archive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cca%2Fbynder-archive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cca","download_url":"https://codeload.github.com/cca/bynder-archive/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cca%2Fbynder-archive/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35451878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-14T02:00:06.603Z","response_time":114,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-07-14T07:33:38.594Z","updated_at":"2026-07-14T07:33:39.278Z","avatar_url":"https://github.com/cca.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bynder Archiving\n\nTools for downloading and archiving Bynder collections with complete metadata.\n\n- [Bynder JS SDK](https://github.com/Bynder/bynder-js-sdk)\n- [Bynder API Docs](https://api.bynder.com/docs/getting-started)\n\n## Setup\n\n```bash\ncp example.env .env\n# Edit .env and set TOKEN and BYNDER_DOMAIN\npnpm install\npnpm test\n```\n\n## Usage\n\nUse `--help` or `-h` on either script for detailed options.\n\n### List Collections\n\n```bash\n# List collections (default: 50)\nnode src/list-collections.js\n# Filter by name (regex)\nnode src/list-collections.js --name \"MFA\"\n# Filter by media count\nnode src/list-collections.js --min-count 100\nnode src/list-collections.js --min-count 50 --max-count 200\n# Filter by user\nnode src/list-collections.js --user \"Nick\"\n# Filter by visibility\nnode src/list-collections.js --public\nnode src/list-collections.js --private\n# Combine filters\nnode src/list-collections.js --limit 100 --name \"FA23\" --min-count 50 --public\n# JSON output\nnode src/list-collections.js --json\n# Interactive selection and download\nnode src/list-collections.js --interactive\n```\n\n### Bynder API Quirks\n\nA note about collection counts: the `/api/v4/collections` API route returns a `collectionCount` field but it includes deleted assets. Furthermore, `/api/v4/collections/{id}/media` lists only the media IDs and also includes deleted assets. You only finally discover something has been deleted when you fetch it specifically with `/api/v4/media/{id}` and get a 404. One can see this behavior with the [Materials Library collection](https://medialibrary.cca.edu/collections/view/1AF65624-49D8-4FDD-A88021ACA90A0827?viewType=grid) which looks empty in the UI but has 9 deleted assets according to the API.\n\n```sh\n#!/usr/bin/env bash\nID=1AF65624-49D8-4FDD-A88021ACA90A0827\n$ curl --request GET \\\n     --url https://medialibrary.cca.edu/api/v4/collections/$ID/media \\\n     --header \"Authorization: Bearer $TOKEN\" \\\n     --header 'accept: application/json' \u003e media.json\n$ cat media.json\n[\"1B18DB45-4175-4709-8F4E8800827BC9BA\",\"2ACE759E-B377-476C-8FCC5FF0F269C66E\",\"74A09F5E-7D23-4719-BE61CF025F85AFD4\",\"9287D61C-1761-449A-83BA598163414DE1\",\"BBAFEDB8-3D58-4351-9EB9499E1A6CF80A\",\"BFC835AE-C3E6-436F-915DC22F6421C32A\",\"C32739E0-F9E4-4C8D-ADAF6E43B9749981\",\"E167A041-9BE8-403A-945854D3BF7FEE5C\",\"FB422843-BFA8-4022-82B85CFDFD8C8251\"]\n$ jq -r '.[]' media.json | head -n1 | xargs -I {} curl \\\n     --url https://medialibrary.cca.edu/api/v4/media/{} \\\n     --header \"Authorization: Bearer $TOKEN\" \\\n     --header 'accept: application/json' | jq\n{\n  \"message\": \"Media not found\",\n  \"statuscode\": \"404\"\n}\n```\n\n### Download a Collection\n\n```bash\n# Download to default directory (./data)\nnode src/download-collection.js \u003ccollection-id\u003e\n# Custom output directory\nnode src/download-collection.js \u003ccollection-id\u003e -o ./archive/2024\n# Debug mode (print JSON without downloading)\nnode src/download-collection.js \u003ccollection-id\u003e --debug\nDEBUG=true node src/download-collection.js \u003ccollection-id\u003e\n```\n\n## Output Structure\n\n```sh\ndata/\n└── collection-name/\n    ├── _collection-metadata.json\n    ├── asset-name.jpg\n    ├── asset-name.jpg.metadata.json\n    ├── another-asset.pdf\n    └── another-asset.pdf.metadata.json\n```\n\nEach asset includes the original file and a `.metadata.json` file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcca%2Fbynder-archive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcca%2Fbynder-archive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcca%2Fbynder-archive/lists"}