You can call this operation to create a trace query task through the input topic and message key and obtain the task ID of the query task.
If a service provider has recorded a message key and needs to query the delivery trace of the message based on the message key, it can call OnsTraceQueryByMsgKey to create a query task. After the task ID is returned, you can call OnsTraceGetResult to obtain the query result based on the task ID. For more information about OnsTraceGetResult, see OnsTraceGetResult.
|PreventCache||Long||Yes||The parameter used for CSRF verification, which can be set to the current system time. Unit: ms|
|InstanceId||String||No||The ID of the instance.|
|Topic||String||Yes||The topic of the message you want to query.|
|MsgKey||String||Yes||The key of the message you want to query (message key).|
|BeginTime||Long||Yes||The start time of the query time range.|
|EndTime||Long||Yes||The end time of the query time range.|
|RequestId||String||A common parameter. Each request has a unique ID.|
|HelpUrl||String||A help link.|
|QueryId||String||The ID of the query task. You can call OnsTraceGetResult to obtain detailed results based on the task ID.|
For more information about sample codes, see API sample code and endpoints.