查询目录数据源配置接口

将 <BASE_URL> 替换为所在企业环境的 API 域名。

  • Scope:admin.v1.directory-sync-config.read
  • 权限项:用户同步配置读取(directory-sync-config)
  • 权限类型:读取
  • 接口:GET/api/openapi/v1/directory-sync/sources

认证与请求头

使用应用 API Key 调用。当前接口只校验上方独立 Scope;读取、管理与执行权限互不隐含。

名称位置类型必填说明示例
Authorizationheaderstring是应用 API Key,使用 Bearer 方式传递。Bearer qwk_***
X-Request-Idheaderstring否可选的调用追踪标识;未传入时由服务端生成。req-20260831-001

请求参数

此接口没有额外请求参数。

请求示例

cURL

curl --request GET \
  --url '<BASE_URL>/api/openapi/v1/directory-sync/sources' \
  --header 'Authorization: Bearer <API_KEY>'

响应

200 OK

名称类型必填说明示例
sourcesarray<OpenapifacadeDirectorySource>是-[{"config_revision":0,"connection_status":"<string>","created_at":"2026-08-27T10:00:00Z","created_by_email":"<string>","created_by_name":"<string>","credential_configured":false,"default_seat":false,"deletion_alert_email":"<string>","deletion_alert_enabled":false,"deletion_alert_threshold":0,"deletion_policy":"<string>","external_id_field":"<string>","external_id_field_locked":false,"id":"<uuid>","last_activity_at":"2026-08-27T10:00:00Z","last_connected_at":"2026-08-27T10:00:00Z","last_connection_error_code":"<string>","modified_at":"2026-08-27T10:00:00Z","name":"<string>","next_run_at":"2026-08-27T10:00:00Z","schedule":"<string>","schedule_anchor_at":"2026-08-27T10:00:00Z","settings":{"connection":{"client_name":"<string>","tls_enabled":false,"url":"<string>"},"department_mapping":{"external_id":"<string>","name":"<string>","order":"<string>","parent_external_id":"<string>","status":"<string>"},"mapping":{"account":"<string>","department_external_id":"<string>","email":"<string>","employee_no":"<string>","external_id":"<string>","name":"<string>","phone":"<string>","status":"<string>"},"scope":{"base_dn":"<string>","mode":"all","org_unit_external_ids":["<string>"],"org_unit_filter":"<string>","user_filter":"<string>"}},"source_type":"<string>","status":"<string>","updated_by_email":"<string>","updated_by_name":"<string>"}]
sources[].config_revisioninteger · int64是-0
sources[].connection_statusstring是-"<string>"
sources[].created_atstring · date-time是-"2026-08-27T10:00:00Z"
sources[].created_by_emailstring否-"<string>"
sources[].created_by_namestring否-"<string>"
sources[].credential_configuredboolean是-false
sources[].default_seatboolean是-false
sources[].deletion_alert_emailstring否-"<string>"
sources[].deletion_alert_enabledboolean是-false
sources[].deletion_alert_thresholdinteger · int64是-0
sources[].deletion_policystring是-"<string>"
sources[].external_id_fieldstring是-"<string>"
sources[].external_id_field_lockedboolean是-false
sources[].idstring · uuid是-"<uuid>"
sources[].last_activity_atstring · date-time否-"2026-08-27T10:00:00Z"
sources[].last_connected_atstring · date-time否-"2026-08-27T10:00:00Z"
sources[].last_connection_error_codestring否-"<string>"
sources[].modified_atstring · date-time是-"2026-08-27T10:00:00Z"
sources[].namestring是-"<string>"
sources[].next_run_atstring · date-time否-"2026-08-27T10:00:00Z"
sources[].schedulestring是-"<string>"
sources[].schedule_anchor_atstring · date-time否-"2026-08-27T10:00:00Z"
sources[].settingsOpenapifacadeDirectorySourceSettings是-{"connection":{"client_name":"<string>","tls_enabled":false,"url":"<string>"},"department_mapping":{"external_id":"<string>","name":"<string>","order":"<string>","parent_external_id":"<string>","status":"<string>"},"mapping":{"account":"<string>","department_external_id":"<string>","email":"<string>","employee_no":"<string>","external_id":"<string>","name":"<string>","phone":"<string>","status":"<string>"},"scope":{"base_dn":"<string>","mode":"all","org_unit_external_ids":["<string>"],"org_unit_filter":"<string>","user_filter":"<string>"}}
sources[].settings.connectionOpenapifacadeDirectorySourceConnection是-{"client_name":"<string>","tls_enabled":false,"url":"<string>"}
sources[].settings.connection.client_namestring否-"<string>"
sources[].settings.connection.tls_enabledboolean否-false
sources[].settings.connection.urlstring否-"<string>"
sources[].settings.department_mappingOpenapifacadeDirectorySourceDepartmentMapping是-{"external_id":"<string>","name":"<string>","order":"<string>","parent_external_id":"<string>","status":"<string>"}
sources[].settings.department_mapping.external_idstring是-"<string>"
sources[].settings.department_mapping.namestring是-"<string>"
sources[].settings.department_mapping.orderstring否-"<string>"
sources[].settings.department_mapping.parent_external_idstring否-"<string>"
sources[].settings.department_mapping.statusstring否-"<string>"
sources[].settings.mappingOpenapifacadeDirectorySourceFieldMapping是-{"account":"<string>","department_external_id":"<string>","email":"<string>","employee_no":"<string>","external_id":"<string>","name":"<string>","phone":"<string>","status":"<string>"}
sources[].settings.mapping.accountstring否-"<string>"
sources[].settings.mapping.department_external_idstring否-"<string>"
sources[].settings.mapping.emailstring否-"<string>"
sources[].settings.mapping.employee_nostring否-"<string>"
sources[].settings.mapping.external_idstring是-"<string>"
sources[].settings.mapping.namestring是-"<string>"
sources[].settings.mapping.phonestring否-"<string>"
sources[].settings.mapping.statusstring否-"<string>"
sources[].settings.scopeOpenapifacadeDirectorySourceScope是-{"base_dn":"<string>","mode":"all","org_unit_external_ids":["<string>"],"org_unit_filter":"<string>","user_filter":"<string>"}
sources[].settings.scope.base_dnstring否-"<string>"
sources[].settings.scope.modestring是-"all"
sources[].settings.scope.org_unit_external_idsarray | null否-["<string>"]
sources[].settings.scope.org_unit_filterstring否-"<string>"
sources[].settings.scope.user_filterstring否-"<string>"
sources[].source_typestring是-"<string>"
sources[].statusstring是-"<string>"
sources[].updated_by_emailstring否-"<string>"
sources[].updated_by_namestring否-"<string>"

