跳转至

导入 SLO 资源包


POST /api/v1/slo/import

概述

上传SLO资源ZIP,确认冲突后异步导入关联配置。

鉴权请求头:DF-API-KEY。

接口权限:SLO 配置管理(monitor.sloCfgManage)。

调用前和使用步骤

查看调用说明

当前API Key需monitor.sloCfgManage;使用目标工作空间的Key。本任务绑定发起空间与Key资源UUID,只有同空间同一创建Key可查询;同角色另一Key也会403,轮转同一Key保留资源UUID。

以multipart/form-data上传files字段的一份.zip,最多100MiB;六个公开冲突策略作为普通Form文本字段,不发送JSON。优先上传本产品SLO专用导出的原始包,保留signId、引用和目录。此入口直接复用工作空间通用资源导入器,并没有仅允许SLO目录的隔离保证;不要上传来源不明或全空间资源包,它们可能导入额外模块并产生额外变更。公开可控制策略仅表中六项,其他资源仍按通用默认check处理。

默认check先检查重名;HTTP200/success=true也可能仅返回repeat_name/repeat_identifier/repeat_conflict,无taskId、不启动导入。确认冲突后对具体类型选择skip(保留现有)或recover(覆盖),重新上传同包。repeatNameOp只控制监控器,不控制SLO;continue仅此项兼容,并不保证任何同名对象都可创建。SLO本身由repeatSloNameOp控制,标签由repeatLabelNameOp控制,告警策略/通知对象/安全规则各自独立。

无待确认冲突才返回taskId。按模块/项目分批保存,重建UUID并解析signId;监控器型缺少所需SLI映射会跳过并报失败,指标型查询重新校验。recover修改既有SLO仍受name/goal/minGoal/sliType不可变规则约束,不能用覆盖迁移成不同定义。导入不会恢复原始遥测数据/历史SLO统计;恢复的启用状态可能立即启动检测/通知。

任务允许部分成功,没有跨模块整体回滚。用SLO资源任务进度核对error_code及现有成功/转换/跳过摘要,再逐项读取目标SLO与依赖验收;SLO导入失败不保证完整出现在failedItems/failCount中,部分错误只能由查询非2xx、error_code及任务日志定位;status=ok、空计数或noJsonDataImported都不能单独证明全量成功/没有写入。取消/中断时已完成模块可能已保存而最终noJsonDataError,不盲目重导。请求不幂等,recover前备份,失败先核对现态。

不能以failedItems=[]或failCount=0判定所有SLO成功。请把包内SLO逐个与目标列表/详情核对,失败时保留taskId、error_code和traceId请管理员定位。

请求

请求头

参数名 类型 必选 说明
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检查。
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
获取或填写方式: 针对资源包内告警策略,先检查当前空间已有同名资源并备份。
repeatSloNameOp string multipart普通文本字段。可选check/skip/recover,默认check,仅控制SLO。check预检查有同名则不入队;skip保留已有并跳过;recover覆盖同名配置。不同资源覆盖支持范围/字段和版本限制仍以任务结果为准。 SLO覆盖沿用原对象,名称/目标/SLI类型等不可变字段不同仍可能失败,不是任意替换定义;应先备份详情并逐个核对目标SLO列表/详情;SLO失败不保证写入failedItems。
允许 null: False
可选值: ['check', 'skip', 'recover']
例子: check
获取或填写方式: 针对资源包内SLO,先检查当前空间已有同名资源并备份。
repeatSecurityRuleNameOp 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
获取或填写方式: 针对资源包内标签,先检查当前空间已有同名资源并备份。

文件参数(multipart/form-data)

参数名 类型 必选 说明
files file Y 必填单个.zip文件,最多100×1024×1024字节;字段名是files复数,不能仅传本地路径字符串。
单文件大小上限: 100M
文件数量上限: 1
允许的文件后缀: ['zip']
例子: @./resource.zip
获取或填写方式: 优先从SLO专用导出创建的任务,在SLO资源任务进度完成后取content.url下载。不要无意导入包含额外模块的全空间包。

参数补充说明

查看参数说明

调用成功可能只是重名预检查,必须检查是否有taskId;收到taskId后使用本模块query_action_status轮询。SLO资源包通过通用工作空间资源导入器按模块顺序执行,覆盖不是跨模块原子替换。

响应

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

