Sensors Data Tag API

The Tag API from Sensors Data — 14 operation(s) for tag.

Operations 14

POST /tag/definition/list 查询标签列表 #
POST /tag/definition/get 查询单个标签信息 #
POST /tag/definition/create 创建标签定义 #
POST /tag/definition/update 修改标签定义 #
POST /tag/definition/delete 删除标签定义 #
POST /tag/definition/recover 恢复标签定义 #
POST /tag/definition/archive 归档标签定义 #
POST /tag/definition/recover-from-archive 从归档恢复标签定义 #
POST /tag/definition/evaluate 执行标签计算 #
POST /tag/definition/status/update 更改调度状态 #
POST /tag/partition/get 获取标签的 partition 列表 #
POST /tag/latest-partition/get 获取最新的 partition 信息 #
POST /tag/task/get 获取标签任务信息 #
POST /tag/task/cancel 取消计算任务 #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sensors-data-tag-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sensors-data-tag-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: 标签管理服务
  title: 神策数界 Tag API
  version: ''
servers:
- url: /api/v3/horizon/v1
tags:
- name: Tag
paths:
  /tag/definition/list:
    post:
      description: "查询标签列表\n 发起请求例子:\n ```\n curl -X POST \"http://{host}:{port}/api/v3/horizon/v1/tag/definition/list\" \\\n  -H \"Accept: application/json\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"sensorsdata-project: {项目英文名}\" \\\n  -H \"api-key: {apiToken}\" \\\n  -d '{\"page_size\": 2,\"page\": 1,\"entity_name\": \"user\", \"show_deleted\": true,\"show_invisible\": true}'\n  ```"
      operationId: ListTagDefinitions
      parameters:
      - description: 全局唯一的密钥,用于验证和授权访问 API 接口
        in: header
        name: api-key
        required: true
        schema:
          type: string
      - description: 项目名, 指定请求所属项目
        in: header
        name: sensorsdata-project
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sensorsdata.horizon.v1.ListTagDefinitionsRequest'
        required: false
      responses:
        default:
          content:
            application/json:
              example:
                code: SUCCESS
                data:
                  tags:
                    code: SUCCESS
                    request_id: 251401273be374c310082b8616ec7f52
                    data:
                      tags:
                      - entity_name: user
                        name: user_tag_c1
                        display_name: ces1
                        comment: ''
                        folder: ''
                        data_type: STRING
                        expression:
                          tag_type: SEGMENT_BASED
                          virtual: false
                          filter_segment_at_last: false
                          entity_set_rules: []
                          segment_based_rule:
                            groups:
                            - segment:
                                type: GROUP_EXPRESSION_BASED
                                virtual: false
                                entity_set_rules: []
                                group_expression_rule:
                                  groups:
                                  - type: EQL_BASED
                                    virtual: false
                                    entity_set_rules: []
                                    eql_segment_rule:
                                      eql: (user.city.is_null())
                                    version: 0
                                  group_expression: '"$1"'
                                version: 0
                              tag: 分层1
                          version: 2
                        visible: true
                        current_rule_available: true
                        trigger:
                          trigger_type: MANUAL
                        custom_params:
                          sdh_tag_service_internal_tag_id:
                            data_type: INT
                            int_value: 37
                            list_value: []
                          front_type:
                            data_type: STRING
                            string_value: TAG_CUSTOMIZED_RULE_NEW
                            list_value: []
                        managed: true
                        status: TAG_ACTIVE
                        created_by: SDH_WEB
                        create_type: TAG_CUSTOMIZED_RULE
                        storage_settings:
                          version_count: 1
                        tag_post_actions: []
                        alarm_config:
                          enable: false
                          alarm_rules: []
                        rule_version: 2
                        labels: []
                        creator_id: '5'
                        modifier_id: '5'
                        create_time: '2025-03-21T05:57:06.706Z'
                        update_time: '2025-03-21T06:03:26.183Z'
                        source:
                          app: SDH
                          category: TAG
                          sub_category: ''
                      - entity_name: user
                        name: user_tag_c2
                        display_name: ces2
                        comment: ''
                        folder: ''
                        data_type: STRING
                        expression:
                          tag_type: SEGMENT_BASED
                          virtual: false
                          filter_segment_at_last: false
                          entity_set_rules: []
                          segment_based_rule:
                            groups:
                            - segment:
                                type: GROUP_EXPRESSION_BASED
                                virtual: false
                                entity_set_rules: []
                                group_expression_rule:
                                  groups:
                                  - type: EQL_BASED
                                    virtual: false
                                    entity_set_rules: []
                                    eql_segment_rule:
                                      eql: (user.birthday.is_not_null())
                                    version: 0
                                  group_expression: '"$1"'
                                version: 0
                              tag: 分层1
                          version: 2
                        visible: true
                        current_rule_available: true
                        trigger:
                          trigger_type: MANUAL
                        custom_params:
                          sdh_tag_service_internal_tag_id:
                            data_type: INT
                            int_value: 38
                            list_value: []
                          front_type:
                            data_type: STRING
                            string_value: TAG_CUSTOMIZED_RULE_NEW
                            list_value: []
                        managed: true
                        status: TAG_ACTIVE
                        created_by: SDH_WEB
                        create_type: TAG_CUSTOMIZED_RULE
                        storage_settings:
                          version_count: 1
                        tag_post_actions: []
                        alarm_config:
                          enable: false
                          alarm_rules: []
                        rule_version: 1
                        labels: []
                        creator_id: '5'
                        modifier_id: '5'
                        create_time: '2025-03-21T06:05:46.234Z'
                        update_time: '2025-03-21T06:05:56.217Z'
                        source:
                          app: SDH
                          category: TAG
                          sub_category: ''
                request_id: '1'
              schema:
                $ref: '#/components/schemas/sensorsdata.horizon.v1.ListTagDefinitionsResponseHttpApiResult'
          description: sensorsdata.horizon.v1.ListTagDefinitionsResponse
      summary: 查询标签列表
      x-sd-openapi:
        responseClass: com.sensorsdata.horizon.v1.ListTagDefinitionsResponse
        isServerStreaming: false
        requestClass: com.sensorsdata.horizon.v1.ListTagDefinitionsRequest
        grpcServiceBase: com.sensorsdata.horizon.v1.TagServiceGrpc.TagServiceImplBase
        internalDesc: classes in template for grpc service dynamic invoking
        isClientStreaming: false
      x-codegen-request-body-name: ListTagDefinitionsRequest
      tags:
      - Tag
  /tag/definition/get:
    post:
      description: "查询单个标签信息\n ```\n curl -X POST \"http://{host}:{port}/api/v3/horizon/v1/tag/definition/get\" \\\n  -H \"Accept: application/json\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"sensorsdata-project: {projectName}\" \\\n  -H \"api-key: {token}\" \\\n  -d '{ \"entity_name\": \"user\",\"show_deleted\": true,\"name\": \"user_tag_c1\"}'\n  ```"
      operationId: GetTagDefinition
      parameters:
      - description: 全局唯一的密钥,用于验证和授权访问 API 接口
        in: header
        name: api-key
        required: true
        schema:
          type: string
      - description: 项目名, 指定请求所属项目
        in: header
        name: sensorsdata-project
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sensorsdata.horizon.v1.GetTagDefinitionRequest'
        required: false
      responses:
        default:
          content:
            application/json:
              example:
                code: SUCCESS
                data:
                  expression:
                    tag_type: LOADING_BASED
                    virtual: false
                    filter_segment_at_last: false
                    entity_set_rules: []
                    loading_based_rule:
                      matched_field: user.$identity_login_id
                      sync_flag: false
                      loading_type: TAG_LOADING_TYPE_OVERWRITE
                  visible: true
                  entity_name: user
                  create_type: TAG_CUSTOMIZED_RULE
                  tag_post_actions:
                  - {}
                  trigger:
                    trigger_type: CRON
                    cron_trigger:
                      crontab_exp: 0 6 21 * * ? *
                    periodic_trigger: {}
                    static_trigger:
                      time: '2020-07-08T00:00:00Z'
                    sync_job_trigger: {}
                  source:
                    app: SF
                    category: AUDIENCE
                  display_name: 我的标签
                  storage_settings:
                    version_count: 100
                  created_by: SA
                  labels:
                  - label_display_name: 标签扩展属性1
                    label_values:
                    - 标签自定义属性值1
                    label_type: SINGLE_ENUM
                    label_name: tag_label_name1
                  managed: 'true'
                  alarm_config:
                    alarm_rules:
                    - name: alar_rule_1
                    enable: true
                  name: user_tag_bq1
                  data_type: STRING
                  comment: 我的标签描述
                  notify_params:
                    subscribe_param:
                      contents:
                      - {}
                  status: TAG_ACTIVE
                request_id: '1'
              schema:
                $ref: '#/components/schemas/sensorsdata.horizon.v1.TagDefinitionHttpApiResult'
          description: sensorsdata.horizon.v1.TagDefinition
      summary: 查询单个标签信息
      x-sd-openapi:
        responseClass: com.sensorsdata.horizon.v1.TagDefinition
        isServerStreaming: false
        requestClass: com.sensorsdata.horizon.v1.GetTagDefinitionRequest
        grpcServiceBase: com.sensorsdata.horizon.v1.TagServiceGrpc.TagServiceImplBase
        internalDesc: classes in template for grpc service dynamic invoking
        isClientStreaming: false
      x-codegen-request-body-name: GetTagDefinitionRequest
      tags:
      - Tag
  /tag/definition/create:
    post:
      description: "创建标签定义\n ```\n curl -X POST \"http://{host}:{port}/api/v3/horizon/v1/tag/definition/create\" \\\n  -H \"Accept: application/json\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"sensorsdata-project: {projectName}\" \\\n  -H \"api-key: {token}\" \\\n  -d '{\"definition\":{\"entity_name\":\"user\",\"create_type\":\"TAG_UPLOAD\",\"source\":{\"app\":\"SDH\",\"category\":\"TAG\",\"sub_category\":\"\"},\"storage_settings\":{\"version_count\":1},\"managed\":true,\"expression\":{\"tag_type\":\"LOADING_BASED\",\"virtual\":false,\"filter_segment_at_last\":false,\"entity_set_rules\":[],\"loading_based_rule\":{\"matched_field\":\"user.$identity_login_id\",\"sync_flag\":false,\"loading_type\":\"TAG_LOADING_TYPE_OVERWRITE\"}},\"visible\":true,\"trigger\":{\"trigger_type\":\"MANUAL\"},\"display_name\":\"导入测试1\",\"created_by\":\"SDH_WEB\",\"rule_version\":1,\"name\":\"user_tag_drcs1\",\"data_type\":\"NUMBER\",\"comment\":\"\",\"status\":\"TAG_ACTIVE\"},\"dry_run\":false}'\n ```"
      operationId: CreateTagDefinition
      parameters:
      - description: 全局唯一的密钥,用于验证和授权访问 API 接口
        in: header
        name: api-key
        required: true
        schema:
          type: string
      - description: 项目名, 指定请求所属项目
        in: header
        name: sensorsdata-project
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sensorsdata.horizon.v1.CreateTagDefinitionRequest'
        required: false
      responses:
        default:
          content:
            application/json:
              example:
                code: SUCCESS
                data:
                  expression:
                    tag_type: LOADING_BASED
                    virtual: false
                    filter_segment_at_last: false
                    entity_set_rules: []
                    loading_based_rule:
                      matched_field: user.$identity_login_id
                      sync_flag: false
                      loading_type: TAG_LOADING_TYPE_OVERWRITE
                  visible: true
                  entity_name: user
                  create_type: TAG_CUSTOMIZED_RULE
                  tag_post_actions:
                  - {}
                  trigger:
                    trigger_type: CRON
                    cron_trigger:
                      crontab_exp: 0 6 21 * * ? *
                    periodic_trigger: {}
                    static_trigger:
                      time: '2020-07-08T00:00:00Z'
                    sync_job_trigger: {}
                  source:
                    app: SF
                    category: AUDIENCE
                  display_name: 我的标签
                  storage_settings:
                    version_count: 100
                  created_by: SA
                  labels:
                  - label_display_name: 标签扩展属性1
                    label_values:
                    - 标签自定义属性值1
                    label_type: SINGLE_ENUM
                    label_name: tag_label_name1
                  managed: 'true'
                  alarm_config:
                    alarm_rules:
                    - name: alar_rule_1
                    enable: true
                  name: user_tag_bq1
                  data_type: STRING
                  comment: 我的标签描述
                  notify_params:
                    subscribe_param:
                      contents:
                      - {}
                  status: TAG_ACTIVE
                request_id: '1'
              schema:
                $ref: '#/components/schemas/sensorsdata.horizon.v1.TagDefinitionHttpApiResult'
          description: sensorsdata.horizon.v1.TagDefinition
      summary: 创建标签定义
      x-sd-openapi:
        responseClass: com.sensorsdata.horizon.v1.TagDefinition
        isServerStreaming: false
        requestClass: com.sensorsdata.horizon.v1.CreateTagDefinitionRequest
        grpcServiceBase: com.sensorsdata.horizon.v1.TagServiceGrpc.TagServiceImplBase
        internalDesc: classes in template for grpc service dynamic invoking
        isClientStreaming: false
      x-codegen-request-body-name: CreateTagDefinitionRequest
      tags:
      - Tag
  /tag/definition/update:
    post:
      description: "修改标签定义\n```\ncurl -X POST \"http://{host}:{port}/api/v3/horizon/v1/tag/definition/update\" \\\n  -H \"Accept: application/json\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"sensorsdata-project: {projectName}\" \\\n  -H \"api-key: {token}\" \\\n  -d '{\"definition\":{\"entity_name\":\"user\",\"storage_settings\":{\"version_count\":2},\"expression\":{\"tag_type\":\"LOADING_BASED\",\"virtual\":false,\"filter_segment_at_last\":false,\"entity_set_rules\":[],\"loading_based_rule\":{\"matched_field\":\"user.$identity_login_id\",\"sync_flag\":false,\"loading_type\":\"TAG_LOADING_TYPE_OVERWRITE\"}},\"visible\":true,\"trigger\":{\"trigger_type\":\"MANUAL\"},\"comment\":\"修改后的备注\",\"display_name\":\"导入测试1\",\"name\":\"user_tag_drcs1\",\"status\":\"TAG_ACTIVE\"},\"update_mask\":\"display_name,comment,expression,visible,trigger,custom_params,alarm_config,labels,status\"}'\n```"
      operationId: UpdateTagDefinition
      parameters:
      - description: 全局唯一的密钥,用于验证和授权访问 API 接口
        in: header
        name: api-key
        required: true
        schema:
          type: string
      - description: 项目名, 指定请求所属项目
        in: header
        name: sensorsdata-project
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sensorsdata.horizon.v1.UpdateTagDefinitionRequest'
        required: false
      responses:
        default:
          content:
            application/json:
              example:
                code: SUCCESS
                data:
                  expression:
                    tag_type: LOADING_BASED
                    virtual: false
                    filter_segment_at_last: false
                    entity_set_rules: []
                    loading_based_rule:
                      matched_field: user.$identity_login_id
                      sync_flag: false
                      loading_type: TAG_LOADING_TYPE_OVERWRITE
                  visible: true
                  entity_name: user
                  create_type: TAG_CUSTOMIZED_RULE
                  tag_post_actions:
                  - {}
                  trigger:
                    trigger_type: CRON
                    cron_trigger:
                      crontab_exp: 0 6 21 * * ? *
                    periodic_trigger: {}
                    static_trigger:
                      time: '2020-07-08T00:00:00Z'
                    sync_job_trigger: {}
                  source:
                    app: SF
                    category: AUDIENCE
                  display_name: 我的标签
                  storage_settings:
                    version_count: 100
                  created_by: SA
                  labels:
                  - label_display_name: 标签扩展属性1
                    label_values:
                    - 标签自定义属性值1
                    label_type: SINGLE_ENUM
                    label_name: tag_label_name1
                  managed: 'true'
                  alarm_config:
                    alarm_rules:
                    - name: alar_rule_1
                    enable: true
                  name: user_tag_bq1
                  data_type: STRING
                  comment: 我的标签描述
                  notify_params:
                    subscribe_param:
                      contents:
                      - {}
                  status: TAG_ACTIVE
                request_id: '1'
              schema:
                $ref: '#/components/schemas/sensorsdata.horizon.v1.TagDefinitionHttpApiResult'
          description: sensorsdata.horizon.v1.TagDefinition
      summary: 修改标签定义
      x-sd-openapi:
        responseClass: com.sensorsdata.horizon.v1.TagDefinition
        isServerStreaming: false
        requestClass: com.sensorsdata.horizon.v1.UpdateTagDefinitionRequest
        grpcServiceBase: com.sensorsdata.horizon.v1.TagServiceGrpc.TagServiceImplBase
        internalDesc: classes in template for grpc service dynamic invoking
        isClientStreaming: false
      x-codegen-request-body-name: UpdateTagDefinitionRequest
      tags:
      - Tag
  /tag/definition/delete:
    post:
      description: "删除标签定义\n```\ncurl -X POST \"http://{host}:{port}/api/v3/horizon/v1/tag/definition/delete\" \\\n  -H \"Accept: application/json\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"sensorsdata-project: {projectName}\" \\\n  -H \"api-key: {token}\" \\\n  -d '{\"entity_name\":\"user\",\"name\":\"user_tag_zdybq\",\"skip_trash\":false}'\n 返回值:\n {\"code\":\"SUCCESS\",\"request_id\":\"281138383035f9fd2bb394df6fe17970\",\"data\":{}}\n```"
      operationId: DeleteTagDefinition
      parameters:
      - description: 全局唯一的密钥,用于验证和授权访问 API 接口
        in: header
        name: api-key
        required: true
        schema:
          type: string
      - description: 项目名, 指定请求所属项目
        in: header
        name: sensorsdata-project
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sensorsdata.horizon.v1.DeleteTagDefinitionRequest'
        required: false
      responses:
        default:
          content:
            application/json:
              example:
                code: SUCCESS
                data: {}
                request_id: '1'
              schema:
                $ref: '#/components/schemas/sensorsdata.common.HttpApiResult'
          description: ''
      summary: 删除标签定义
      x-sd-openapi:
        responseClass: com.google.protobuf.Empty
        isServerStreaming: false
        requestClass: com.sensorsdata.horizon.v1.DeleteTagDefinitionRequest
        grpcServiceBase: com.sensorsdata.horizon.v1.TagServiceGrpc.TagServiceImplBase
        internalDesc: classes in template for grpc service dynamic invoking
        isClientStreaming: false
      x-codegen-request-body-name: DeleteTagDefinitionRequest
      tags:
      - Tag
  /tag/definition/recover:
    post:
      description: "恢复标签定义\n```\ncurl -X POST \"http://{host}:{port}/api/v3/horizon/v1/tag/definition/recover\" \\\n  -H \"Accept: application/json\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"sensorsdata-project: {projectName}\" \\\n  -H \"api-key: {token}\" \\\n  -d '{\"entity_name\":\"user\",\"name\":\"user_tag_zdybq\"}'\n 返回值:\n{\"code\":\"SUCCESS\",\"request_id\":\"281141337b94cc1225cf95803d55ef53\",\"data\":{\"visible\":false,\"entity_name\":\"\",\"create_type\":\"\",\"tag_post_actions\":[],\"created_by\":\"\",\"labels\":[],\"custom_params\":{},\"folder\":\"\",\"rule_version\":0,\"name\":\"\",\"data_type\":\"DATA_TYPE_UNSPECIFIED\",\"creator_id\":\"\",\"modifier_id\":\"\",\"current_rule_available\":false,\"status\":\"TAG_STATUS_UNSPECIFIED\"}}\n```"
      operationId: RecoverTagDefinition
      parameters:
      - description: 全局唯一的密钥,用于验证和授权访问 API 接口
        in: header
        name: api-key
        required: true
        schema:
          type: string
      - description: 项目名, 指定请求所属项目
        in: header
        name: sensorsdata-project
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sensorsdata.horizon.v1.RecoverTagDefinitionRequest'
        required: false
      responses:
        default:
          content:
            application/json:
              example:
                code: SUCCESS
                data:
                  expression:
                    tag_type: LOADING_BASED
                    virtual: false
                    filter_segment_at_last: false
                    entity_set_rules: []
                    loading_based_rule:
                      matched_field: user.$identity_login_id
                      sync_flag: false
                      loading_type: TAG_LOADING_TYPE_OVERWRITE
                  visible: true
                  entity_name: user
                  create_type: TAG_CUSTOMIZED_RULE
                  tag_post_actions:
                  - {}
                  trigger:
                    trigger_type: CRON
                    cron_trigger:
                      crontab_exp: 0 6 21 * * ? *
                    periodic_trigger: {}
                    static_trigger:
                      time: '2020-07-08T00:00:00Z'
                    sync_job_trigger: {}
                  source:
                    app: SF
                    category: AUDIENCE
                  display_name: 我的标签
                  storage_settings:
                    version_count: 100
                  created_by: SA
                  labels:
                  - label_display_name: 标签扩展属性1
                    label_values:
                    - 标签自定义属性值1
                    label_type: SINGLE_ENUM
                    label_name: tag_label_name1
                  managed: 'true'
                  alarm_config:
                    alarm_rules:
                    - name: alar_rule_1
                    enable: true
                  name: user_tag_bq1
                  data_type: STRING
                  comment: 我的标签描述
                  notify_params:
                    subscribe_param:
                      contents:
                      - {}
                  status: TAG_ACTIVE
                request_id: '1'
              schema:
                $ref: '#/components/schemas/sensorsdata.horizon.v1.TagDefinitionHttpApiResult'
          description: sensorsdata.horizon.v1.TagDefinition
      summary: 恢复标签定义
      x-sd-openapi:
        responseClass: com.sensorsdata.horizon.v1.TagDefinition
        isServerStreaming: false
        requestClass: com.sensorsdata.horizon.v1.RecoverTagDefinitionRequest
        grpcServiceBase: com.sensorsdata.horizon.v1.TagServiceGrpc.TagServiceImplBase
        internalDesc: classes in template for grpc service dynamic invoking
        isClientStreaming: false
      x-codegen-request-body-name: RecoverTagDefinitionRequest
      tags:
      - Tag
  /tag/definition/archive:
    post:
      description: "归档标签定义\n```\ncurl -X POST \"http://{host}:{port}/api/v3/horizon/v1/tag/definition/archive\" \\\n  -H \"Accept: application/json\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"sensorsdata-project: {projectName}\" \\\n  -H \"api-key: {token}\" \\\n  -d '{\"entity_name\":\"user\",\"name\":\"user_tag_zdybq\"}'\n 返回值:\n {\"code\":\"SUCCESS\",\"request_id\":\"28114456e926d6e022c498ecdf24c3f7\",\"data\":{}}\n```"
      operationId: ArchiveTagDefinition
      parameters:
      - description: 全局唯一的密钥,用于验证和授权访问 API 接口
        in: header
        name: api-key
        required: true
        schema:
          type: string
      - description: 项目名, 指定请求所属项目
        in: header
        name: sensorsdata-project
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sensorsdata.horizon.v1.ArchiveTagDefinitionRequest'
        required: false
      responses:
        default:
          content:
            application/json:
              example:
                code: SUCCESS
                data: {}
                request_id: '1'
              schema:
                $ref: '#/components/schemas/sensorsdata.common.HttpApiResult'
          description: ''
      summary: 归档标签定义
      x-sd-openapi:
        responseClass: com.google.protobuf.Empty
        isServerStreaming: false
        requestClass: com.sensorsdata.horizon.v1.ArchiveTagDefinitionRequest
        grpcServiceBase: com.sensorsdata.horizon.v1.TagServiceGrpc.TagServiceImplBase
        internalDesc: classes in template for grpc service dynamic invoking
        isClientStreaming: false
      x-codegen-request-body-name: ArchiveTagDefinitionRequest
      tags:
      - Tag
  /tag/definition/recover-from-archive:
    post:
      description: "从归档恢复标签定义\n```\ncurl -X POST \"http://{host}:{port}/api/v3/horizon/v1/tag/definition/recover-from-archive\" \\\n  -H \"Accept: application/json\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"sensorsdata-project: {projectName}\" \\\n  -H \"api-key: {token}\" \\\n  -d '{\"entity_name\":\"user\",\"name\":\"user_tag_zdybq\"}'\n 返回值:\n{\"code\":\"SUCCESS\",\"request_id\":\"281241337b94dc1235cf95803d56df53\",\"data\":{\"visible\":false,\"entity_name\":\"\",\"create_type\":\"\",\"tag_post_actions\":[],\"created_by\":\"\",\"labels\":[],\"custom_params\":{},\"folder\":\"\",\"rule_version\":0,\"name\":\"\",\"data_type\":\"DATA_TYPE_UNSPECIFIED\",\"creator_id\":\"\",\"modifier_id\":\"\",\"current_rule_available\":false,\"status\":\"TAG_STATUS_UNSPECIFIED\"}}\n```"
      operationId: RecoverArchivedTagDefinition
      parameters:
      - description: 全局唯一的密钥,用于验证和授权访问 API 接口
        in: header
        name: api-key
        required: true
        schema:
          type: string
      - description: 项目名, 指定请求所属项目
        in: header
        name: sensorsdata-project
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sensorsdata.horizon.v1.RecoverArchivedTagDefinitionRequest'
        required: false
      responses:
        default:
          content:
            application/json:
              example:
                code: SUCCESS
                data:
                  expression:
                    tag_type: LOADING_BASED
                    virtual: false
                    filter_segment_at_last: false
                    entity_set_rules: []
                    loading_based_rule:
                      matched_field: user.$identity_login_id
                      sync_flag: false
                      loading_type: TAG_LOADING_TYPE_OVERWRITE
                  visible: true
                  entity_name: user
                  create_type: TAG_CUSTOMIZED_RULE
                  tag_post_actions:
                  - {}
                  trigger:
                    trigger_type: CRON
                    cron_trigger:
                      crontab_exp: 0 6 21 * * ? *
                    periodic_trigger: {}
                    static_trigger:
                      time: '2020-07-08T00:00:00Z'
                    sync_job_trigger: {}
                  source:
                    app: SF
                    category: AUDIENCE
                  display_name: 我的标签
                  storage_settings:
                    version_count: 100
                  created_by: SA
                  labels:
                  - label_display_name: 标签扩展属性1
                    label_values:
                    - 标签自定义属性值1
                    label_type: SINGLE_ENUM
                    label_name: tag_label_name1
                  managed: 'true'
                  alarm_config:
                    alarm_rules:
                    - name: alar_rule_1
                    enable: true
                  name: user_tag_bq1
                  data_type: STRING
                  comment: 我的标签描述
                  notify_params:
                    subscribe_param:
                      contents:
                      - {}
                  status: TAG_ACTIVE
                request_id: '1'
              schema:
                $ref: '#/components/schemas/sensorsdata.horizon.v1.TagDefinitionHttpApiResult'
          description: sensorsdata.horizon.v1.TagDefinition
      summary: 从归档恢复标签定义
      x-sd-openapi:
        responseClass: com.sensorsdata.horizon.v1.TagDefinition
        isServerStreaming: false
        requestClass: com.sensorsdata.horizon.v1.RecoverArchivedTagDefinitionRequest
        grpcServiceBase: com.sensorsdata.horizon.v1.TagServiceGrpc.TagServiceImplBase
        internalDesc: classes in template for grpc service dynamic invoking
        isClientStreaming: false
      x-codegen-request-body-name: Rec

# --- truncated at 32 KB (134 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/sensors-data/refs/heads/main/openapi/sensors-data-tag-api-openapi.yml