You need to enable JavaScript to run this app.
导航

元数据 OpenAPI

最近更新时间2023.07.11 15:20:13

首次发布时间2023.03.20 20:33:49

1.概述

本文档提供应用、事件、虚拟事件、事件属性、用户属性、虚拟属性等元数据相关操作的接口。

  • 注:
    -私有化4.5及后续版本,均可使用本文档path,不必更改。
    -私有化4.4.0、4.4.1版本中,openapi接口均需要在本文Path的metadata后加/v1。
    -举例:4.4、4.4.1版本获取应用与配置信息的接口应为:openapi/v1/metadata/v1/apps

  • 所有的写操作(创建、修改、删除)都需要管理员权限;

2.API 公共参数

Context-path: /datafinder

ParameterTypeDescriptionRequired
app_idint应用idtrue
3.获取应用与配置信息

3.1 API 定义

Path:openapi/v1/metadata/apps
Method: POST
Content-type: application/json
Body:

ParameterTypeDescriptionRequired
app_idslist应用id列表true
with_configbool是否返回配置信息false
accessedbool是否接入成功false
{
    "app_ids": [
        1,
        2
    ]
}

Response:

{
    "code": 200,
    "message": "success",
    "data": {
        "app_infos": [
            {
                "app_id": 1,
                "tea_app_id": 1,
                "app_name": "test1",
                "app_en_name": "test1",
                "app_type": "web",
                "data_center": 1,
                "scale": 1,
                "entrance_type": 4,
                "app_key": "05d9577e67cfd7fc7fceb9df7672573a",
                "status": 1,
                "description": null,
                "configs": null,
                "creator_id": "demo",
                "updator_id": "demo",
                "created_at": 1606985484,
                "updated_at": 1624342801
            },
            {
                "app_id": 2,
                "tea_app_id": 2,
                 ...
            }
        ],
        "total": null
    }
}
4.查询事件

4.1 API 定义

Path:openapi/v1/metadata/<app_id: int>/list/events
Method: POST
Content-type: application/json
Body:

ParameterTypeDescriptionRequired

filter

object

根据某些字段做过滤,可选值通常可用:

  • name 事件名

  • status 事件状态

  • id 事件id

  • creator_id 事件创建者id

false

with

list

获取事件时,携带获取关联的元数据信息,可选值为:

  • virtual_params 虚拟属性

  • property_dict 数据字典

  • values 事件属性值

  • alias 事件属性值对应的前端展示值

  • event_groups 事件分类

  • params 事件关联的属性

注意:with更多的关联信息将影响接口性能。

false

{
    "filter": {
        "name": ["app_launch", "predefine_pageview"],
        "status": [0, 1, 3, 4]
    },
    "with": ["params", "event_groups"]
}

Response:

{
    "code": 200,
    "message": "success",
    "data": [
        {
            "id": 390022,
            "app_id": 1234,
            "name": "app_launch",
            "show_name": "应用启动",
            "backing_show_name": "应用启动",
            "show_name_en": null,
            "i18n_show_names": {
                "en_US": "应用启动",
                "zh_CN": "应用启动",
                "ja_JP": "应用启动"
            },
            "description": null,
            "preset": 1,
            "use_slot": 0,
            "status": 1,
            "used_users": 0,
            "used_times": 0,
            "used_times_updated_ts": 1672650039,
            "created_at": 1621755535,
            "updated_at": 1675332462,
            "verifier": "",
            "verify_time_ts": null,
            "status_disable_ts": 1673512602,
            "data_reported": 1,
            "last_day_amounts": 0,
            "platform": [
                "others",
                "mp"
            ],
            "origin": 0,
            "creator_id": "meta",
            "updator_id": "ranger-admin(852809798129652)",
            "principal": "",
            "data_date": null,
            "data_source_name": null,
            "data_source": null,
            "priority": null,
            "event_category": null,
            "owners": null,
            "jump_url": null,
            "param_status": null,
            "params": [
                {
                    "app_id": 1234,
                    "event_name": "app_launch",
                    "param_id": 369279,
                    "name": "extra",
                    "value_type": "string",
                    "show_name": "",
                    "backing_show_name": "extra",
                    "preset": 0,
                    "description": "",
                    "store_location": "string_params",
                    "store_value_type": "string",
                    "type": 1,
                    "status": 1,
                    "used_times": 0,
                    "used_times_updated_ts": 1649239503,
                    "cardinality": 0,
                    "value": null,
                    "aliases": null,
                    "i18n_aliases": null,
                    "has_property_dict": false,
                    "property_dict_version": null,
                    "property_dict_updated_ts": 1623318181,
                    "property_dict": null,
                    "slot_name": "extra",
                    "slot_index": null,
                    "created_at": 1621755549,
                    "updated_at": 1622960698,
                    "owners": null
                }
            ],
            "virtual_params": null,
            "items": null,
            "source_platform": null,
            "event_groups": [
                {
                    "id": 10373,
                    "group_type": 2,
                    "name": "121",
                    "pos": 1,
                    "creator_id": 204449,
                    "created_at": 1658371763,
                    "updated_at": 1658383757,
                    "events": null,
                    "public": false
                }
            ]
        }
    ]
}
5.修改事件

