我有一个类似于$"https://graph.microsoft.com/v1.0/{_config.SubBaseUrl}/items?expand=fields(select=id,Title,MFG_Name,Manufacturer Part Number)“的查询
如何选择带有空格的列名,如“制造商部件号”,这样就不会出现无效路径错误?
发布于 2021-10-18 05:54:39
将字段名称中的空格替换为_x0020_
https://graph.microsoft.com/v1.0/{_config.SubBaseUrl}/items?expand=fields(select=id,Title,MFG_Name,Manufacturer_x0020_Part_x0020_Number)
另一种选择是使用不带select
的expand
调用query,并检查带有空格的列的格式。有时Graph API返回没有空格的列名。
https://graph.microsoft.com/v1.0/{_config.SubBaseUrl}/items?expand=fields
因此,for Manufacturer Part Number
接口可能会返回ManufacturerPartNumber
。
https://stackoverflow.com/questions/69587326
复制相似问题