menu
Is this helpful?

# メタデータ管理API

For the call method, see the call method description in the Open API document.

It is recommended to read the metadata management section of the TE user manual first to understand the relevant functions: Data Management

# 1.Event Management

# Query Virtual Events

Interface URL

/open/get-virtual-event-by-name?token=xxx&projectId=377&eventName=ta@test222

Request method

GET

Content-Type

application/json

Request Query Parameter

Parameter name Sample value Parameter type Is required Parameter description
token
xxx
String
Yes
token
projectId
377
Integer
Yes
Project ID
eventName
ta@test222
String
Yes
Event type

Successful Response Example

{
    "data": {
        "eventDesc": "Test virtual events",
        "eventName": "ta@teset",
        "remark": "",
        "rule": {
            "events": [
                {
                    "eventDesc": "obtain coin",
                    "eventName": "obtain_coin",
                    "filter": {
                        "filterType": "COMPOUND",
                        "filts": [],
                        "relation": "and"
                    }
                }
            ],
            "filter": {
                "filterType": "COMPOUND",
                "filts": [],
                "relation": "and"
            }
        }
    },
    "return_code": 0,
    "return_message": "success"
}
Parameter name Sample value Parameter type Parameter description
data
-
Object
Return data
eventDesc Test virtual events
String
Event description
eventName ta@teset
String
Event name
remark -
String
Event remarks
rule -
Object
Virtual event rules
events -
List
Event list
eventDesc Get gold coins
String
Event description
eventName obtain_coin
String
Event name
filter -
Object
Attribute filter
filterType COMPOUND
String
Filters,
COMPOUND: composite type
SIMPLE: Simple type
filterfilts []
List
Filter value list
filterrelation and
String
Filter logical relationships
filter -
Object
Attribute filter
filterType COMPOUND
String
Filters,
COMPOUND: composite type
SIMPLE: Simple type
filts []
List
Filtered value list
relation and
String
Filter logical relationships
return_code
0
Integer
Return code
return_message
success
String
Return information

# Event Element Information List

Interface URL

/open/list-event-meta?token=xxx&projectId=377

Request method

GET

Content-Type

application/json

Request Query Parameter

Parameter name Sample value Parameter type Is required Parameter description
token
xxx
String
Yes
token
projectId
377
Integer
Yes
Project ID
propName
-
String
No
The name of the property, which is used to query property-related events. All physical and virtual events are returned when not present

Successful Response Example

{
    "data": {
        "events": [
            {
                "eventDesc": "attand activity",
                "eventName": "activity_attend",
                "eventTag": "111,aaa",
                "eventType": "event",
                "isHide": false,
                "remark": "attand activity 321"
            }
        ]
    },
    "return_code": 0,
    "return_message": "success"
}
Parameter name Sample value Parameter type Parameter description
data
-
Object
Return data
events -
List
Event list
eventDesc Participate in activities
String
Event description
eventName activity_attend
String
Event name
eventTag 111,aaa
String
Event tags
eventType event
String
Event type
event: physical event
event_v: virtual events
isHide false
Boolean
Whether to hide
remark Participate in activities 321
String
Event remarks
return_code
0
Integer
Return code
return_message
success
String
Return information

# Create Virtual Events

Interface URL

/open/create-virtual-event?token=xxx&projectId=0&override=false

Request method

POST

Content-Type

application/json

Request Query Parameter

Parameter name Sample value Parameter type Is required Parameter description
token
xxx
String
Yes
token
projectId
0
Integer
Yes
Project ID
override
false
String
Yes
If a virtual event with the same name already exists, an error will be reported when 'override' is false, and the virtual event definition will be updated when it is true.

Request Body Parameter