5.1 API 定义

Path:openapi/v1/metadata/<app_id: int>/events
Method: PATCH
Content-type: application/json
Body:

ParameterTypeDescriptionRequired
idint事件idtrue

status

int

状态信息

  • 0 禁用

  • 1 启用

  • 2 隐藏

false

descriptionstr描述信息false
show_namestr展示信息false
{
    "status": 1,
    "id": 3228105
}

Response:

{
    "code": 200,
    "message": "success",
    "data": true
}
6.增加事件(通用操作)

6.1 API 定义

Path:openapi/v1/metadata/<app_id: int>/events:batchOperate
Method: POST
Content-type: application/json
Body:

ParameterTypeDescriptionRequired
eventslist事件列表true

operation_type

int

操作标识,当前只支持

  • 5 创建

  • 6 修改

true

{
    "events": [
        {
            "name": "aaaa",
            "show_name": "aaa",
            "event_group_ids": [
                11130
            ],
            "desc": "aaa"
        }
    ],
    "operation_type": 5
}

Response:

{
    "code": 200,
    "message": "success",
    "data": true
}
7.查询虚拟事件

7.1 API 定义

Path:openapi/v1/metadata/<app_id: int>/list/virtual_events
Method: POST
Content-type: application/json
Body:

ParameterTypeDescriptionRequired

filter

object

根据某些字段做过滤,可选值通常可用:

  • name 事件名

  • status 事件状态

  • id 事件id

  • creator_id 事件创建者id

false

with

list

获取事件时,携带获取关联的元数据信息,可选值为:

  • virtual_params 虚拟属性

  • property_dict 数据字典

  • values 事件属性值

  • alias 事件属性值对应的前端展示值

  • event_groups 事件分类

注意:with更多的关联信息将影响接口性能。

false

{
    "filter": {
        "name": ["aaaaaa"]
    },
    "with": ["virtual_params"]
}

Response:

