{"id":14991093,"url":"https://github.com/contentful/contentful-import","last_synced_at":"2026-04-29T22:04:04.574Z","repository":{"id":12257216,"uuid":"64304630","full_name":"contentful/contentful-import","owner":"contentful","description":"Node module that uses the data provided by contentful-export to import it to contentful space","archived":false,"fork":false,"pushed_at":"2026-04-22T14:49:07.000Z","size":14067,"stargazers_count":103,"open_issues_count":40,"forks_count":39,"subscribers_count":72,"default_branch":"main","last_synced_at":"2026-04-22T23:03:10.841Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/contentful.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":".github/CODEOWNERS","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":"2016-07-27T11:55:44.000Z","updated_at":"2026-04-16T21:49:49.000Z","dependencies_parsed_at":"2024-01-23T01:42:20.759Z","dependency_job_id":"e63a4fcb-3a46-446c-9c82-b2976d4eb248","html_url":"https://github.com/contentful/contentful-import","commit_stats":{"total_commits":950,"total_committers":55,"mean_commits":"17.272727272727273","dds":0.5484210526315789,"last_synced_commit":"00d9e303c24226d264eb2df867a549c8e18ecef9"},"previous_names":[],"tags_count":452,"template":false,"template_full_name":null,"purl":"pkg:github/contentful/contentful-import","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentful%2Fcontentful-import","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentful%2Fcontentful-import/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentful%2Fcontentful-import/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentful%2Fcontentful-import/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/contentful","download_url":"https://codeload.github.com/contentful/contentful-import/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentful%2Fcontentful-import/sbom","scorecard":{"id":303428,"data":{"date":"2025-08-11","repo":{"name":"github.com/contentful/contentful-import","commit":"7c9952ed5faeaefcd88e23e07b42eda24f9f55fe"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":7,"checks":[{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"29 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":9,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:17","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:18","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/dependabot-approve-and-request-merge.yml:8","Warn: no topLevel permission defined: .github/workflows/codeql.yml:1","Warn: no topLevel permission defined: .github/workflows/dependabot-approve-and-request-merge.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/contentful/contentful-import/codeql.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/contentful/contentful-import/codeql.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/contentful/contentful-import/codeql.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dependabot-approve-and-request-merge.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/contentful/contentful-import/dependabot-approve-and-request-merge.yml/main?enable=pin","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/contentful/.github/SECURITY.md:1","Info: Found linked content: github.com/contentful/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/contentful/.github/SECURITY.md:1","Info: Found text in security policy: github.com/contentful/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":5,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'main'","Warn: 'stale review dismissal' is disabled on branch 'main'","Warn: required approving review count is 1 on branch 'main'","Info: codeowner review is required on branch 'main'","Warn: 'last push approval' is disabled on branch 'main'","Info: status check found to merge onto on branch 'main'","Info: PRs are required in order to make changes on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 2 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-x4c5-c7rf-jjgv","Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T21:21:25.042Z","repository_id":12257216,"created_at":"2025-08-17T21:21:25.043Z","updated_at":"2025-08-17T21:21:25.043Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32445572,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T20:22:27.477Z","status":"ssl_error","status_checked_at":"2026-04-29T20:22:26.507Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-09-24T14:21:27.880Z","updated_at":"2026-04-29T22:04:04.569Z","avatar_url":"https://github.com/contentful.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Contentful import tool\n\n[![npm](https://img.shields.io/npm/v/contentful-import.svg)](https://www.npmjs.com/package/contentful-import)\n[![CI](https://github.com/contentful/contentful-import/actions/workflows/main.yaml/badge.svg)](https://github.com/contentful/contentful-import/actions/workflows/main.yaml)\n\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)\n\n[Contentful](https://www.contentful.com) provides a content infrastructure for digital teams to power content in websites, apps, and devices. Unlike a CMS, Contentful was built to integrate with the modern software stack. It offers a central hub for structured content, powerful management and delivery APIs, and a customizable web app that enable developers and content creators to ship digital products faster.\n\nThis library helps you to import files generated by [contentful-export](https://github.com/contentful/contentful-export) to a destination space.\n\n## :exclamation: Usage as CLI\n\n\u003e We moved the CLI version of this tool into our [Contentful CLI](https://github.com/contentful/contentful-cli). This allows our users to use and install only one single CLI tool to get the full Contentful experience.\n\u003e\n\u003e Please have a look at the [Contentful CLI import command documentation](https://github.com/contentful/contentful-cli/tree/master/docs/space/import) to learn more about how to use this as command line tool.\n\n## :cloud: Pre-requisites \u0026\u0026 Installation\n\n### Pre-requisites\n\n- Node \u003e= 22\n\n### Installation\n\n```bash\nnpm install contentful-import\n```\n\n## :hand: Usage as a module\n\n```javascript\nconst contentfulImport = require('contentful-import')\n\nconst options = {\n  content: {entries:..., contentTypes:..., locales:...},\n  spaceId: '\u003cspace_id\u003e',\n  managementToken: '\u003ccontent_management_api_key\u003e',\n  ...\n}\n\ncontentfulImport(options)\n  .then(() =\u003e {\n    console.log('Data imported successfully')\n  })\n  .catch((err) =\u003e {\n    console.log('Oh no! Some errors occurred!', err)\n  })\n```\n\nUsing ESM:\n\n```javascript\nimport spaceImport from \"contentful-import\";\n```\n\nor\n\n```javascript\nconst contentfulImport = require('contentful-import')\n\nconst options = {\n  contentFile: '/path/to/result/of/contentful-export.json',\n  spaceId: '\u003cspace_id\u003e',\n  managementToken: '\u003ccontent_management_api_key\u003e',\n  ...\n}\n\ncontentfulImport(options)\n  .then(() =\u003e {\n    console.log('Data imported successfully')\n  })\n  .catch((err) =\u003e {\n    console.log('Oh no! Some errors occurred!', err)\n  })\n```\n\n## 💾 Usage as a CLI executable\n\n1. Build the package:\n\n```bash\n$ npm run build\n```\n\n2. Execute the CLI tool by running the binary and passing the required parameters\n\n```bash\n$ ./bin/contentful-cli \\\n--space-id \u003cspace-id\u003e \\\n--management-token \u003cmanagement-token\u003e \\\n--content-file \u003ccontent-file\u003e\n```\n\n#### Import an environment\n\n```javascript\nconst contentfulImport = require('contentful-import')\n\nconst options = {\n  contentFile: '/path/to/result/of/contentful-export.json',\n  spaceId: '\u003cspace_id\u003e',\n  managementToken: '\u003ccontent_management_api_key\u003e',\n  environmentId: '\u003cenvironment_id\u003e',\n  ...\n}\n\ncontentfulImport(options)\n...\n```\n\n## :gear: Configuration options\n\n### Basics\n\n#### `spaceId` [string] [required]\n\nID of the space to import into\n\n#### `environmentId` [string] [default: 'master']\n\nID of the environment in the destination space\n\n#### `managementToken` [string] [required]\n\nContentful management API token for the space to be imported to\n\n#### `contentFile` [string]\n\nPath to JSON file that contains data to be import to your space\n\n#### `content` [object]\n\nContent to import. Needs to match the expected structure (See below)\n\n### Filtering\n\n#### `contentModelOnly` [boolean] [default: false]\n\nImport content types only\n\n#### `skipContentModel` [boolean] [default: false]\n\nSkip importing of content types and locales\n\n#### `skipLocales` [boolean] [default: false]\n\nSkip importing of locales\n\n#### `skipContentUpdates` [boolean] [default: false]\n\nSkip updating existing content\n\n#### `skipContentPublishing` [boolean] [default: false]\n\nSkips content publishing. Creates content but does not publish it\n\n### Assets\n\n#### `uploadAssets` [boolean] [default: false]\n\nUpload local asset files downloaded via the [downloadAssets](https://github.com/contentful/contentful-export#downloadassets-boolean) option of the export. Requires `assetsDirectory`\n\n#### `skipAssetUpdates` [boolean] [default: false]\n\nSkip updating existing assets\n\n#### `assetsDirectory` [string]\n\nPath to a directory with an asset export made using the [downloadAssets](https://github.com/contentful/contentful-export#downloadassets-boolean) option of the export. Requires `uploadAssets`\n\n#### `timeout` [number] [default: 3000]\n\nTime between retries on asset processing\n\n#### `retryLimit` [number] [default: 10]\n\nMaximum number of retries for asset processing\n\n### Connection\n\n#### `host` [string] [default: 'api.contentful.com']\n\nThe Management API host\n\n#### `proxy` [string]\n\nProxy configuration in HTTP auth format: `host:port` or `user:password@host:port`\n\n#### `rawProxy` [boolean]\n\nPass proxy config to Axios instead of creating a custom httpsAgent\n\n#### `rateLimit` [number] [default: 7]\n\nMaximum requests per second used for API requests\n\n#### `headers` [object]\n\nAdditional headers to attach to the requests.\n\n### Other\n\n#### `errorLogFile` [string]\n\nFull path to the error log file\n\n#### `useVerboseRenderer` [boolean] [default: false]\n\nDisplay progress in new lines instead of displaying a busy spinner and the status in the same line. Useful for CI.\n\n#### `config` [string]\n\nPath to a JSON file with the configuration options. This file will be merged with the options passed to the function. The options passed to the function will take precedence over the ones in the config file.\n\n## :rescue_worker_helmet: Troubleshooting\n\n### Proxy\n\nUnable to connect to Contentful through your Proxy? Try to set the `rawProxy` option to `true`.\n\n```javascript\ncontentfulImport({\n  proxy: 'https://cat:dog@example.com:1234',\n  rawProxy: true,\n  ...\n})\n```\n\n### Embargoed Assets\n\nIf a space is configured to use the [embargoed assets feature](https://www.contentful.com/help/media/embargoed-assets/), certain options will need to be set to use the export/import tooling. When exporting content ([using `contentful-export`](https://github.com/contentful/contentful-export)), the `downloadAssets` option must be set to `true`. This will download the asset files to your local machine. Then, when importing content, the `uploadAssets` option must be set to `true` and the `assetsDirectory` must be set to the directory that contains all of the exported asset folders.\n\n```javascript\nconst contentfulImport = require('contentful-import')\n\nconst options = {\n  contentFile: '/path/to/result/of/contentful-export.json',\n  spaceId: '\u003cspace_id\u003e',\n  managementToken: '\u003ccontent_management_api_key\u003e',\n  uploadAssets: true,\n  assetsDirectory: '/path/to/exported/assets.json'\n}\n\ncontentfulImport(options)\n```\n\n## :card_file_box: Expected input data structure\n\nThe data to import should be structured like this:\n\n```json\n{\n  \"contentTypes\": [],\n  \"entries\": [],\n  \"assets\": [],\n  \"locales\": [],\n  \"webhooks\": [],\n  \"roles\": [],\n  \"tags\": [],\n  \"editorInterfaces\": []\n}\n```\n\nNote: `tags` are not available for all users. If you do not have access to this feature, any tags included in your import data will be skipped.\n\n## :bulb: Importing to a space with existing content\n\n- Both source space and destination space must share the same content model structure. In order to achieve that, please use [contentful-migration](https://www.npmjs.com/package/contentful-migration).\n- Content transformations are also not supported, please use [contentful-migration](https://www.npmjs.com/package/contentful-migration).\n- Entities existence are determined based on their ID:\n  - If an entity does not exist in the destination space, it will be created.\n  - If an entity already exists in the destination space, it will be updated.\n- Publishing strategy:\n  - If an entity is in draft, it will be created as draft in the destination space.\n  - If an entity is published and has pending changes (updated) in the source space, it will be published with the latest changes in the destination space.\n\n## :warning: Limitations\n\n- This tool currently does **not** support the import of space memberships.\n- This tool currently does **not** support the import of roles.\n- This tool is expecting the target space to have the same default locale as your previously exported space.\n- Imported webhooks with credentials will be imported as normal webhooks. Credentials should be added manually afterwards.\n- Imported webhooks with secret headers will be imported without these headers. Secret headers should be added manuall afterwards.\n- If you have custom UI extensions, you need to reinstall them manually in the new space.\n\n## :memo: Changelog\n\nRead the [releases](https://github.com/contentful/contentful-import/releases) page for more information.\n\n## :scroll: License\n\nThis project is licensed under MIT license\n\n[1]: https://www.contentful.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontentful%2Fcontentful-import","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontentful%2Fcontentful-import","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontentful%2Fcontentful-import/lists"}