Torch Log Service
Name | Type | Required | Example | Description |
Name | Type | Required | Example | Description |
TopicId | String | True | 4a******** | The ID of the topic. |
Query | String | True | error | The query and analysis statements. The maximum length of the statement is 4 KiB. Please refer to Analysis overview for the structure of the query and analysis statement. For the syntax of the query statement, please refer to Log query syntax, and for the list of supported SQL analysis syntax and functions, please refer to Analysis overview. |
StartTime | Integer | True | 1346457600000 | The start time of the query, accurate to the millisecond. It is in unix timestamp format, representing the number of milliseconds calculated from January 1, 1970, 00:00:00 UTC. If specified at the second level, the server will automatically convert the precision to milliseconds. |
EndTime | Integer | True | 1630454400000 | The end time of the query, accurate to the millisecond. It's in unix timestamp format, representing the number of milliseconds calculated from January 1, 1970, 00:00:00 UTC. If specified at the second level, the server will automatically convert the precision to milliseconds. |
Limit | Integer | False | 30 | This parameter is used to indicate the amount of data per page when displaying the query results in pages. The maximum value is 1000, and it can return up to 20MiB of the logs at a time, and up to 100,000 entries through pagination. warning
|
Context | String | False | [1650349469000, 130,9, null] | This is used to specify the position for a secondary query during a follow-up search, typically used in context search scenarios. Each time the SearchLogs interface is called, it will also return the data end point. If you need to view subsequent log information, you can call the SearchLogs interface again, and pass in the Context obtained from the last response in the request. tip This parameter takes effect when only query the logs, there are only query statements in the Query parameter, and no analysis statements. Pagination is not supported during simultaneous query and analysis. |
Sort | String | False | desc | Return logs in order of log timestamps, accurate to the millisecond.
tip This parameter takes effect when only query the logs, there are only query statements in the Query parameter, and no analysis statements. |
HighLight | Boolean | False | false | Whether the search keywords are highlighted in the query results. |
AccurateQuery | Boolean | False | true | Whether to query logs with nanosecond precision.
|
Name | Type | Example | Description |
Name | Type | Example | Description |
ResultStatus | String | complete | The status of the query.
|
ListOver | Boolean | true | Whether all results have been returned.
tip This parameter is valid if there are only query statements in the Query parameter, and no analysis statements. |
Analysis | Boolean | false | The type of the returned result.
|
Count | Integer | 0 | Analyze the number of entries hit by the request. |
Limit | Integer | 0 | the limit number of log entries to return is specified in the request. Default is 100.
|
Context | String | [1650349469000, 130,9, null] | This is used to specify the continuation point for a secondary query, typically used in scenarios such as context queries. Each time the SearchLogs interface is called, it will also return the end point of the data. If you need to view subsequent log information, you can call the SearchLogs interface again and pass in the Context obtained from the last response in the request. |
Logs | Array of JSON Map | / | The returned list of log entries, where:
|
AnalysisResult | / | Analysis results. | |
HighLight | Array of JSON Map | / | The highlighted keywords. |
ElapsedMillisecond | Integer | 100 | The time used for this query, with the unit of milliseconds. |
Name | Type | Example | Description |
Name | Type | Example | Description |
Data | Array of JSON Map | [{ "KeyInfo": "key:000000000940", "KeyType": "string", "ValueLen": "1", }] | The returned key-value pairs from the analysis results. |
Type | JSON Map | { "KeyInfo": "text", "KeyType": "text", "ValueLen": "long", } | The attributes corresponding to the log analysis column. |
Schema | Array of String | ["KeyType","ValueLen","KeyInfo"] | The names of the columns for log analysis. |
HTTP status code | Error code | Error message | Description |
HTTP status code | Error code | Error message | Description |
400 | InvalidArgument | Invalid argument key %s, value %s, please check argument. | The parameter is invalid. |
400 | SqlSyntaxError | Sql syntax Error,details: Function [%s] cannot work with [%s]. Usage: SUM(NUMBER T) -\u003e T | SQL format or syntax error. |
404 | TopicNotExist | Topic does not exist. | The topic does not exist. |
500 | InternalServerError | We encountered an unexpected server error, please try again later. | Internal server error. |
400 | SearchSyntaxError | The key-value index for field (%s) is not configured. | The key-value index has not been configured for the query field. |