{
    "code": 200,
    "message": "success",
    "data": [
        {
            "id": 22839602,
            "app_id": 2174,
            "name": "aaaaaa",
            "show_name": "aa",
            "status": 1,
            "dsl_content": {
                "logic": "or",
                "queries": [
                    {
                        "event_id": 234913,
                        "event_name": "predefine_pageview",
                        "event_type": "origin",
                        "filters": [],
                        "show_label": "A",
                        "event_indicator": "",
                        "measure_info": {},
                        "indicator_show_name": ""
                    }
                ]
            },
            "used_times": 0,
            "used_times_updated_ts": 1660707999000,
            "creator_id": "213697",
            "updator_id": "245171",
            "created_at": 1660707999000,
            "updated_at": 1664196294000,
            "owners": [
                ""
            ],
            "event_groups": null,
            "params": null,
            "virtual_params": [{
                    "id": 3402868,
                    "app_id": 2174,
                    "name": "$_vp_af32erfds",
                    "show_name": "",
                    "description": "",
                    "property_type": 1,
                    "param_type": 2,
                    "value_type": "string",
                    "sql_rule": "concat(user_profiles.loc_province_id,'123')",
                    "relation_event_param_properties": null,
                    "relation_user_profile_properties": [
                        "loc_province_id"
                    ],
                    "property_dict_version": null,
                    "property_dict_updated_ts": 1669014312,
                    "has_property_dict": false,
                    "property_dict": null,
                    "event_relation_strategy": "any",
                    "status": 1,
                    "used_times": 0,
                    "used_times_updated_ts": 1669014312,
                    "preset": 0,
                    "creator_id": "10000088",
                    "created_at": 1669014312,
                    "updated_at": 1669014312,
                    "events": [
                        {
                            "id": 235692,
                            "app_id": 2174,
                            "name": "any_event",
                            "show_name": "任意事件",
                            "backing_show_name": null,
                            "show_name_en": "",
                            "i18n_show_names": null,
                            "description": "{             \"event\": \"test_event\",             \"params\": \"{\\\"int_1\\\":1}\",             \"local_time_ms\": 1666161845237         }",
                            "preset": 1,
                            "use_slot": 0,
                            "status": 1,
                            "used_users": 117,
                            "used_times": 66211,
                            "used_times_updated_ts": null,
                            "created_at": 1621755535000,
                            "updated_at": 1676995246000,
                            "verifier": "",
                            "verify_time_ts": null,
                            "status_disable_ts": null,
                            "data_reported": 1,
                            "last_day_amounts": 37425234,
                            "platform": null,
                            "origin": 0,
                            "creator_id": "preset",
                            "updator_id": "张玮(10000150)",
                            "principal": "",
                            "data_date": null,
                            "data_source_name": null,
                            "data_source": null,
                            "priority": null,
                            "event_category": "normal",
                            "owners": null,
                            "jump_url": null,
                            "param_status": 1,
                            "params": null,
                            "virtual_params": null,
                            "items": null,
                            "source_platform": null,
                            "event_groups": null
                        }
                    ]
                }],
            "relation_events": null,
            "dsl": {
                "logic": "or",
                "queries": [
                    {
                        "event_id": 234913,
                        "event_name": "predefine_pageview",
                        "event_type": "origin",
                        "filters": [],
                        "show_label": "A",
                        "event_indicator": "",
                        "measure_info": {},
                        "indicator_show_name": ""
                    }
                ]
            }
        }
    ]
}
8.修改虚拟事件

8.1 API 定义

Path:openapi/v1/metadata/<app_id: int>/virtual_events/<event_id: int>
Method: PATCH
Content-type: application/json
Body:

ParameterTypeDescriptionRequired
idint事件idtrue

status

int

状态信息

  • 0 禁用

  • 1 启用

  • 2 隐藏

false

descriptionstr描述信息false
show_namestr展示信息false
dsl_contentobject虚拟事件的创建规则false
{
    "description": "a",
    "status": 1,
    "show_name": "new_show_name"

}

Response:

{
    "code": 200,
    "message": "success",
    "data": {
        "id": 22839602,
        "app_id": 2174,
        "name": "aaaaaa",
        "show_name": "new_show_name",
        "status": 1,
        "dsl_content": {
            "logic": "or",
            "queries": [
                {
                    "event_id": 234913,
                    "event_name": "predefine_pageview",
                    "event_type": "origin",
                    "filters": [],
                    "show_label": "A",
                    "event_indicator": "",
                    "measure_info": {},
                    "indicator_show_name": ""
                }
            ]
        },
        "used_times": 0,
        "used_times_updated_ts": 1660707999000,
        "creator_id": "213697",
        "updator_id": "245171",
        "created_at": 1660707999000,
        "updated_at": 1677063765000,
        "owners": [
            ""
        ],
        "event_groups": null,
        "params": null,
        "virtual_params": null,
        "relation_events": null,
        "dsl": {
            "logic": "or",
            "queries": [
                {
                    "event_id": 234913,
                    "event_name": "predefine_pageview",
                    "event_type": "origin",
                    "filters": [],
                    "show_label": "A",
                    "event_indicator": "",
                    "measure_info": {},
                    "indicator_show_name": ""
                }
            ]
        }
    }
}
9.增加虚拟事件

9.1 API 定义

