跳转至

导入工作空间资源包



POST /api/v1/workspace/resource/upload

概述

上传资源ZIP并按各类冲突策略检查或启动导入任务。

调用前和使用步骤

  1. 在目标空间备份现有配置,准备本产品导出的资源 ZIP,使用目标空间有 workspace.setManage 权限的 Key。
  2. 使用 multipart 上传 files,按资源类型选择冲突策略;首先保留默认 check,检查返回的重名和标识冲突。
  3. 返回冲突信息但没有 taskId 时,先逐项决定 skip 或 recover 后重新上传;recover 可能覆盖已有资源。
  4. 取得 content.taskId 后用同一把 Key轮询资源任务进度,核对成功、失败、跳过及实际目标资源。

当前Key需workspace.setManage。任务只属于当前空间和发起Key的资源UUID,同空间另一把Key即使角色相同也不能读取/取消该任务;轮转同一Key保留资源UUID,不应把taskId与API Key值混用。

使用multipart/form-data,ZIP字段files,一份文件最多100MiB;Form表各策略是同一multipart中的普通文本字段,不是JSON。优先使用本产品导出的resource.zip,保留目录和JSON结构;包含仪表板、监控器、查看器、通知对象、SLO、安全监测、告警策略、数据转发、空间属性声明、字段配置、标签、环境变量、角色、日志索引、黑名单、Pipeline、正则表达式、字段脱敏规则、敏感数据扫描规则等配置目录,不能上传业务日志/任意压缩包替代。先在目标空间备份再选recover。

先保存临时ZIP并检查包结构/JSON及版本、数量、类型限制,再按各资源默认check策略预检重名。若有需要确认的冲突,HTTP200/success=true的content返回repeat_name/repeat_identifier/repeat_conflict且无taskId,未开始导入;应根据具体组选择skip/recover并重新上传,不能只看HTTP200。策略按资源独立,repeatNameOp只兼容控制监控器,其余有单独参数。策略字段在路由Form声明中校验枚举,非法值先以公共参数错误拒绝。

无需确认时才返回taskId并入队。异步逐资源/逐项处理,可重建UUID、转换引用并保留部分成功,没有跨模块整体回滚。属性声明等资源可能覆盖目标配置,不是整库恢复;导入不包括原始遥测数据。每次重复上传可能新建或重复覆盖资源,不是幂等请求。

用资源任务进度读取完整成功/失败/转换/跳过信息;status=ok或success=true不足以证明全部导入,需核对successCount/failCount、failedItems及skippedTags等,并验证目标资源实际可用。包内监控器/告警/转发等配置导入后可能启用相关任务,执行前核对目标与凭据。

请求头

参数名 类型 必选 说明
DF-API-KEY string Y 工作空间的 OpenAPI 鉴权凭据。
例子: <DF-API-KEY>
获取或填写方式: 从目标工作空间的 API Key 管理获取有该操作权限的 OpenAPI Key。

Form 表单参数

