Path:/finder/openApi/v2/cdpMeta/labelSystem/label/latestHistoryData
Method: GET
Path-parameters:
Name | Data type | Is it required? | Describe |
|---|---|---|---|
id | Int | Yes | Tag ID |
showNum | Int | Yes | Number of label values (value range greater than 0) |
Header:
Name | Data type | Is it required? | Describe |
|---|---|---|---|
X-Tenant | Int | Yes | Project ID |
Response:
{ "code":0, "msg":"success", "data":{ "scheduleTime":"2023-04-25", "distinctNumber":5124, "coverage":"100.00%", "statistics":[ { "count":5124, "originValue":"tag value 1", "mappingValue":"tag value 1", "tagCoverage":"100.00%", "totalCoverage":"100.00%" } ], "queryMauCost":16, "queryDataCost":160 } }
Field meaning description
Data returns a JSON object, specifying key fields
Field | Type | Description |
|---|---|---|
scheduleTime | string | Date of calculation of latest results (recommended) |
distinctNumber | int | total number of data rows |
coverage | double | The proportion of the number of data rows belonging to the label value to the total number of data rows |
statistics | object | Calculation result details |
statistics.originValue | string | label value |
statistics.mappingValue | string | label mapping value |
statistics.count | int | The number of rows of data belonging to the label value |
statistics.tagCoverage | string | The label coverage of the tag value |
statistics.totalCoverage | string | Coverage of the total number of people belonging to the label value |
queryMauCost | int | Query mautag consumption time |
queryDataCost | int | Query label data consumption time |
Bc is the RangersClient created. For its initialization, please refer to the "OpenAPI SDK Instructions". SDKs in various languages provide similar interfaces.
Call (Python):
res = bc.request('/finder/openApi/v2/cdpMeta/labelSystem/label/latestHistoryData', headers={'x-Tenant': "1"}, params={'id': 2, 'showNum': 10}) print(res.content) print(json.loads(res.content))
Return result:
{ "code":0, "msg":"success", "data":{ "scheduleTime":"2023-06-25", "distinctNumber":873, "coverage":"2.28%", "statistics":[ { "count":873, "originValue":"\xe6\xa0\x87\xe7\xad\xbe\xe5\x80\xbc1", "mappingValue":"\xe6\xa0\x87\xe7\xad\xbe\xe5\x80\xbc1", "tagCoverage":"100.00%", "totalCoverage":"2.28%" } ], "queryMauCost":42, "queryDataCost":279 } }