元字段

属性

属性

属性名说明必填类型

id

元字段id

[number]

name

元字段名称

[string]

namespace

元字段命名空间

[string]

key

元字段key

[string]

description

元字段描述

[string]

type

元字段类型

[string]

rule

规则

[object]

resource_type

资源类型

[string]

created_at_gmt

创建时间

[string]

updated_at_gmt

更新时间

[string]

pinned_position

是否固定

[boolean]

status

元字段状态

[string]

Query 参数

属性名说明必填类型

filter[resource_type]

product

[string]

filter[pinned_position]

[string]

获取元字段列表

GET /openapi/2021-08/meta_fields

Query Parameters

NameTypeDescription

filter[resource_type]

String

product

filter[pinned_position]

String

{
    "data": [{
        "id": "元字段id",
        "name": "元字段名称",
        "namespace": "元字段命名空间",
        "key": "元字段key",
        "description": "元字段描述",
        "type": "元字段类型",
        "rule": {
            "max_length": "最大长度",
            "min_length": "最小长度",
            "regular_expression": "正则表达式"
        },
        "resource_type": "资源类型",
        "created_at_gmt": "创建时间",
        "updated_at_gmt": "更新时间",
        "pinned_position": "是否固定",
        "status": "元字段状态"
    }]
}

获取指定元字段定义

GET /openapi/2021-08/meta_fields/{id}

Query Parameters

NameTypeDescription

id

string

{
    "id": "元字段id",
    "name": "元字段名称",
    "namespace": "元字段命名空间",
    "key": "元字段key",
    "description": "元字段描述",
    "type": "元字段类型",
    "rule": {
        "max_length": "最大长度",
        "min_length": "最小长度",
        "regular_expression": "正则表达式"
    },
    "resource_type": "资源类型",
    "created_at_gmt": "创建时间",
    "updated_at_gmt": "更新时间",
    "pinned_position": "是否固定",
    "status": "元字段状态"
}

创建元字段定义

POST /openapi/2021-08/meta_fields

Request Body

NameTypeDescription

key

String

元字段key

status

String

元字段状态

name

String

元字段名称

rule

String

规则

namespace

String

元字段命名空间

resource_type

String

资源类型

type

String

元字段类型

pinned_position

boolean

是否固定

description

String

元字段描述

max_length*

number

最大长度

min_length*

number

最小长度

regular_expression*

null

正则表达式

{
    "id": "元字段id",
    "name": "元字段名称",
    "namespace": "元字段命名空间",
    "key": "元字段key",
    "description": "元字段描述",
    "type": "元字段类型",
    "rule": {
        "max_length": "最大长度",
        "min_length": "最小长度",
        "regular_expression": "正则表达式"
    },
    "resource_type": "资源类型",
    "created_at_gmt": "创建时间",
    "updated_at_gmt": "更新时间",
    "pinned_position": "是否固定",
    "status": "元字段状态"
}

更新元字段定义

PUT /openapi/2021-08/meta_fields/{id}

Query Parameters

NameTypeDescription

id

string

Request Body

NameTypeDescription

name

String

元字段名称

description

String

元字段描述

rule

object

规则

max_length*

number

最大长度

min_length*

number

最小长度

regular_expression*

null

正则表达式

pinned_position

boolean

是否固定

status

String

元字段状态

{
    "id": "元字段id",
    "name": "元字段名称",
    "namespace": "元字段命名空间",
    "key": "元字段key",
    "description": "元字段描述",
    "type": "元字段类型",
    "rule": {
        "max_length": "最大长度",
        "min_length": "最小长度",
        "regular_expression": "正则表达式"
    },
    "resource_type": "资源类型",
    "created_at_gmt": "创建时间",
    "updated_at_gmt": "更新时间",
    "pinned_position": "是否固定",
    "status": "元字段状态"
}

删除元字段定义

DELETE /openapi/2021-08/meta_fields/{id}

Query Parameters

NameTypeDescription

id

String

{
    // Response
}

获取指定资源元字段

GET /openapi/2021-08/{resource}/{id}/meta_fields

Query Parameters

NameTypeDescription

pinned_position

string

resource

string

资源

id

string

资源id

{
    "data": [{
        "name": "元字段名称",
        "namespace": "元字段命名空间",
        "key": "元字段key",
        "description": "元字段描述",
        "type": "元字段类型",
        "rule": {
            "max_length": "最大长度",
            "min_length": "最小长度",
            "regular_expression": "正则表达式"
        },
        "pinned_position": "是否固定",
        "value": "元字段值",
        "status": "元字段状态",
        "meta_field_id": ""
    }]
}

更新指定资源元字段

PUT /openapi/2021-08/{resource}/{id}/meta_fields

Query Parameters

NameTypeDescription

resource

String

资源

id

String

资源id

Request Body

NameTypeDescription

meta_field_id

String

元字段id

value

String

更新值

{
    "data": [{
        "name": "元字段名称",
        "namespace": "元字段命名空间",
        "key": "元字段key",
        "description": "元字段描述",
        "type": "元字段类型",
        "rule": {
            "max_length": "最大长度",
            "min_length": "最小长度",
            "regular_expression": "正则表达式"
        },
        "pinned_position": "是否固定",
        "value": "元字段值",
        "status": "元字段状态",
        "meta_field_id": ""
    }]
}

Last updated