Delete message history
Removes the messages from the history of a specific channel.
- If you supply neither a
start
nor anend
parameter, the server deletes all messages for that channel. - If you supply a
start
parameter without anend
parameter, the server deletes all messages before that time. Start time is exclusive, meaning that a message with that timestamp will not be deleted. - If you supply an
end
parameter without astart
parameter, the server deletes all messages from the current time until the end time. End time is inclusive, meaning that a message with that timestamp will be deleted. - If you supply both a
start
and anend
parameter, the server deletes all messages from the start time through the end time. Start time is exclusive, and end time is inclusive. - If you supply both a
start
and anend
parameter, and their values are equal, the server deletes no messages. - To delete a single message, set the parameter values as follows:
end = messageTimetoken
andstart = messageTimetoken(int) + 1
- If you have Access Manager enabled for your subkey, the request needs to have a signature or authKey.
Path Parameters |
---|
sub_key string — REQUIREDYour app's subscribe key from Admin Portal. Example:
|
channels string — REQUIREDThe channel names to perform the operation on. Example:
|
Query Parameters |
---|
start numberTimetoken delimiting the start of time slice (exclusive) to pull messages from. Exclusive means that the message associated with the timetoken will be excluded from the result. If provided, lets you select a start date, in Timetoken format. If not provided, it will default to current time. Page through results by providing a start OR end time token. Retrieve a slice of the time line by providing both a start AND end time token. start is exclusive, that is, the first item returned will be the one immediately after the start Timetoken value. Example:
|
end numberTimetoken delimiting the end of time slice (inclusive) to pull messages from. Inclusive means that the message associated with the timetoken will be included in the result. If provided, lets you select an end date, in Timetoken format. Page through results by providing a start OR end time token. Retrieve a slice of the time line by providing both a start AND end time token. End is inclusive, that is, if a message is associated exactly with the end Timetoken, it will be included in the result. Example:
|
auth stringString which is either the auth key (PAM v2) or a valid token (Access Manager) used to authorize the operation if access control is enabled. Example:
|
uuid stringA UTF-8 encoded string of up to 92 characters used to identify the client. Example:
|
signature stringSignature used to verify that the request was signed with the secret key associated with the subscriber key. If Access Manager is enabled, either a valid authorization token or a signature are required. See Access Manager documentation for details on how to compute the signature. |
timestamp integerUnix epoch timestamp used as a nonce for signature computation. Must have no more than ± 60 second offset from NTP. Required if |
Responses | ||||
---|---|---|---|---|
200 OK
| ||||
400 Parse error.
| ||||
403 Do not have permission to delete
|