How to archive your Migration Center source content
The Migration Center Pipeline Overview briefly discusses that original source content can be archived in the pipeline. When you archive your source data in Migration Center, you are copying the source data from your original CMS and storing the copy in a location that Migration Center can access. Using Migration Center to search for and retrieve this data, you can use the Migration Center copy for transformation into valid Arc XP ANS.
Archiving source content in Migration Center is optional. You do not have to do this in order to proceed with transforming source content into ANS. You might decide to archive your data in migration center to protect your access to the source data, if the original CMS will shut down before you may be ready to perform your transformations. Or, your connection to the source CMS may be unstable or throttled, slowing down the transformation process.
Archiving source content
Archive your content by POSTing a payload with these fields to the Migration Center API /content/source
endpoint:
{ “sourceContent": {…}, “sourceAdditionalProperties": {...}}
The sourceContent
field holds a JSON version of the original content from the source CMS. Many CMS platforms deliver source content in JSON, but if yours does not you will need to have converted it before it can be archived in Migration Center.
The sourceAdditionalProperties
field can hold any other data that may be helpful during the migration and transformation process but that is not delivered with the actual content. You might, for instance, need to make additional queries to get data vital to the transformation into ANS and update the archived record, using this field to hold those properties. This field offers flexibility to associate ad hoc data with the stored source content. It is a optional field.
The /content/source
API endpoint accepts these query parameters:
-
sourceId={value}
The ID of the content from your source system, which will be used to track the piece of content throughout Migration Center, mandatory. -
sourceType={value}
Describes this content type from your source system, mandatory. This value is something that should make sense in the context of your old system; it does not need to be the same as an Arc XP content type. For example, You may have identified that the original CMS content contains Articles and Blog Posts. In Arc XP these would both be story content types, so one way to approach it would be to assign bothsourceType=story
. But you could also choose to assign them different sourceType values, for example,sourceType=article
andsourceType=blog
. Once you use a sourceType value when archiving you will need to know that value in order to retrieve the content from the API. -
website={value}
An optional query parameter to associate the Arc XP website this content will belong to once it is transformed. The value that you use here is not validated against the actual Arc XP Sites that are set up for your Arc XP organization. It exists as a way to filter and segment source data. -
groupId={value}
An optional query parameter that can be used to group items of source content together. For example, if you are migrating 100 specific pieces of content and you want to be able to easily re-run the migration with these same records, or follow up on the migration by reporting on how many of just these records passed or failed the migration process, you can send each of the items through withgroupId=test_100
.
curl --request POST \ --url 'https: //api.{org}.arcpublishing.com/migrations/v3/content/source ?sourceType=cmsArticle &sourceId=1234.5 &website=myWebsite &groupId=this-content-batch-name' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "sourceContent": { "title": "Associated press story about leading ladies at the latin grammy", "link": "https://website.domain.com/news/entertainment/leading-ladies-at-the-latin-grammy/996452509", "summary": "...", "item_class": "feed-story", "canonical_url": "https:///news/academia-latina-reconoce-a-lila-downs-y-dayanara-torres/996452161", "guid": "996452509", "dateline": "MIAMI", "pub_date": "Fri, 11 Oct 2019 22:03:02 GMT", "last_edit_date": "Tue, 15 Oct 2019 19:30:47 GMT", "full_text": "...", "tags": [ "mus latin grammy", "leading ladies", ], "primary_category": "/News/Telemundo", "images": [ { "url": "https://website.domain.com/photo/2019/10/11/LATIN_GRAMMY-LEADING_LADIES_80302_16558326_ver1.0_640_360.jpg", "originalUrl": "https://website.domain.com/photo/2019/10/11/LATIN_GRAMMY-LEADING_LADIES_80302_16558326_ver1.0.jpg", "imageFileId": 996452175, "caption": "...", "use_restriction": "Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.", "imageTitle": "LATIN_GRAMMY-LEADING_LADIES_80302-9172353.jpg_20191011220512033" } ], "authors": { "author": [ { "name": "Associated Press" } ] } }, "sourceAdditionalProperties": {}}'
Updating meta fields
Use the Migration Center API /inventory-data
endpoint to update the groupId
, website
, and sourceAdditionalProperties
associated with your source content without re-archiving the source content body. The PATCH /inventory-data
endpoint allows you to change these elements of the metadata.
curl --request PATCH \ --url 'https://api.{org}.arcpublishing.com/migrations/v3/inventory-data ?sourceType=cmsArticle &sourceId=1234.5' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "website": "an-updated-website", "groupId": "an-updated-groupid", "sourceAdditionalProperties": { "propertyOne": "value A", "propertyTwo": 2, "propertyThree": [], "propertyFour": {} }}'
Retrieving source content
Use the Migration Center API /report/detail
endpoint to retrieve archived source content. The endpoint requires the following query parameters to bring back archived source content.
-
sourceId={value}
The id of the content from your source system, mandatory. -
sourceType={value}
The type of the content from your source system, mandatory. -
documentType=all
Adds the sourceContent and sourceAdditionalproperties fields to the returned payload
curl --request GET \ --url 'https://api.{org}.arcpublishing.com/migrations/v3/report/detail ?sourceType=cmsArticle &sourceId=1234.5 &documentType=all' \ --header 'Authorization: Bearer <token>'
Resources
Migration Center API Documentation - /content/source
, /report/detail
, /inventory-data
endpoints