Path:openapi/v1/metadata/<app_id: int>/virtual_events
Method: POST
Content-type: application/json
Body:

ParameterTypeDescriptionRequired
namestr事件名true

status

int

状态信息

  • 0 禁用

  • 1 启用

  • 2 隐藏

true

descriptionstr描述信息false
show_namestr展示信息false
dsl_contentobject虚拟事件的创建规则true
{
        "name": "aaaaaa-3",
        "show_name": "new_show_name",
        "status": 1,
        "dsl_content": {
            "logic": "or",
            "queries": [
                {
                    "event_id": 234913,
                    "event_name": "predefine_pageview",
                    "event_type": "origin",
                    "filters": [],
                    "show_label": "A",
                    "event_indicator": "",
                    "measure_info": {},
                    "indicator_show_name": ""
                }
            ]
        }
            }

Response:

{
    "code": 200,
    "message": "success",
    "data": {
        "id": 55345535,
        "app_id": 2174,
        "name": "aaaaaa-3",
        "show_name": "new_show_name",
        "status": 1,
        "dsl_content": {
            "logic": "or",
            "queries": [
                {
                    "event_id": 234913,
                    "event_name": "predefine_pageview",
                    "event_type": "origin",
                    "filters": [],
                    "show_label": "A",
                    "event_indicator": "",
                    "measure_info": {},
                    "indicator_show_name": ""
                }
            ]
        },
        "used_times": 0,
        "used_times_updated_ts": null,
        "creator_id": "213697",
        "updator_id": "213697",
        "created_at": null,
        "updated_at": null,
        "owners": null,
        "event_groups": null,
        "params": null,
        "virtual_params": null,
        "relation_events": null,
        "dsl": {
            "logic": "or",
            "queries": [
                {
                    "event_id": 234913,
                    "event_name": "predefine_pageview",
                    "event_type": "origin",
                    "filters": [],
                    "show_label": "A",
                    "event_indicator": "",
                    "measure_info": {},
                    "indicator_show_name": ""
                }
            ]
        }
    }
}
10.删除虚拟事件

10.1 API 定义

Path:openapi/v1/metadata/<app_id: int>/virtual_events/<event_name: str>
Method: DELETE
Content-type: application/json
Body:

{}

Response:

{
    "code": 200,
    "message": "success",
    "data": null
}
11.获取事件属性

11.1 API 定义

Path:openapi/v1/metadata/<app_id: int>/list/params
Method: POST
Content-type: application/json
Body:

ParameterTypeDescriptionRequired

filter

object

根据某些字段做过滤,可选值通常可用:

  • name 属性名

  • status 属性状态

false

with

list

获取事件时,携带获取关联的元数据信息,可选值为:

  • events 属性关联的事件

  • values 事件属性值

  • alias 属性值对应的前端展示值

  • property_dict 维度字典

  • event_params 事件与属性的关联关系

注意:with更多的关联信息将影响接口性能。

false


{
    "filter": {
        "name": "need_refresh"
    },
    "with": ["events", "event_params"]
}

Response:

