All Products
Search
Document Center

OnsTraceQueryByMsgKey

Last Updated: Sep 13, 2019

OnsTraceQueryByMsgKey

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.

Description

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.

Request parameters

Name Type Required Description
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.

Response parameters

Name Type Description
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.

Examples

For more information about sample codes, see API sample code and endpoints.