元字段
属性
属性
属性名 | 说明 | 必填 | 类型 |
---|---|---|---|
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
Name | Type | Description |
---|---|---|
filter[resource_type] | String | product |
filter[pinned_position] | String |
获取指定元字段定义
GET
/openapi/2021-08/meta_fields/{id}
Query Parameters
Name | Type | Description |
---|---|---|
id | string |
创建元字段定义
POST
/openapi/2021-08/meta_fields
Request Body
Name | Type | Description |
---|---|---|
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 | 正则表达式 |
更新元字段定义
PUT
/openapi/2021-08/meta_fields/{id}
Query Parameters
Name | Type | Description |
---|---|---|
id | string |
Request Body
Name | Type | Description |
---|---|---|
name | String | 元字段名称 |
description | String | 元字段描述 |
rule | object | 规则 |
max_length* | number | 最大长度 |
min_length* | number | 最小长度 |
regular_expression* | null | 正则表达式 |
pinned_position | boolean | 是否固定 |
status | String | 元字段状态 |
删除元字段定义
DELETE
/openapi/2021-08/meta_fields/{id}
Query Parameters
Name | Type | Description |
---|---|---|
id | String |
获取指定资源元字段
GET
/openapi/2021-08/{resource}/{id}/meta_fields
Query Parameters
Name | Type | Description |
---|---|---|
pinned_position | string | |
resource | string | 资源 |
id | string | 资源id |
更新指定资源元字段
PUT
/openapi/2021-08/{resource}/{id}/meta_fields
Query Parameters
Name | Type | Description |
---|---|---|
resource | String | 资源 |
id | String | 资源id |
Request Body
Name | Type | Description |
---|---|---|
meta_field_id | String | 元字段id |
value | String | 更新值 |
Last updated