Remove action
Allows users to remove message actions, by specifying the parent message, and the single timetoken of the action(s) they wish to delete.
It is technically possible to delete more than one action if the same UUID/userId posted different actions on the same parent message at the same time. If all goes well, the action(s) are deleted from the database, and one or more Action remove event messages are published on the same channel as the parent message.
By default, removing an action requires the delete permission on the channel. Without scope=self, uuid does not limit which actions are removed, so the request removes the action even if another user added it.
To let a client remove only its own actions with the write permission, set scope=self. The server then removes only the actions that were added by the uuid in the request. The token must be an Access Manager token with an Authorized UUID that matches uuid. With scope=self, a request for an action added by another user fails with a 400 error.
Requests signed with the secret key skip all Access Manager permission checks, so they need neither the delete permission nor a token. With scope=self, a signed request still removes only the actions that were added by uuid.
| Path Parameters |
|---|
sub_key string — REQUIREDYour app's subscribe key from Admin Portal. Example:
|
channel string — REQUIREDThe channel ID to perform the operation on. Example:
|
message_timetoken string — REQUIREDThe publish timetoken of a parent message. Example:
|
action_timetoken string — REQUIREDThe publish timetoken of the action. Example:
|
| Query Parameters |
|---|
auth stringString which is either the auth key (Access Manager legacy) or a valid token (Access Manager) used to authorize the operation if access control is enabled. Example:
|
uuid string — REQUIREDA UTF-8 encoded string of up to 92 characters used to identify the client. Example:
|
scope stringLimits the removal to the actions added by the With Requests signed with the secret key skip the permission and Authorized UUID checks. With Without Example:
|
signature stringSignature used to verify that the request was signed with the secret key associated with the subscribe key. If Access Manager is enabled, either a valid authorization token or a signature are required. Check 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 seconds offset from NTP. Required if the |
| Responses | |||||||
|---|---|---|---|---|---|---|---|
200The action was removed.
| |||||||
207The action was deleted but the action-deletion message was not published.
| |||||||
400The request is invalid or no action matches it. No action matches when the action doesn't exist, or when
| |||||||
403The client isn't authorized to perform this operation. The request fails with
Requests signed with the secret key aren't subject to these checks.
|
sub_key*channel*message_timetoken*action_timetoken*authuuid*scopeuuid in the request. The only accepted value is self (case-sensitive). Any other value fails with 400 (Invalid scope).With
scope=self, a client token that has the write permission, but not the delete permission, can remove its own actions. The token must be an Access Manager token with an Authorized UUID that matches uuid. Auth keys (legacy Access Manager) can't use scope=self without the delete permission.Requests signed with the secret key skip the permission and Authorized UUID checks. With
scope=self, they still remove only the actions added by uuid.Without
scope=self, the delete permission is required, uuid doesn't limit which actions are removed, and the request can remove the actions of other users.signatureassociated with the subscribe key.
If Access Manager is enabled, either a valid authorization token or a signature are required.
Check Access Manager documentation for details on how to compute the signature.
timestamphave no more than ± 60 seconds offset from NTP.
Required if the
signature parameter is supplied.status200data{}statuserror{
"status": 207,
"error": {
"source": "actions",
"message": "Deleted but failed to publish removed events."
}
}statuserror{
"status": 400,
"error": {
"source": "actions",
"message": "No matching message actions to delete"
}
}403 in these cases:- Without
scope=self, the token or auth key doesn't have the delete permission on the channel.- With
scope=self, the token doesn't have the write permission on the channel, or it has no Authorized UUID. Legacy auth keys can't use scope=self without the delete permission.- The token's Authorized UUID doesn't match
uuid. This applies with or without scope=self, even if the token has the delete permission.- No token is supplied.
Requests signed with the secret key aren't subject to these checks.
message"Forbidden"payloaderrortrueservice"Access Manager"status403{
"message": "Forbidden",
"payload": {
"channels": [
"myChannel"
]
},
"error": true,
"service": "Access Manager",
"status": 403
}