更新时间:2025-08-30 GMT+08:00
分享

新增映射

功能介绍

新增映射

调用方法

请参见如何调用API

URI

POST /v1/{project_id}/workspaces/{workspace_id}/soc/mappings/mappers

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

参数解释:

项目ID,用于明确项目归属,配置后可通过该ID查询项目下资产,可以通过调用API获取,也可以从控制台获取。获取项目ID

约束限制:

不涉及

取值范围:

不涉及

默认取值:

不涉及

workspace_id

String

参数解释:

工作空间ID

取值范围:

不涉及

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

参数解释:

用户Token,通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。获取用户Token

约束限制:

不涉及

取值范围:

不涉及

默认取值:

不涉及

content-type

String

参数解释:

内容类型

  • application/json;charset=UTF-8 普通API请求的类型

约束限制:

不涉及

取值范围:

  • application/json;charset=UTF-8

默认取值:

不涉及

表3 请求Body参数

参数

是否必选

参数类型

描述

id

String

The id, display only

name

String

The name, display only

project_id

String

The id, display only

workspace_id

String

The id, display only

dataclass_id

String

The id, display only

data_source

String

数据源

status

String

状态(enabled,disabled)

description

String

The description, display only

create_time

String

Create time

creator_id

String

Creator id value

creator_name

String

Creator name value

update_time

String

Update time

modifier_id

String

Modifier id value

modifier_name

String

Modifier name value

mapper

DpeMappingDetail object

映射信息

表4 DpeMappingDetail

参数

是否必选

参数类型

描述

id

String

The id, display only

name

String

The name, display only

project_id

String

The id, display only

workspace_id

String

The id, display only

dataclass_id

String

The id, display only

dataclass_name

String

数据类名称

mapper_type_id

String

The id, display only

dpe_info

DpeInfo object

分类信息

create_time

String

Create time

creator_id

String

Creator id value

creator_name

String

Creator name value

update_time

String

Update time

modifier_id

String

Modifier id value

modifier_name

String

Modifier name value

mapper_field_list

Array of DpeMappingFieldDetail objects

list of mapper field

表5 DpeInfo

参数

是否必选

参数类型

描述

id

String

The id, display only

name

String

The name, display only

project_id

String

The id, display only

workspace_id

String

The id, display only

dataclass_id

String

The id, display only

dataclass_name

String

数据类名称

classifier_id

String

关联分类ID

status

String

状态

complete_degree

String

完成度

instance_num

Integer

关联实例数

description

String

The description, display only

update_time

String

Update time

create_time

String

Create time

creator_id

String

Creator id value

creator_name

String

Creator name value

modifier_id

String

Modifier id value

modifier_name

String

Modifier name value

表6 DpeMappingFieldDetail

参数

是否必选

参数类型

描述

id

String

The id, display only

project_id

String

The id, display only

workspace_id

String

The id, display only

dataclass_id

String

The id, display only

mapping_id

String

The id, display only

mapper_id

String

The id, display only

default_value

String

默认值

target_key

String

目标字段

expression

String

表达式

create_time

String

Create time

update_time

String

Update time

响应参数

状态码:200

表7 响应Body参数

参数

参数类型

描述

code

String

参数解释:

错误码

取值范围:

不涉及

message

String

参数解释:

错误描述

取值范围:

不涉及

data

DpeMappingDetail object

映射信息

表8 DpeMappingDetail

参数

参数类型

描述

id

String

The id, display only

name

String

The name, display only

project_id

String

The id, display only

workspace_id

String

The id, display only

dataclass_id

String

The id, display only

dataclass_name

String

数据类名称

mapper_type_id

String

The id, display only

dpe_info

DpeInfo object

分类信息

create_time

String

Create time

creator_id

String

Creator id value

creator_name

String

Creator name value

update_time

String

Update time

modifier_id

String

Modifier id value

modifier_name

String

Modifier name value

mapper_field_list

Array of DpeMappingFieldDetail objects

list of mapper field

表9 DpeInfo

参数

参数类型

描述

id

String

The id, display only

name

String

The name, display only

project_id

String

The id, display only

workspace_id

String

The id, display only

dataclass_id

String

The id, display only

dataclass_name

String

数据类名称

classifier_id

String

关联分类ID

status

String

状态

complete_degree

String

完成度

instance_num

Integer

关联实例数

description

String

The description, display only

update_time

String

Update time

create_time

String

Create time

creator_id

String

Creator id value

creator_name

String

Creator name value

modifier_id

String

Modifier id value

modifier_name

String

Modifier name value

表10 DpeMappingFieldDetail

参数

参数类型

描述

id

String

The id, display only

project_id

String

The id, display only

workspace_id

String

The id, display only

dataclass_id

String

The id, display only

mapping_id

String

The id, display only

mapper_id

String

The id, display only

default_value

String

默认值

target_key

String

目标字段

expression

String

表达式

create_time

String

Create time

update_time

String

Update time

状态码:400

表11 响应Body参数

参数

参数类型

描述

code

String

参数解释:

错误码

取值范围:

不涉及

message

String

参数解释:

错误描述

取值范围:

不涉及

请求示例

响应示例

状态码

状态码

描述

200

新增映射响应

400

请求异常返回报文

错误码

请参见错误码

相关文档