如何在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 (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...