如何在SharePoint中使用REST API创建托管元数据列?

问题描述

我想使用REST API在SharePoint中创建托管元数据列,任何人都可以帮助我。我尝试使用下面的代码,但出现400错误

export async function createColumn(digest: string){
    getColumnData();
    //const xRequestDigestValue = await fetchFormDigestValue();
    const url = "https://test.sharepoint.com/sites/Test/_api/web/lists/getByTitle('MyList')/fields";
    const response = await fetch(url,{
       method: 'POST',credentials: 'include',headers: {
           'Accept': 'application/json;odata=verbose','Content-Type': 'application/json;odata=noMetadata','x-RequestDigest': digest
       },body: JSON.stringify({
          required: true,FieldTypeKind: 0,Title : 'Language'
       })
    });
    console.log(response);
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)