I want to create a list managed metadata column, using the request to the endpoint _api/web/Lists(guid'####-####-#####')/fields
, but with no luck, got such an error "One or more field types are not installed properly. Go to the list settings page to delete these fields."
Can someone provide me with a solution to my problem?
Here is the example:
POST https://sites/site/_api/web/Lists(guid'####-####-#####')/fields
with the body:
{
"AllowMultipleValues": false,
"AnchorId": "00000000-0000-0000-0000-000000000000",
"AutoIndexed": false,
"CanBeDeleted": true,
"ClientSideComponentId": "00000000-0000-0000-0000-000000000000",
"ClientSideComponentProperties": null,
"CreateValuesInEditForm": false,
"CustomFormatter": null,
"DefaultFormula": null,
"DefaultValue": "",
"DependentLookupInternalNames": [],
"Description": "",
"Direction": "none",
"EnforceUniqueValues": false,
"EntityPropertyName": "MM",
"FieldTypeKind": 0,
"Filterable": true,
"FromBaseType": false,
"Group": "Custom Columns",
"Hidden": false,
"Indexed": false,
"InternalName": "MM",
"IsAnchorValid": true,
"IsDependentLookup": false,
"IsKeyword": false,
"IsPathRendered": false,
"IsRelationship": true,
"IsTermSetValid": true,
"JSLink": "SP.UI.Taxonomy.js|SP.UI.Rte.js(d)|SP.Taxonomy.js(d)|ScriptForWebTaggingUI.js(d)",
"LookupField": "Term$Resources:core,Language;",
"LookupList": "{af06326b-1915-48f2-8259-7201ee078854}",
"LookupWebId": "ea352058-5ae8-4e64-95b2-4cee1b0f46c9",
"Open": true,
"PinnedToFiltersPane": false,
"PrimaryFieldId": null,
"ReadOnlyField": false,
"RelationshipDeleteBehavior": 0,
"Required": false,
"SchemaXml": "<Field Type=\"TaxonomyFieldType\" DisplayName=\"MM\" List=\"{af06326b-1915-48f2-8259-7201ee078854}\" WebId=\"ea352058-5ae8-4e64-95b2-4cee1b0f46c9\" ShowField=\"Term1033\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\" ID=\"{ebcf3604-5913-4349-a071-f41570148eec}\" SourceID=\"{e8776034-8684-4238-9519-94443a65381e}\" StaticName=\"MM\" Name=\"MM\" ColName=\"int1\" RowOrdinal=\"0\" Version=\"1\"><Default /><Customization><ArrayOfProperty><Property><Name>SspId</Name><Value xmlns:q1=\"http://www.w3.org/2001/XMLSchema\" p4:type=\"q1:string\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">a1796552-9a87-4f1d-95d5-b4a3fc8f143d</Value></Property><Property><Name>GroupId</Name></Property><Property><Name>TermSetId</Name><Value xmlns:q2=\"http://www.w3.org/2001/XMLSchema\" p4:type=\"q2:string\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">67332539-d286-45b3-bf47-21a294ae4b4f</Value></Property><Property><Name>AnchorId</Name><Value xmlns:q3=\"http://www.w3.org/2001/XMLSchema\" p4:type=\"q3:string\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">00000000-0000-0000-0000-000000000000</Value></Property><Property><Name>UserCreated</Name><Value xmlns:q4=\"http://www.w3.org/2001/XMLSchema\" p4:type=\"q4:boolean\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">false</Value></Property><Property><Name>Open</Name><Value xmlns:q5=\"http://www.w3.org/2001/XMLSchema\" p4:type=\"q5:boolean\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">true</Value></Property><Property><Name>TextField</Name><Value xmlns:q6=\"http://www.w3.org/2001/XMLSchema\" p4:type=\"q6:string\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">{b21a872f-ff59-442f-bcce-134621d3a522}</Value></Property><Property><Name>IsPathRendered</Name><Value xmlns:q7=\"http://www.w3.org/2001/XMLSchema\" p4:type=\"q7:boolean\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">false</Value></Property><Property><Name>IsKeyword</Name><Value xmlns:q8=\"http://www.w3.org/2001/XMLSchema\" p4:type=\"q8:boolean\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">false</Value></Property><Property><Name>TargetTemplate</Name></Property><Property><Name>CreateValuesInEditForm</Name><Value xmlns:q9=\"http://www.w3.org/2001/XMLSchema\" p4:type=\"q9:boolean\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">false</Value></Property><Property><Name>FilterAssemblyStrongName</Name><Value xmlns:q10=\"http://www.w3.org/2001/XMLSchema\" p4:type=\"q10:string\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">Microsoft.SharePoint.Taxonomy, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Value></Property><Property><Name>FilterClassName</Name><Value xmlns:q11=\"http://www.w3.org/2001/XMLSchema\" p4:type=\"q11:string\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">Microsoft.SharePoint.Taxonomy.TaxonomyField</Value></Property><Property><Name>FilterMethodName</Name><Value xmlns:q12=\"http://www.w3.org/2001/XMLSchema\" p4:type=\"q12:string\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">GetFilteringHtml</Value></Property><Property><Name>FilterJavascriptProperty</Name><Value xmlns:q13=\"http://www.w3.org/2001/XMLSchema\" p4:type=\"q13:string\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">FilteringJavascript</Value></Property></ArrayOfProperty></Customization></Field>",
"Scope": "/sites/...",
"Sealed": false,
"ShowInFiltersPane": 0,
"Sortable": true,
"SspId": "a1796552-9a87-4f1d-95d5-b4a3fc8f143d",
"StaticName": "MM",
"TargetTemplate": null,
"TermSetId": "67332539-d286-45b3-bf47-21a294ae4b4f",
"TextField": "b21a872f-ff59-442f-bcce-134621d3a522",
"Title": "MM",
"TypeAsString": "TaxonomyFieldType",
"TypeDisplayName": "Managed Metadata",
"TypeShortDescription": "Managed Metadata",
"UnlimitedLengthInDocumentLibrary": false,
"UserCreated": false,
"ValidationFormula": null,
"ValidationMessage": null,
"odata.id": "id-value",
"odata.type": "SP.Taxonomy.TaxonomyField"
}
error:
{
"odata.error": {
"code": "-2130575340, Microsoft.SharePoint.SPException",
"message": {
"lang": "en-US",
"value": "One or more field types are not installed properly. Go to the list settings page to delete these fields."
}
}
}