{
  "eventName": "ta@test_vevent",
  "eventDesc": "test virtual event",
  "remark": "",
  "rule": {
    "events": [
      {
        "eventDesc": "attend activity",
        "eventName": "activity_attend",
        "filter": {
          "relation": "and",
          "filts": [
            {
              "comparator": "equal",
              "columnDesc": "network type",
              "columnName": "network",
              "ftv": [
                "4G"
              ],
              "selectType": "string",
              "tableType": "event"
            }
          ]
        }
      }
    ]
  }
}
Parameter name Sample value Parameter type Is required Parameter description
eventName
ta@test_vevent
String
Yes
Event name
eventDesc
Test virtual events
String
No
Event description
remark
String
No
Event remarks
rule
-
Object
Yes
Rules
events -
List
Yes
Event list
eventName activity_attend
String
Yes
Event type
eventDesc Participate in activities
String
No
Event description
filter -
Object
No
Attribute filter
filterType SIMPLE
String
No
Filter
COMPOUND: composite type
SIMPLE: simple type
filts -
List
No
Filter object list
comparator equal
String
No
Comparison type
columnDesc Network Type
String
No
Field description
columnName network
String
Yes
Field name
ftv ["4G"]
List
No
Filtered value list
selectType string
String
No
Filter value filter box type
tableType event
String
No
Event: event attribute, user: user feature
filterType SIMPLE
String
No
Filters,
COMPOUND: composite type
SIMPLE: Simple type
relation and
String
No
Filter logical relationships

Successful Response Example

{
    "return_code": 0,
    "return_message": "success"
}
Parameter name Sample value Parameter type Parameter description
return_code
0
Integer
Return code
return_message
success
String
Return information

Error Response Example

{
    "return_code": -1008,
    "return_message": "eventName cannot be empty,rule cannot be null"
}
Parameter name Sample value Parameter type Parameter description
return_code
-1008
Integer
Return code
return_message
EventName cannot be null, rule cannot be null
String
Return information

# Modify Event Description

TIP

  • The maximum length of the event description is 60 characters, and the excess part will be truncated automatically.
  • Event description cannot contain emoji.
  • The virtual event description cannot be duplicated with other virtual event descriptions and event names.
  • The physical event display name cannot be duplicated with other physical event descriptions and event names.

Interface URL

/open/update-event-info?token=xxx&projectId=0

Request method

POST

Content-Type

application/json

Request Query Parameter

Parameter name Sample value Parameter type Is required Parameter description
token
xxx
String
Yes
token
projectId
0
Integer
Yes
Project ID

Request Body Parameter

{
    "eventName": "test007",
    "eventDesc": "testDesc"
}
Parameter name Sample value Parameter type Is required Parameter description
eventName
test
String
Yes
Event name
eventDesc
testDesc
String
Yes
Event description

Successful Response Example

{
    "return_code": 0,
    "return_message": "success"
}
Parameter name Sample value Parameter type Parameter description
return_code
0
Integer
Return code
return_message
success
String
Return information

Error Response Example

{
    "return_code": -1008,
    "return_message": "Event test007 has been hidden or deleted, please reset the condition"
}
Parameter name Sample value Parameter type Parameter description
return_code
-1008
Integer
Return code
return_message
Event test007 has been hidden or deleted, please reset conditions
String
Return information

# Delete Virtual Events

Interface URL

/open/delete-virtual-event-by-name?token=xxx&projectId=0&eventName=test

Request method

POST

Content-Type

application/json

Request Query Parameter

Parameter name Sample value Parameter type Is required Parameter description
token
xxx
String
Yes
token
projectId
0
Integer
Yes
Project ID
eventName
test
String
Yes
Event type

Successful Response Example

{
    "return_code": 0,
    "return_message": "success"
}
Parameter name Sample value Parameter type Parameter description
return_code
0
Integer
Return code
return_message
success
String
Return information

Error Response Example

{
    "return_code": -1008,
    "return_message": "Event test has been hidden or deleted, please reset the condition"
}
Parameter name Sample value Parameter type Parameter description
return_code
-1008
String
Return code
return_message
Event test has been hidden or deleted, please reset conditions
String
Return information

# 2. Attribute Management

# Query Virtual Properties

Interface URL

/open/get-sql-prop-by-name?token=xxx&projectId=0&propName=%23vp@location&tableType=event

Request method

GET

Content-Type

application/json

Request Query Parameter

