这个问题通常是由于您正在使用 Autodesk Forge API 的补丁请求,并且输入的项目格式不正确。如果您收到此错误,请参考下面的解决方法。
首先,请确保您正在使用正确的路径和参数。以下是一个示例,显示如何正确使用 Forge API 中的补丁请求。
// 使用 Axios 或类似库创建 HTTP 请求
axios.patch(
  'https://developer.api.autodesk.com/data/v1/projects/:project_id/items/:item_id',
  {
    "jsonapi": {
      "version": "1.0"
    },
    "data": {
      "type": "items",
      "id": ":item_id",
      "attributes": {
        "displayName": "New Display Name"
      }
    }
  },
  {
    headers: {
      'Authorization': 'Bearer ' + access_token,
      'Content-Type': 'application/vnd.api+json'
    }
  }
).then(response => {
  // 处理响应内容
}).catch(error => {
  console.error(error);
});
在上面的示例中,我们使用 Axios 库创建了一个 HTTP 补丁请求并传递了项目 ID 和项目名称作为参数。除此之外,我们还传入了一个包含访问令牌和“Content-Type”标头的请求标头。
确保您的请求参数与上述示例相似,并使用正确的项目 ID 和项目名称。
使用正确的请求参数后,如果您仍然遇到问题,请检查您的访问令牌是否有效或是否已过期。如果您不确定访问令牌的有效性,请从 Autodesk Forge 开发人员控制台获取一个新的访问令牌。
希望这个解决方案能够帮助您解决自己的 Autodesk Forge API - Patch Item Input Error 问题。