{
    "code": 200,
    "message": "success",
    "data": [
        {
            "id": 6718923,
            "app_id": 2174,
            "name": "need_refresh",
            "value_type": "string",
            "show_name": "",
            "backing_show_name": "need_refresh",
            "show_name_en": null,
            "i18n_show_names": {},
            "preset": 0,
            "type": 1,
            "store_location": "string_params",
            "store_value_type": "string",
            "description": "",
            "status": 1,
            "used_users": 0,
            "used_times": 0,
            "used_times_updated_ts": 1649239508,
            "has_property_dict": false,
            "property_dict_version": null,
            "property_dict_updated_ts": 1638835525,
            "property_dict": {},
            "data_reported": 1,
            "platform": [
                "others"
            ],
            "verifier": "",
            "verify_time_ts": null,
            "status_disable_ts": null,
            "origin": 1,
            "creator_id": "",
            "updator_id": "",
            "created_at": 1638835525,
            "updated_at": 1638835525,
            "events": [
                {
                    "id": 3163686,
                    "app_id": 2174,
                    "name": "a",
                    "show_name": "",
                    "backing_show_name": "a",
                    "show_name_en": null,
                    "i18n_show_names": {},
                    "description": "",
                    "preset": 0,
                    "use_slot": 1,
                    "status": 1,
                    "used_users": 0,
                    "used_times": 0,
                    "used_times_updated_ts": 1649239495,
                    "created_at": 1638835525,
                    "updated_at": 1676995246,
                    "verifier": "",
                    "verify_time_ts": null,
                    "status_disable_ts": null,
                    "data_reported": 1,
                    "last_day_amounts": 10979,
                    "platform": [
                        "others"
                    ],
                    "origin": 1,
                    "creator_id": "runninginfo",
                    "updator_id": "runninginfo",
                    "principal": "",
                    "data_date": null,
                    "data_source_name": null,
                    "data_source": null,
                    "priority": null,
                    "event_category": null,
                    "owners": null,
                    "jump_url": null,
                    "param_status": 1,
                    "params": null,
                    "virtual_params": null,
                    "items": null,
                    "source_platform": null,
                    "event_groups": null
                }
            ],
            "event_params": [
                {
                    "id": 30535275,
                    "app_id": 2174,
                    "event_name": "a",
                    "param_name": "need_refresh",
                    "value_type": "string",
                    "slot_name": "_slot_param_2",
                    "slot_index": 2,
                    "store_value_type": "string",
                    "store_location": "string_params",
                    "cardinality": 0,
                    "value": null,
                    "status": 1,
                    "data_reported": 1,
                    "created_at": 1638835525,
                    "updated_at": 1672124621,
                    "show_name": "need_refresh",
                    "platform": "[\"others\"]"
                }
            ],
            "owners": null,
            "attr_classify": null
        }
    ]
}
12.修改事件属性

12.1 API 定义

Path:openapi/v1/metadata/<app_id: int>/params
Method: PATCH
Content-type: application/json
Body:

ParameterTypeDescriptionRequired
namestr属性名true

status

int

状态信息

  • 0 禁用

  • 1 启用

  • 2 隐藏

false

descriptionstr描述信息false
show_namestr展示信息false

value_type

str

属性类型,目前支持

  • int 整型

  • float 浮点型

  • string 字符串类型

  • datetime 日期类型

  • list 列表类型

  • version 版本号类型

false


{
    "name": "need_refresh",
    "value_type": "string",
    "show_name": "need_refresh show_name",
    "description": "need_refresh desc"
}

Response:

{
    "code": 200,
    "message": "success",
    "data": true
}
14.增加事件属性

14.1 API 定义

Path:openapi/v1/metadata/<app_id: int>/params:batchOperate
Method: POST
Content-type: application/json
Body:

ParameterTypeDescriptionRequired
paramslist事件属性列表true

operation_type

int

操作标识,当前只支持

  • 5 创建

  • 6 修改

true

params.[0].type

int

事件属性类型

  • 1 一般事件属性,需要关联事件

  • 2 事件公共属性,关联全部事件

true

params.[0].namestr属性名true
params.[0].value_typevalue_type属性类型true
params.[0].typeshow_name展示名false
params.[0].typedesc描述信息false
{
    "params": [
        {
            "name": "add_1",
            "value_type": "int",
            "type": 2,
            "show_name": "show_name_1",
            "desc": "desc_1"
        },
        {
            "name": "add_2",
            "value_type": "string",
            "desc": "desc_2",
            "show_name": "desc_2",
            "events": [
                {
                    "name": "app_launch"
                }
            ],
            "type": 1
        }
    ],
    "operation_type": 5
}

Response:

{
    "code": 200,
    "message": "success",
    "data": true
}
15.修改虚拟属性

15.1 API 定义

Path:openapi/v1/metadata/<app_id: int>/virtual_params
Method: PATCH
Content-type: application/json
Body:

ParameterTypeDescriptionRequired
namestr名称true
show_namestr展示名false
descriptionstr描述信息false

event_relation_strategy

str

事件关联类型

  • all 全部关联才关联

  • any 任一关联即关联

false