Parameter name Sample value Parameter type Is required Parameter description
token
xxx
String
Yes
token
projectId
0
Integer
Yes
Project ID
propName
#vp@location
String
Yes
Attribute name
tableType
event
String
Yes
Event: event attribute, user: user feature

Successful Response Example

{
    "data": {
        "relatedEvents": [
            {
                "eventName": "event name",
                "eventDesc": "event display name"
            }
        ],
        "sqlEventRelationType": "relation_default",
        "sqlExpression": "concat(\"#country\",'-',\"#province\",'-',\"#city\")",
        "vProp": {
            "property": {
                "columnDesc": "location information",
                "columnName": "#vp@location",
                "selectType": "string",
                "tableType": "event"
            }
        }
    },
    "return_code": 0,
    "return_message": "success"
}
Parameter name Sample value Parameter type Parameter description
data
-
Object
Return data
relatedEvents -
List
List of associated events
eventName Event type
String
Event type
eventDesc Event display name
String
Event display name
sqlEventRelationType relation_default
String
relation_default: Automatically parse related matters
relation_always: All events are related
relation_by_setting: Related events in relatedEvents
sqlExpression concat("#country",'-',"#province",'-',"#city")
String
SQL expression
vProp -
Object
Virtual property list
property -
Object
Virtual properties
columnDesc Location information
String
Field display name
columnName #vp@location
String
Field name
selectType string
String
Filter value filter box type
tableType event
String
Attribute type
Event: event attributes
User: user features
return_code
0
Integer
Return code
return_message
success
String
Return information

Error Response Example

{
    "return_code": -1008,
    "return_message": "User property test007 has been hidden or deleted, please reset the condition"
}
Parameter name Sample value Parameter type Parameter description
return_code
-1008
Integer
Return code
return_message
User feature test007 has been hidden or deleted, please reset conditions
String
Return information

# Attribute List

Interface URL

/open/list-props?token=xxx&projectId=0&tableType=event&eventName

Request method

GET

Content-Type

application/json

Request Query Parameter

Parameter name Sample value Parameter type Is required Parameter description
token
xxx
String
Yes
token
projectId
0
Integer
Yes
Project ID
tableType
event
String
Yes
Attribute type
Event: event attributes
User: user features
eventName
-
String
No
TableType is valid when it is an event. The name of the physical or virtual event, this parameter is used to query the event-related properties. All physical and virtual properties are returned when not passed

Successful Response Example

{
    "data": {
        "properties": [
            {
                "canCreateDict": true,
                "columnDesc": "activity name def:123123123123123123",
                "columnName": "activity_item_operation",
                "columnRemark": "",
                "dictProps": [
                    {
                        "canCreateDict": false,
                        "columnDesc": "",
                        "columnName": "activity_item_operation@channel_name",
                        "columnRemark": "",
                        "isHide": false,
                        "propType": "vprop_dict",
                        "selectType": "string",
                        "tableType": "event"
                    }
                ],
                "isHide": false,
                "propType": "prop_unpreset",
                "selectType": "string",
                "tableType": "event"
            }
        ]
    },
    "return_code": 0,
    "return_message": "success"
}
Parameter name Sample value Parameter type Parameter description
data
-
Object
Return data
properties -
List
canCreateDict true
Boolean
Can I create a dimension table?
columnDesc Activity item def: 123123123123123123
String
Field display name
columnName activity_item_operation
String
Field name
columnRemark -
String
Field description
dictProps -
List
Associated dimension field
canCreateDict false
String
Can I create a dimension table?
columnDesc -
String
Field display name
columnName activity_item_operation@channel_name
String
Field name
columnRemark -
String
Field description
isHide false
Boolean
Whether to hide
propType vprop_dict
String
Attribute type
selectType string
String
Filter value filter box type
tableType event
String
The field belongs to the table type
isHide false
Boolean
Whether to hide
propType prop_unpreset
String
Attribute type
prop_preset: Prefabricated physical properties
prop_unpreset: Custom physical properties
vprop_dict: Dimension table attributes based on physical attributes
vprop_sql: Virtual properties based on physical properties
vprop_dict_v: Dimension table attributes based on virtual attributes
vprop_sql_v: Virtual properties based on dimension table properties
selectType string
String
Filter value filter box type
tableType event
String
The field belongs to the table type
return_code
0
Integer
Return code
return_message
success
String
Return information

