You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Autodesk AEC Data Model API的projectByDataManagementAPIId无法获取项目

解决AEC Data Model Explorer中projectByDataManagementAPIId查询的ID格式错误

我正在使用Autodesk AEC Data Model Explorer,通过Data Management API获取的项目ID调用projectByDataManagementAPIId查询项目详情,使用的GraphQL语句如下:

query Get {
  projectByDataManagementAPIId(dataManagementAPIProjectId:"b.b1932870-41d1-4010-a97b-fa25d807217f") {
    id
    name
  }
}

执行后收到错误,提示ID格式无效:

{
  "data": {
    "projectByDataManagementAPIId": null
  },
  "errors": [
    {
      "message": "The following ID is malformed: b.b1932870-41d1-4010-a97b-fa25d807217f.",
      "locations": [
        {
          "line": 1,
          "column": 18
        }
      ],
      "path": [
        "projectByDataManagementAPIId"
      ],
      "extensions": {
        "correlation_id": "f3aa9769-9680-4e57-96b4-ef1159945ddf",
        "code": "BAD_REQUEST",
        "errorType": "UNAVAILABLE",
        "errorDetail": "SERVICE_ERROR"
      }
    }
  ],
  "extensions": {
    "pointValue": {
      "requestedQueryPointValue": 10
    }
  }
}

已尝试以下操作但问题未解决:

  • 确认b.b1932870-41d1-4010-a97b-fa25d807217f是从Data Management API获取的正确项目ID
  • 去掉b.前缀使用b1932870-41d1-4010-a97b-fa25d807217f,仍提示格式错误
  • 仅使用GUID部分1932870-41d1-4010-a97b-fa25d807217f,错误依旧
  • 对ID进行base64编码,问题仍存在

排查与解决方案

  1. 确认ID大小写与完整性
    Autodesk的项目ID是大小写敏感的,确保你传入的ID和Data Management API返回的id字段完全一致,包括b.前缀的小写格式,不要遗漏或修改任何字符。

  2. 检查令牌环境与权限匹配
    确保用于AEC Data Model Explorer的访问令牌,和获取该项目ID时使用的Data Management API令牌属于同一环境(生产环境/沙盒环境),且令牌拥有该项目的读取权限。如果令牌环境不匹配,即使ID正确也会被判定为格式无效。

  3. 验证项目ID的可访问性
    用当前令牌调用Data Management API的GET /projects/{projectId}接口,确认能正常返回项目信息。如果这个接口也报错,说明问题出在令牌权限或项目本身的可访问性,而非AEC Explorer的查询格式。

  4. 确认查询字段的正确性
    检查GraphQL查询中的参数名是否为dataManagementAPIProjectId,确保拼写无误,参数值的引号是英文双引号,没有转义错误。

内容的提问来源于stack exchange,提问作者Pierre Wehbi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.17 12:10:15