参数名 类型 必选 说明
repeatNameOp string multipart普通文本字段。可选默认check,仅控制checker;check发现冲突返回确认信息、不启动任务;skip跳过同名;recover覆盖;continue进入非skip/recover的普通创建路径,不保证同名一定可导入。其他资源不继承此设置。
允许 null: False
可选值: ['check', 'skip', 'recover', 'continue']
例子: check
获取或填写方式: 按监控器同名处理需要选择,先采用check检查。
repeatIdentifierOp string 可选check/skip/recover,默认check;作为两类资源name_and_identifier与identifier组的缺省值,单独name组默认仍check;专门策略优先。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 仪表板/查看器标识冲突的兼容默认策略。
repeatDashboardNameAndIdentifierOp string 可选check/skip/recover;仪表板名称及标识都冲突的策略,默认继承repeatIdentifierOp。check先返回冲突不入队,skip跳过,recover按该组定位目标覆盖;覆盖不是追加合并,需先备份。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 根据上传预检查repeat_conflict对应组确认后选择。
repeatDashboardIdentifierOp string 可选check/skip/recover;仪表板仅标识冲突的策略,默认继承repeatIdentifierOp。check先返回冲突不入队,skip跳过,recover按该组定位目标覆盖;覆盖不是追加合并,需先备份。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 根据上传预检查repeat_conflict对应组确认后选择。
repeatDashboardNameOp string 可选check/skip/recover;仪表板仅名称冲突的策略,默认check。check先返回冲突不入队,skip跳过,recover按该组定位目标覆盖;覆盖不是追加合并,需先备份。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 根据上传预检查repeat_conflict对应组确认后选择。
repeatViewerNameAndIdentifierOp string 可选check/skip/recover;查看器名称及标识都冲突的策略,默认继承repeatIdentifierOp。check先返回冲突不入队,skip跳过,recover按该组定位目标覆盖;覆盖不是追加合并,需先备份。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 根据上传预检查repeat_conflict对应组确认后选择。
repeatViewerIdentifierOp string 可选check/skip/recover;查看器仅标识冲突的策略,默认继承repeatIdentifierOp。check先返回冲突不入队,skip跳过,recover按该组定位目标覆盖;覆盖不是追加合并,需先备份。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 根据上传预检查repeat_conflict对应组确认后选择。
repeatViewerNameOp string 可选check/skip/recover;查看器仅名称冲突的策略,默认check。check先返回冲突不入队,skip跳过,recover按该组定位目标覆盖;覆盖不是追加合并,需先备份。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 根据上传预检查repeat_conflict对应组确认后选择。
repeatNotifyObjectNameOp string multipart普通文本字段。可选check/skip/recover,默认check,仅控制通知对象。check预检查有同名则不入队;skip保留已有并跳过;recover覆盖同名配置。不同资源覆盖支持范围/字段和版本限制仍以任务结果为准。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 针对资源包内通知对象,先检查当前空间已有同名资源并备份。
repeatAlertPolicyNameOp string multipart普通文本字段。可选check/skip/recover,默认check,仅控制告警策略。check预检查有同名则不入队;skip保留已有并跳过;recover覆盖同名配置。不同资源覆盖支持范围/字段和版本限制仍以任务结果为准。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 针对资源包内告警策略,先检查当前空间已有同名资源并备份。
repeatLogBackupCfgNameOp string multipart普通文本字段。可选check/skip/recover,默认check,仅控制数据转发。check预检查有同名则不入队;skip保留已有并跳过;recover覆盖同名配置。不同资源覆盖支持范围/字段和版本限制仍以任务结果为准。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 针对资源包内数据转发,先检查当前空间已有同名资源并备份。
repeatSloNameOp string multipart普通文本字段。可选check/skip/recover,默认check,仅控制SLO。check预检查有同名则不入队;skip保留已有并跳过;recover覆盖同名配置。不同资源覆盖支持范围/字段和版本限制仍以任务结果为准。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 针对资源包内SLO,先检查当前空间已有同名资源并备份。
repeatSecurityRuleNameOp string multipart普通文本字段。可选check/skip/recover,默认check,仅控制安全监测。check预检查有同名则不入队;skip保留已有并跳过;recover覆盖同名配置。不同资源覆盖支持范围/字段和版本限制仍以任务结果为准。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 针对资源包内安全监测,先检查当前空间已有同名资源并备份。
repeatFieldNameOp string multipart普通文本字段。可选check/skip/recover,默认check,仅控制字段配置。check预检查有同名则不入队;skip保留已有并跳过;recover覆盖同名配置。不同资源覆盖支持范围/字段和版本限制仍以任务结果为准。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 针对资源包内字段配置,先检查当前空间已有同名资源并备份。
repeatLabelNameOp string multipart普通文本字段。可选check/skip/recover,默认check,仅控制标签。check预检查有同名则不入队;skip保留已有并跳过;recover覆盖同名配置。不同资源覆盖支持范围/字段和版本限制仍以任务结果为准。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 针对资源包内标签,先检查当前空间已有同名资源并备份。
repeatEnvVariableNameOp string multipart普通文本字段。可选check/skip/recover,默认check,仅控制环境变量。check预检查有同名则不入队;skip保留已有并跳过;recover覆盖同名配置。不同资源覆盖支持范围/字段和版本限制仍以任务结果为准。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 针对资源包内环境变量,先检查当前空间已有同名资源并备份。
repeatRoleNameOp string multipart普通文本字段。可选check/skip/recover,默认check,仅控制角色。check预检查有同名则不入队;skip保留已有并跳过;recover覆盖同名配置。不同资源覆盖支持范围/字段和版本限制仍以任务结果为准。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 针对资源包内角色,先检查当前空间已有同名资源并备份。
repeatLogIndexNameOp string multipart普通文本字段。可选check/skip/recover,默认check,仅控制日志索引。check预检查有同名则不入队;skip保留已有并跳过;recover覆盖同名配置。不同资源覆盖支持范围/字段和版本限制仍以任务结果为准。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 针对资源包内日志索引,先检查当前空间已有同名资源并备份。
repeatBlacklistNameOp string multipart普通文本字段。可选check/skip/recover,默认check,仅控制黑名单。check预检查有同名则不入队;skip保留已有并跳过;recover覆盖同名配置。不同资源覆盖支持范围/字段和版本限制仍以任务结果为准。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 针对资源包内黑名单,先检查当前空间已有同名资源并备份。
repeatPipelineNameOp string multipart普通文本字段。可选check/skip/recover,默认check,仅控制Pipeline。check预检查有同名则不入队;skip保留已有并跳过;recover覆盖同名配置。不同资源覆盖支持范围/字段和版本限制仍以任务结果为准。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 针对资源包内Pipeline,先检查当前空间已有同名资源并备份。
repeatRegularExpressionNameOp string multipart普通文本字段。可选check/skip/recover,默认check,仅控制正则表达式。check预检查有同名则不入队;skip保留已有并跳过;recover覆盖同名配置。不同资源覆盖支持范围/字段和版本限制仍以任务结果为准。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 针对资源包内正则表达式,先检查当前空间已有同名资源并备份。
repeatFieldDisplayPermissionNameOp string multipart普通文本字段。可选check/skip/recover,默认check,仅控制字段脱敏规则。check预检查有同名则不入队;skip保留已有并跳过;recover覆盖同名配置。不同资源覆盖支持范围/字段和版本限制仍以任务结果为准。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 针对资源包内字段脱敏规则,先检查当前空间已有同名资源并备份。
repeatSensitiveDataScannerNameOp string multipart普通文本字段。可选check/skip/recover,默认check,仅控制敏感数据扫描规则。check预检查有同名则不入队;skip保留已有并跳过;recover覆盖同名配置。不同资源覆盖支持范围/字段和版本限制仍以任务结果为准。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 针对资源包内敏感数据扫描规则,先检查当前空间已有同名资源并备份。