# Modify Attribute Display Name

TIP

  1. The maximum attribute display name is 60 characters, the excess part is automatically truncated, and emoji expressions cannot be included. Virtual attributes cannot have the same name as other virtual attributes, and physical attributes cannot have the same name as other physical attributes.
  2. Property description is up to 200 characters long, and the excess part is automatically truncated.
  3. Update the virtual property definition if the virtual property with the same name already exists.

Interface URL

/open/update-prop-info?token=xxx&projectId=0

Request method

POST

Content-Type

application/json

Request Query Parameter

Parameter name Sample value Parameter type Is required Parameter description
token
xxx
String
Yes
token
projectId
0
Integer
Yes
Project ID

Request Body Parameter

{
    "columnName": "test",
    "columnDesc": "testDesc",
    "columnRemark": "testRemark",
    "tableType": "event"
}
Parameter name Sample value Parameter type Is required Parameter description
columnName
test
String
Yes
Field name
columnDesc
testDesc
String
Yes
Field display name
columnRemark
testRemark
String
No
Field description
tableType
testType
String
Yes
Attribute type
Event: event attributes
User: user features

Successful Response Example

{
    "return_code": 0,
    "return_message": "success"
}
Parameter name Sample value Parameter type Parameter description
return_code
0
Integer
Return code
return_message
success
String
Return information

Error Response Example

{
    "return_code": -1023,
    "return_message": "event property(test) does not exist"
}
Parameter name Sample value Parameter type Parameter description
return_code
-1023
Integer
Return code
return_message
Event property (test) does not exist
String
Return information

# Dimension Dictionary Checksum and Creation

note

File upload method to create a dimension dictionary, file size limit 200M

Interface URL

/open/dict-create?token=xxx&projectId=0&createParam=test

Request method

POST

Content-Type

text/csv

Request Query Parameter

Parameter name Sample value Parameter type Is required Parameter description
token
xxx
String
Yes
token
projectId
0
Integer
Yes
Project ID
createParam
test
String
Yes
-

Successful Response Example

{
    "data": {
        "totalLineNum": 4,
        "successLineNum": 1,
        "duplcatedMainKeyLineNum": 1,
        "duplcatedMainKeyColumns": ["city@test"],
        "mainKeyErrorLineNum": 1,
        "mainKeyErrorColumns": ["brand@quantity"],
        "typeErrorLineNum": 1,
        "typeErrorColumns": ["iswin@num"],
        "repeatWithConlumnName": [{
            "columnName": "channel@channel_name",
            "columnDesc": "channel type"
        }],
        "repeatWithConlumnDesc": [{
            "columnName": "channel@channel_name",
            "columnDesc": "channel type"
        }]
    },
    "return_code": 0,
    "return_message": "success"
}
Parameter name Sample value Parameter type Parameter description
return_code
0
String
Return code
return_message
success
String
Return information
data
-
Object
Return data
totalLineNum 4
Integer
Total number of parsed rows
successLineNum 1
Integer
Number of rows successfully imported
duplcatedMainKeyLineNum 1
Integer
Number of rows repeating primary key
duplcatedMainKeyColumns ["city@test"]
List
List of rows with duplicate primary keys
mainKeyErrorLineNum 1
Integer
Number of rows of wrong primary key type
mainKeyErrorColumns ["brand@quantity"]
List
List of rows of the wrong primary key type
typeErrorLineNum 1
Integer
Number of rows with typed errors in other columns
typeErrorColumns ["iswin@num"]
List
Other columns contain a list of rows with type errors
repeatWithConlumnName -
List
Display name and attribute name duplicate list
columnName channel@channel_name
String
Attribute field name
columnDesc Channel Type
String
Property display name
repeatWithConlumnDesc -
List
Duplicate list of display names and display names
columnName channel@channel_name
String
Attribute field name
columnDesc Channel Type
String
Property display name