value_typestr属性类型true
sql_rulestrsql表达式true
{
    "property_type": 1,
    "value_type": "int",
    "event_relation_strategy": "any",
    "sql_rule": "concat(user_profiles.device_model, ' ', user_profiles.os_version)",
    "name": "$_vp_test_add_2"
}

Response:

{
    "code": 200,
    "message": "success",
    "data": true
}
16.增加虚拟属性

16.1 API 定义

Path:openapi/v1/metadata/<app_id: int>/virtual_params
Method: POST
Content-type: application/json
Body:

ParameterTypeDescriptionRequired
namestr属性名true
show_namestr展示名false
descriptionstr描述信息false

property_type

int

虚拟属性类型

  • 1 事件属性

  • 2 用户属性

false

event_relation_strategy

str

事件关联类型

  • all 全部关联才关联

  • any 任一关联即关联

true

value_typestr属性类型true
sql_rulestrsql表达式true
{
    "property_type": 1,
    "value_type": "string",
    "event_relation_strategy": "any",
    "sql_rule": "concat(user_profiles.device_model, ' ', user_profiles.os_version)",
    "name": "$_vp_test_add"
}

Response:

{
    "code": 200,
    "message": "success",
    "data": 1
}
17.删除虚拟属性

17.1 API 定义

Path:openapi/v1/metadata/<app_id: int>/virtual_params/<name: str>
Method: DELETE
Content-type: application/json

18.查询虚拟属性

18.1 API 定义

Path:openapi/v1/metadata/<app_id: int>/list/virtual_params
Method: POST
Content-type: application/json
Body:

ParameterTypeDescriptionRequired

filter

object

根据某些字段做过滤,可选值通常可用:

  • name 属性名

  • property_type 1为虚拟事件属性,2为虚拟用户属性

  • status 状态

false

with

list

获取虚拟属性时,携带获取关联的元数据信息,可选值为:

  • events

注意:with更多的关联信息将影响接口性能。

false

{
    "filter": {
        "name": "$_vp_af32erfds",
        "property_type": 1
    },
    "with": ["events"]
}

Response:

{
    "code": 200,
    "message": "success",
    "data": [
        {
            "id": 3402868,
            "app_id": 2174,
            "name": "$_vp_af32erfds",
            "show_name": "",
            "description": "",
            "property_type": 1,
            "param_type": 2,
            "value_type": "string",
            "sql_rule": "concat(user_profiles.loc_province_id,'123')",
            "relation_event_param_properties": null,
            "relation_user_profile_properties": [
                "loc_province_id"
            ],
            "property_dict_version": null,
            "property_dict_updated_ts": 1669014312,
            "has_property_dict": false,
            "property_dict": null,
            "event_relation_strategy": "any",
            "status": 1,
            "used_times": 0,
            "used_times_updated_ts": 1669014312,
            "preset": 0,
            "creator_id": "10000088",
            "created_at": 1669014312,
            "updated_at": 1669014312,
            "events": [
                {
                    "id": 235692,
                    "app_id": 2174,
                    "name": "any_event",
                    "show_name": "任意事件",
                    "backing_show_name": null,
                    "show_name_en": "",
                    "i18n_show_names": null,
                    "description": "{             \"event\": \"test_event\",             \"params\": \"{\\\"int_1\\\":1}\",             \"local_time_ms\": 1666161845237         }",
                    "preset": 1,
                    "use_slot": 0,
                    "status": 1,
                    "used_users": 117,
                    "used_times": 66211,
                    "used_times_updated_ts": null,
                    "created_at": 1621755535000,
                    "updated_at": 1676995246000,
                    "verifier": "",
                    "verify_time_ts": null,
                    "status_disable_ts": null,
                    "data_reported": 1,
                    "last_day_amounts": 37425234,
                    "platform": null,
                    "origin": 0,
                    "creator_id": "preset",
                    "updator_id": "张玮(10000150)",
                    "principal": "",
                    "data_date": null,
                    "data_source_name": null,
                    "data_source": null,
                    "priority": null,
                    "event_category": "normal",
                    "owners": null,
                    "jump_url": null,
                    "param_status": 1,
                    "params": null,
                    "virtual_params": null,
                    "items": null,
                    "source_platform": null,
                    "event_groups": null
                }
            ]
        }
    ]
}
19.获取用户属性