响应示例

{
  "sources": [
    {
      "config_revision": 0,
      "connection_status": "<string>",
      "created_at": "2026-08-27T10:00:00Z",
      "created_by_email": "<string>",
      "created_by_name": "<string>",
      "credential_configured": false,
      "default_seat": false,
      "deletion_alert_email": "<string>",
      "deletion_alert_enabled": false,
      "deletion_alert_threshold": 0,
      "deletion_policy": "<string>",
      "external_id_field": "<string>",
      "external_id_field_locked": false,
      "id": "<uuid>",
      "last_activity_at": "2026-08-27T10:00:00Z",
      "last_connected_at": "2026-08-27T10:00:00Z",
      "last_connection_error_code": "<string>",
      "modified_at": "2026-08-27T10:00:00Z",
      "name": "<string>",
      "next_run_at": "2026-08-27T10:00:00Z",
      "schedule": "<string>",
      "schedule_anchor_at": "2026-08-27T10:00:00Z",
      "settings": {
        "connection": {
          "client_name": "<string>",
          "tls_enabled": false,
          "url": "<string>"
        },
        "department_mapping": {
          "external_id": "<string>",
          "name": "<string>",
          "order": "<string>",
          "parent_external_id": "<string>",
          "status": "<string>"
        },
        "mapping": {
          "account": "<string>",
          "department_external_id": "<string>",
          "email": "<string>",
          "employee_no": "<string>",
          "external_id": "<string>",
          "name": "<string>",
          "phone": "<string>",
          "status": "<string>"
        },
        "scope": {
          "base_dn": "<string>",
          "mode": "all",
          "org_unit_external_ids": [
            null
          ],
          "org_unit_filter": "<string>",
          "user_filter": "<string>"
        }
      },
      "source_type": "<string>",
      "status": "<string>",
      "updated_by_email": "<string>",
      "updated_by_name": "<string>"
    }
  ]
}

default Flat business error

名称类型必填说明示例
codestring否Stable business error code"<string>"
detailstring是Human-readable error description"<string>"
detailsOpenapiErrorDetails否-{"field":"<string>","reason":"<string>","suggestion":"<string>"}
details.fieldstring否Request field that failed validation"<string>"
details.reasonstring否Stable validation failure reason"<string>"
details.suggestionstring否Suggested normalized value"<string>"
errorstring是Stable HTTP error type"<string>"

响应示例

{
  "code": "<string>",
  "detail": "<string>",
  "details": {
    "field": "<string>",
    "reason": "<string>",
    "suggestion": "<string>"
  },
  "error": "<string>"
}