Error Response Example

{
    "return_code": -3004,
    "return_message": "invalid item"
}
Parameter name Sample value Parameter type Parameter description
return_code
-3004
String
Return code
return_message
Invalid item
String
Return information

# New Virtual Attributes

note

Update the virtual property definition if the virtual property with the same name already exists.

Interface URL

/open/create-sql-prop?token=xxx&projectId=110

Request method

POST

Content-Type

application/json

Request Query Parameter

Parameter name Sample value Parameter type Is required Parameter description
token
xxx
String
Yes
token
projectId
110
Integer
Yes
Project ID

Request Body Parameter

{
  "sqlExpression": "get_ip_location(\"#ip\")",
  "vProp" : {
    "property" : {
      "columnDesc": "Geographic Location Information for IP Address Resolution",
      "columnName": "#vp@location_array_from_ip",
      "tableType": "event",
      "selectType":"array"
    }
  },
  "sqlEventRelationType" : "relation_default",
}
Parameter name Sample value Parameter type Is required Parameter description
sqlExpression
get_ip_location(\"#ip\")
String
Yes
SQL expression
vProp
-
Object
Yes
Virtual attribute information
property -
Object
Yes
Virtual attribute information
columnDesc Geolocation Information for Internet Protocol Address Resolution
String
No
Field name
columnName #vp@location_array_from_ip
String
Yes
Field display name
tableType event
String
Yes
Table type
Event: event attributes
User: user features
selectType array
String
Yes
Filter value filter box type
sqlEventRelationType
relation_default
String
No
Parse type, default relation_default
relation_default: Automatically resolve related events
relation_always: All events are related events
relation_by_setting: Related events in relatedEvents

Successful Response Example

{
    "return_code": 0,
    "return_message": "success"
}
Parameter name Sample value Parameter type Parameter description
return_code
0
String
Return code
return_message
success
String
Return information

Error Response Example

{
    "return_code": -3004,
    "return_message": "invalid item"
}
Parameter name Sample value Parameter type Parameter description
return_code
-3004
String
Return code
return_message
Invalid item
String
Return information

# Delete Dimension Attributes

Interface URL

/open/delete-dict-props?token=xxx&projectId=0&tableType=event&mainColumnName=test

Request method

POST

Content-Type

application/json

Request Query Parameter

Parameter name Sample value Parameter type Is required Parameter description
token
xxx
String
Yes
token
projectId
0
Integer
Yes
Project ID
tableType
event
String
Yes
Attribute type
Event: event attributes
User: user features
mainColumnName
test
String
Yes
The name of the main attribute associated with the dimension table

Successful Response Example

{
    "return_code": 0,
    "return_message": "success"
}
Parameter name Sample value Parameter type Parameter description
return_code
0
Integer
Return code
return_message
success
String
Return information

Error Response Example

{
    "return_code": -1008,
    "return_message": "Event property test has been hidden or deleted, please reset the condition"
}
Parameter name Sample value Parameter type Parameter description
return_code
-1008
Integer
Return code
return_message
Event property test has been hidden or deleted, please reset conditions
String
Return information

# Delete SQL Virtual Attribute

Interface URL

/open/delete-sql-prop-by-name?token=xxx&projectId=0&tableType=event&propName=test

Request method

POST

Content-Type

application/json

Request Query Parameter

Parameter name Sample value Parameter type Is required Parameter description
token
xxx
String
Yes
token
projectId
0
Integer
Yes
Project ID
tableType
event
String
Yes
Attribute type
Event: event
User: user
propName
test
String
Yes
Attribute name

Successful Response Example

{
    "return_code": 0,
    "return_message": "success"
}
Parameter name Sample value Parameter type Parameter description
return_code
0
Integer
Return code
return_message
success
String
Return information

Error Response Example

{
    "return_code": -1023,
    "return_message": "virtual event prop test does not exist"
}
Parameter name Sample value Parameter type Parameter description
return_code
-1023
Integer
Return code
return_message
Virtual event prop test does not exist
String
Return information