content
字段 类型 说明
content.taskId string 异步任务ID,后续用taskId查询/取消;不是ZIP下载地址或Celery执行完成标志。
content.declaration object 或 null 非空业务对象附带的工作空间公共声明,未配置时可为null或空对象;空对象不添加。
content.repeat_name
字段 类型 说明
content.repeat_name object 仅预检查有冲突时返回,按资源类型分组的重名数组;此分支无taskId、不启动异步导入。
content.repeat_name.资源类型
字段 类型 说明
content.repeat_name.资源类型 array<string> 该类命中的已有名称,例如checker/log_backup_cfg/role等。
content.repeat_name.资源类型[] string 一个冲突名称;字段配置的重名按name+fieldSource判断。
字段 类型 说明
content.repeat_identifier object 兼容确认映射,当前上传控制器通常{}。
content.repeat_conflict
字段 类型 说明
content.repeat_conflict object 仪表板/查看器细分冲突映射,仅需check且确有冲突组返回。
content.repeat_conflict.dashboard
content.repeat_conflict.dashboard.name_and_identifier
字段 类型 说明
content.repeat_conflict.dashboard.name_and_identifier array<object> 该类名称/标识冲突项目,实际匹配详情见每项。
content.repeat_conflict.dashboard.name_and_identifier[]
字段 类型 说明
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
字段 类型 说明
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
字段 类型 说明
content.repeat_conflict.dashboard.identifier array<object> 该类名称/标识冲突项目,实际匹配详情见每项。
content.repeat_conflict.dashboard.identifier[]
字段 类型 说明
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
字段 类型 说明
content.repeat_conflict.dashboard.identifier[].conflictUUIDs array<string> 本项涉及的全部现有资源UUID,去重但无稳定顺序。
content.repeat_conflict.dashboard.identifier[].conflictUUIDs[] string 一个现有冲突UUID。
content.repeat_conflict.dashboard.name
字段 类型 说明
content.repeat_conflict.dashboard.name array<object> 该类名称/标识冲突项目,实际匹配详情见每项。
content.repeat_conflict.dashboard.name[]
字段 类型 说明
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
字段 类型 说明
content.repeat_conflict.dashboard.name[].conflictUUIDs array<string> 本项涉及的全部现有资源UUID,去重但无稳定顺序。
content.repeat_conflict.dashboard.name[].conflictUUIDs[] string 一个现有冲突UUID。
content.repeat_conflict.viewer
content.repeat_conflict.viewer.name_and_identifier
字段 类型 说明
content.repeat_conflict.viewer.name_and_identifier array<object> 该类名称/标识冲突项目,实际匹配详情见每项。
content.repeat_conflict.viewer.name_and_identifier[]
字段 类型 说明
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
字段 类型 说明
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
字段 类型 说明
content.repeat_conflict.viewer.identifier array<object> 该类名称/标识冲突项目,实际匹配详情见每项。
content.repeat_conflict.viewer.identifier[]
字段 类型 说明
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
字段 类型 说明
content.repeat_conflict.viewer.identifier[].conflictUUIDs array<string> 本项涉及的全部现有资源UUID,去重但无稳定顺序。
content.repeat_conflict.viewer.identifier[].conflictUUIDs[] string 一个现有冲突UUID。
content.repeat_conflict.viewer.name
字段 类型 说明
content.repeat_conflict.viewer.name array<object> 该类名称/标识冲突项目,实际匹配详情见每项。
content.repeat_conflict.viewer.name[]
字段 类型 说明
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
字段 类型 说明
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 触发条件 消息或响应说明 处理方式
400 ft.UnsupportFreeWorkspaceSecurityCfg 当前free版不支持待导入安全配置 体验版本空间, 不支持安全监测规则配置 核对版本支持。
HTTP 状态 errorCode 触发条件 消息或响应说明 处理方式
403 ft.ForbiddenFreeEditionLimit 资源数量达到/超过当前版本限制 免费版工作空间 {} 已达上限( {} 个),无法新建。可开通商业版解锁限制 核对目标版本配额和当前数量,不以skip策略绕过导入前数量检查。
403 ft.ForbiddenFreeEditionWorkspace 待导入监控/通知等类型不被目标空间版本允许 免费版工作空间不支持该功能。可开通商业版解锁限制 去掉不支持资源或选择支持版本。
403 ft.Forbidden 免费/体验空间不允许导入数据转发等资源,或接口权限不足 您无权限操作 核对版本和权限。
HTTP 状态 errorCode 触发条件 消息或响应说明 处理方式
406 ft.ParameterValidationFailed 请求字段缺失,或字段值违反声明的校验条件 参数解析失败 核对参数位置、字段名、类型和取值。
406 ft.UploadFileFailedParse ZIP或受检资源JSON无法读取/解析 文件解析失败 重新从受支持导出包生成,核对JSON与目录结构,不上传加密或损坏ZIP。
406 ft.UnsupportShortMessage 当前免费/体验版不支持包中的短信通知对象 体验版工作空间不支持短信通知对象 移除该对象或使用支持版本。
406 ft.UnsupportOnCall 当前免费/体验版不支持包中的语音通知对象 工作空间不支持电话通知对象 移除该对象或使用支持版本。
HTTP 状态 errorCode 触发条件 消息或响应说明 处理方式
500 ft.InternalServerError 任务缓存/队列、文件系统、数据库或未处理任务状态/JSON处理失败 内部错误 先用同一空间同一Key查询任务及资源现态,确认是否已入队/部分保存后再重试,不盲目重复导入或覆盖。

错误响应

在响应分栏中查看本接口的 HTTP 错误码。

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

请求例子

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

相关文档

文档评价

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