Skip to main content
Identities

获取 Identity Config

获取某个 Identity 与 Template 的用户级配置。

GET /api/v1/forward/identities/{identity_id}/templates/{template_id}/config 返回存储的 Forward Identity Config DSL;这是覆盖层,不是编译后的运行时配置。

请求头

Header是否必填说明
AuthorizationBearer <PAT 或 SAT>

路径参数

参数类型是否必填说明
identity_idstringForward Identity ID。
template_idstringForward Template ID。

示例请求

curl -s -X GET 'https://api.qoder.com/api/v1/forward/identities/idn_019eabc123/templates/tmpl_support/config' \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN"

示例响应

HTTP 200 OK
{
  "type": "config",
  "identity_id": "idn_019eabc123",
  "template_id": "tmpl_support",
  "name": "CRM profile",
  "status": "active",
  "identity_config": {
    "system": {
      "mode": "append",
      "content": "Prefer CRM data when answering."
    },
    "skills": {
      "skill_019f18f2749e": {
        "enabled": true
      }
    },
    "environment_variables": {
      "CRM_REGION": {
        "op": "set",
        "value": "cn-shanghai"
      },
      "LEGACY_CRM_MODE": {
        "op": "unset"
      }
    },
    "github_repositories": {
      "source": {
        "mount_path": "/data/workspace/support-agent"
      },
      "legacy": {
        "enabled": false
      }
    }
  },
  "metadata": {},
  "created_at": "2026-06-18T10:00:00Z",
  "updated_at": "2026-06-18T10:00:00Z"
}

响应字段

字段类型说明
typestring固定为 config
identity_configobject存储的用户级覆盖 DSL。
metadataobject业务元数据。

错误

HTTPTypeCode触发条件
404not_found_error-Identity、Template 或 Config 不存在。
401authentication_errorauthentication_requiredPAT 或 SAT 无效或已过期。

备注

  • 要查看编译后的运行时配置,请使用 Get Effective Config。
  • 资源 map 中的 enabled=false 会禁用从 Template 继承的资源。
  • environment_variables 返回存储的 set / unset 覆盖 DSL;编译后的变量值请查看 Effective Config。
  • GitHub 仓库覆盖会返回 urlmount_pathenabled 等已存字段,但不会返回 write-only 的 authorization_token

相关