Scripts for mapping content migration

Providing you with scripts to prepare your content for migration, reducing errors, and increasing your odds at successful write API calls.

An image of Prismic Migration API scripts GitHub repo.

Migration API scripts to create and update content in bulk

Take advantage of our latest resources if you want to create or update a lot of content in your repository programmatically

Alaina Koerber

Alaina Koerber

May 15, 2024

A bulk update script to quickly update existing content

Often, you need to update your documents in bulk – for example if you decide to change a translation of a common term or replace a widely-used asset with a different one.

With the help of a bulk update script, automating these updates via the Migration API saves time and ensures you cover all affected documents. We cover the following examples:

  • Retrieving all existing documents from the Document API
  • Or fetching documents in batches if you have a repo with a lot of content
  • Inserting a new field with new content in each document
  • Making a PUT request to the Migration API using the updated document content

Alaina Koerber

Alaina Koerber

April 22, 2024

Example scripts for Migration API to automate your content import

On the basis of an example of migrating HTML content of a 2 language website into a new Prismic repo, the Migration API scripts demonstrate the following steps:

  • Extracting and uploading of media to the Asset API, either via URL or via files
  • Inserting media ids into your document content
  • POSTing documents
  • Creating localized translations of original language documents
  • Updating content to resolve links between documents

What else is cooking

Updated Invalid Date

General availability of the Migration API

Updated Invalid Date

Publish 3,000 migrated documents at once

Fresh out of the oven


Deprecate the legacy import/export feature

Shipped April 30, 2024

View and edit migration release documents

Shipped March 18, 2024

More capabilities for bulk updates

Shipped March 15, 2024

Discover why we are focusing on the Migration API

Visit the announcement page to discover why this feature was prioritized and explore other enhancements we're planning to offer you a robust Migration API.

Follow progress

We’re shipping every week. See what’s fresh out of the oven, what’s coming up, or submit an idea for a new feature.