文件参数(multipart/form-data)

参数名 类型 必选 说明
files file Y 必填单个.zip文件,最多100×1024×1024字节;字段名是files复数,不能仅传本地路径字符串。
单文件大小上限: 100M
文件数量上限: 1
允许的文件后缀: ['zip']
例子: @./resource.zip
获取或填写方式: 从导出资源任务任务完成后的url下载并保存。

参数补充说明

工作空间迁移新建日志索引(含直写、克隆)到ScopeDB时,可把isFullLineIndex=0/false适配为1,原始文件不变;已有skip项不修改。全行迁往非ScopeDB或recover要求全行降级时整项跳过,来源与克隆先一起检查;其他参数/JSON/权限/数据库/下游错误仍按失败处理。该迁移适配不改变独立日志索引导入接口。环境变量导出不含scope=rum;日志索引不含外部绑定和default;字段管理仅工作空间自定义字段;数据访问规则当前不在支持资源目录中。

请求例子

curl --request POST 'https://openapi.guance.com/api/v1/workspace/resource/upload' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -F 'files=@./resource.zip' \
  -F 'repeatNameOp=check' \
  -F 'repeatIdentifierOp=check'

响应

HTTP 200,application/json。下方示例展示可直接读取的主要字段。

字段 类型 说明
content.taskId string 异步任务ID,后续用taskId查询/取消;不是ZIP下载地址或Celery执行完成标志。
content.declaration object 或 null 非空content附带的工作空间公共声明,未配置时可为null或空对象。
content.repeat_name object 仅预检查有冲突时返回,按资源类型分组的重名数组;此分支无taskId、不启动异步导入。
content.repeat_name.资源类型 array<string> 该类命中的已有名称,例如checker/log_backup_cfg/role等。
content.repeat_name.资源类型[] string 一个冲突名称;字段配置的重名按name+fieldSource判断。
content.repeat_identifier object 兼容确认映射,当前上传控制器通常{}。
content.repeat_conflict object 仪表板/查看器细分冲突映射,仅需check且确有冲突组返回。
content.repeat_conflict.dashboard.name_and_identifier array<object> 该类名称/标识冲突项目,实际匹配详情见每项。
content.repeat_conflict.dashboard.name_and_identifier[] object 导入项与现有对象的冲突资料。
content.repeat_conflict.dashboard.name_and_identifier[].name string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name_and_identifier[].identifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name_and_identifier[].fileName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name_and_identifier[].importName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name_and_identifier[].importIdentifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name_and_identifier[].existName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name_and_identifier[].existIdentifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name_and_identifier[].nameConflictUUID string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name_and_identifier[].existNameIdentifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name_and_identifier[].identifierConflictUUID string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name_and_identifier[].existIdentifierName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name_and_identifier[].isCrossConflict boolean 名称和标识命中了两个不同现有对象时true;覆盖前需分别核对。
content.repeat_conflict.dashboard.name_and_identifier[].conflictUUIDs array<string> 本项涉及的全部现有资源UUID,去重但无稳定顺序。
content.repeat_conflict.dashboard.name_and_identifier[].conflictUUIDs[] string 一个现有冲突UUID。
content.repeat_conflict.dashboard.identifier array<object> 该类名称/标识冲突项目,实际匹配详情见每项。
content.repeat_conflict.dashboard.identifier[] object 导入项与现有对象的冲突资料。
content.repeat_conflict.dashboard.identifier[].name string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.identifier[].identifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.identifier[].fileName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.identifier[].importName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.identifier[].importIdentifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.identifier[].existName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.identifier[].existIdentifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.identifier[].nameConflictUUID string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.identifier[].existNameIdentifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.identifier[].identifierConflictUUID string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.identifier[].existIdentifierName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.identifier[].isCrossConflict boolean 名称和标识命中了两个不同现有对象时true;覆盖前需分别核对。
content.repeat_conflict.dashboard.identifier[].conflictUUIDs array<string> 本项涉及的全部现有资源UUID,去重但无稳定顺序。
content.repeat_conflict.dashboard.identifier[].conflictUUIDs[] string 一个现有冲突UUID。
content.repeat_conflict.dashboard.name array<object> 该类名称/标识冲突项目,实际匹配详情见每项。
content.repeat_conflict.dashboard.name[] object 导入项与现有对象的冲突资料。
content.repeat_conflict.dashboard.name[].name string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name[].identifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name[].fileName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name[].importName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name[].importIdentifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name[].existName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name[].existIdentifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name[].nameConflictUUID string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name[].existNameIdentifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name[].identifierConflictUUID string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name[].existIdentifierName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.dashboard.name[].isCrossConflict boolean 名称和标识命中了两个不同现有对象时true;覆盖前需分别核对。
content.repeat_conflict.dashboard.name[].conflictUUIDs array<string> 本项涉及的全部现有资源UUID,去重但无稳定顺序。
content.repeat_conflict.dashboard.name[].conflictUUIDs[] string 一个现有冲突UUID。
content.repeat_conflict.viewer.name_and_identifier array<object> 该类名称/标识冲突项目,实际匹配详情见每项。
content.repeat_conflict.viewer.name_and_identifier[] object 导入项与现有对象的冲突资料。
content.repeat_conflict.viewer.name_and_identifier[].name string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name_and_identifier[].identifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name_and_identifier[].fileName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name_and_identifier[].importName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name_and_identifier[].importIdentifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name_and_identifier[].existName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name_and_identifier[].existIdentifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name_and_identifier[].nameConflictUUID string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name_and_identifier[].existNameIdentifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name_and_identifier[].identifierConflictUUID string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name_and_identifier[].existIdentifierName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name_and_identifier[].isCrossConflict boolean 名称和标识命中了两个不同现有对象时true;覆盖前需分别核对。
content.repeat_conflict.viewer.name_and_identifier[].conflictUUIDs array<string> 本项涉及的全部现有资源UUID,去重但无稳定顺序。
content.repeat_conflict.viewer.name_and_identifier[].conflictUUIDs[] string 一个现有冲突UUID。
content.repeat_conflict.viewer.identifier array<object> 该类名称/标识冲突项目,实际匹配详情见每项。
content.repeat_conflict.viewer.identifier[] object 导入项与现有对象的冲突资料。
content.repeat_conflict.viewer.identifier[].name string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.identifier[].identifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.identifier[].fileName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.identifier[].importName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.identifier[].importIdentifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.identifier[].existName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.identifier[].existIdentifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.identifier[].nameConflictUUID string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.identifier[].existNameIdentifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.identifier[].identifierConflictUUID string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.identifier[].existIdentifierName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.identifier[].isCrossConflict boolean 名称和标识命中了两个不同现有对象时true;覆盖前需分别核对。
content.repeat_conflict.viewer.identifier[].conflictUUIDs array<string> 本项涉及的全部现有资源UUID,去重但无稳定顺序。
content.repeat_conflict.viewer.identifier[].conflictUUIDs[] string 一个现有冲突UUID。
content.repeat_conflict.viewer.name array<object> 该类名称/标识冲突项目,实际匹配详情见每项。
content.repeat_conflict.viewer.name[] object 导入项与现有对象的冲突资料。
content.repeat_conflict.viewer.name[].name string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name[].identifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name[].fileName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name[].importName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name[].importIdentifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name[].existName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name[].existIdentifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name[].nameConflictUUID string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name[].existNameIdentifier string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name[].identifierConflictUUID string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name[].existIdentifierName string 对应导入/现有对象的名称、标识或UUID;未命中相应冲突一侧时部分字段省略。
content.repeat_conflict.viewer.name[].isCrossConflict boolean 名称和标识命中了两个不同现有对象时true;覆盖前需分别核对。
content.repeat_conflict.viewer.name[].conflictUUIDs array<string> 本项涉及的全部现有资源UUID,去重但无稳定顺序。
content.repeat_conflict.viewer.name[].conflictUUIDs[] string 一个现有冲突UUID。
{
  "code": 200,
  "content": {
    "taskId": "resource_task_example",
    "declaration": {}
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}
{
  "code": 200,
  "content": {
    "repeat_name": {
      "checker": [
        "已有监控器"
      ]
    },
    "repeat_identifier": {},
    "repeat_conflict": {},
    "declaration": {}
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

错误响应

鉴权、限流和公共请求错误参见公共错误定义。

HTTP 状态 errorCode 触发条件 消息或响应说明 处理方式
406 ft.ParameterValidationFailed 请求字段缺失,或字段值违反声明的校验条件 参数解析失败 核对参数位置、字段名、类型和取值。
406 ft.UploadFileFailedParse ZIP或受检资源JSON无法读取/解析 文件解析失败 重新从受支持导出包生成,核对JSON与目录结构,不上传加密或损坏ZIP。
403 ft.ForbiddenFreeEditionLimit 资源数量达到/超过当前版本限制 免费版工作空间 {} 已达上限( {} 个),无法新建。可开通商业版解锁限制 核对目标版本配额和当前数量,不以skip策略绕过导入前数量检查。
403 ft.ForbiddenFreeEditionWorkspace 待导入监控/通知等类型不被目标空间版本允许 免费版工作空间不支持该功能。可开通商业版解锁限制 去掉不支持资源或选择支持版本。
403 ft.Forbidden 免费/体验空间不允许导入数据转发等资源,或接口权限不足 您无权限操作 核对版本和权限。
406 ft.UnsupportShortMessage 当前免费/体验版不支持包中的短信通知对象 体验版工作空间不支持短信通知对象 移除该对象或使用支持版本。
406 ft.UnsupportOnCall 当前免费/体验版不支持包中的语音通知对象 工作空间不支持电话通知对象 移除该对象或使用支持版本。
400 ft.UnsupportFreeWorkspaceSecurityCfg 当前free版不支持待导入安全配置 体验版本空间, 不支持安全监测规则配置 核对版本支持。
500 ft.InternalServerError 任务缓存/队列、文件系统、数据库或未处理任务状态/JSON处理失败 内部错误 先用同一空间同一Key查询任务及资源现态,确认是否已入队/部分保存后再重试,不盲目重复导入或覆盖。

文档评价

文档内容是否对您有帮助?