Mapping Microsoft SharePoint Managed Metadata Using REST API
Learn how to map Microsoft SharePoint managed metadata for migration jobs using the DryvIQ REST API.
Table of Contents
Overview
Microsoft SharePoint products support managed metadata. When using DryvIQ to move content between SharePoint systems, you can map your managed metadata to ensure the information transfers. For more information about managed metadata, refer to Microsoft’s documentation for managed metadata in SharePoint.
Retrieving Managed Metadata
You can send a GET request through the REST API to retrieve the metadata for a Microsoft connection. You can retrieve the metadata for a file based on its path. Note that the path should include both the library name and the file name: library/file.ext.
GET {{url}}v1/connections/{connectionID}/files/metadata?path=path
The request returns the file's metadata. Record the managed metadata column name and value GUID. Alternatively, you can look up value GUIDs in the Term Store management tool in the SharePoint site settings. Once you have the column names and term values, you can create a job with a metadata map.
Adding Managed Metadata When Creating a Job
To set up content type metadata mapping when creating a job, you must create a choice map that maps the source values to the destination values using the information provided by the GET metadata_schema endpoint. This information is added to the metadata_map section in the transfer block.
{
"transfer": {
"metadata_map": {
"schemas": [{
"mappings": [{
"source": {
"property": {
"name": "Source Managed Metadata column Name"
}
},
"destination": {
"property": {
"name": "Destination Managed Metadata column Name"
}
},
"choices": [{
"source": {
"value": "Source GUID"
},
"destination": {
"value": "Destination GUID"
}
}
]
}
]
}
]
}
}
}