19.1 API 定义

Path:openapi/v1/metadata/<app_id: int>/list/user_profiles
Method: POST
Content-type: application/json
Body:

ParameterTypeDescriptionRequired

filter

object

根据某些字段做过滤,可选值通常可用:

  • name 属性名

  • status 属性状态

false

with

list

获取事件时,携带获取关联的元数据信息,可选值为:

  • event 属性关联的事件

  • values 事件属性值

  • alias 属性值对应的前端展示值

  • property_dict 维度字典

注意:with更多的关联信息将影响接口性能。

false


{
    "filter": {
        "name": ["os_name"]
    }
}

Response:

{
    "code": 200,
    "message": "success",
    "data": [
        {
            "id": 77584,
            "app_id": 2174,
            "name": "os_name",
            "show_name": "操作系统",
            "backing_show_name": "操作系统",
            "i18n_show_names": {
                "zh_CN": "操作系统",
                "en_US": "OS",
                "ja_JP": "オペレーティングシステム"
            },
            "description": "198273",
            "store_location": "os_name",
            "store_value_type": "string",
            "value_type": "string",
            "values": null,
            "aliases": {},
            "i18n_aliases": null,
            "has_property_dict": false,
            "property_dict_version": null,
            "property_dict_updated_ts": 1670838554,
            "property_dict": null,
            "used_users": 41,
            "used_times": 8268,
            "used_times_updated_ts": 1672650040,
            "cardinality": null,
            "slot_index": null,
            "slot_name": null,
            "source_type": 0,
            "status": 1,
            "operation_type": "all_value",
            "feature_code": "",
            "is_support_realtime": true,
            "creator_id": "preset",
            "updator_id": "刘志强(10000450)",
            "verifier": null,
            "created_at": 1616472404,
            "updated_at": 1674962391,
            "verify_time_ts": null,
            "status_disable_ts": null,
            "origin": 0,
            "data_source_name": null,
            "data_source_field": null,
            "data_source": null,
            "principal": "",
            "data_reported": 1,
            "attr_classify": null
        }
    ]
}
20.修改用户属性

20.1 API 定义

Path:openapi/v1/metadata/<app_id: int>/profile:batchOperate
Method: POST
Content-type: application/json
Body:

ParameterTypeDescriptionRequired
profileslist用户属性true

operation_type

int

操作类型

  • 5 新增

  • 6 修改

true

profiles[0].namestr属性名true

profiles[0].status

int

状态信息

  • 0 禁用

  • 1 启用

  • 2 隐藏

false

profiles[0].descriptionstr描述信息false
profiles[0].show_namestr展示信息false

profiles[0].value_type

str

属性类型,目前支持

  • int 整型

  • float 浮点型

  • string 字符串类型

  • datetime 日期类型

  • list 列表类型

  • version 版本号类型

false


{
    "profiles": [
        {
            "name": "os_name",
            "show_name": "os_name show_name",
            "description": "os_name desc"
        }
    ],
    "operation_type": 6
}

Response:

{
    "code": 200,
    "message": "success",
    "data": true
}
21.增加用户属性

21.1 API 定义

Path:openapi/v1/metadata/<app_id: int>/profile:batchOperate
Method: POST
Content-type: application/json
Body:

ParameterTypeDescriptionRequired
profileslist用户属性true

operation_type

int

操作类型

  • 5 新增

  • 6 修改

true

profiles[0].namestr属性名true

profiles[0].status

int

状态信息

  • 0 禁用

  • 1 启用

  • 2 隐藏

false

profiles[0].descriptionstr描述信息false
profiles[0].show_namestr展示信息false

profiles[0].value_type

str

属性类型,目前支持

  • int 整型

  • float 浮点型

  • string 字符串类型

  • datetime 日期类型

  • list 列表类型

  • version 版本号类型

false


{
    "profiles": [
        {
            "name": "new_os_name",
            "show_name": "os_name show_name",
            "description": "os_name desc",
            "value_type": "int"
        }
    ],
    "operation_type": 5
}

Response:

{
    "code": 200,
    "message": "success",
    "data": true
}