# Remove Sticker
This endpoint removes a given Sticker from a given Twin. The Sticker removal operation is atomic.
STICKER RECIPIENTS LIST
Please note that in order to remove a Sticker a user needs to be included on the "recipients"
list of the given Sticker. If a user created a Sticker and did not include themselves (i.e., the UUID of their user, the UUID of their role, or the UUID of the account their user belong to) on the "recipients"
list, they will not be able to remove the Sticker from the given Twin. They will receive the error message "Sticker not found"
when trying to remove the Sticker.
Method | Path | Operation* |
---|---|---|
DELETE | /twins/{twin}/stickers/{color} | remove_sticker |
*
In order for a user to perform the "remove_sticker" operation, the "remove_sticker" permission must be included in the list of allowed actions in the statement of the user's role.
# Request
Parameter | Type | In | Description |
---|---|---|---|
{twin} required | string | path | Twin UUID of the Twin from which the Sticker should be removed. |
color required | string | path | User-defined category of the Sticker. Must be unique in the context of an account. Must match the regular expression(opens new window) [0-9A-Za-z\-]{3,48} . |
context optional | string, value is {account} , personal , or system ; DEFAULT=personal | query string | Narrows down the list of Stickers to be removed: - {account} : Account UUID of the account where the Stickers were created.- personal : Stickers for which the calling user is the recipient. - system : Stickers in the entire Trusted Twin system visible to the requesting user. |
# Response
Attribute | Type | Description |
---|---|---|
account | string | Account UUID of the account that created the Sticker. |
note | string | Note for the recipients of the Sticker. The maximum length of a note is 512 characters. |
validity_ts | timestamp | Time at which the Sticker expires. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch(opens new window). |
created_ts | timestamp | Time at which the Sticker was created. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch(opens new window). |
publish | dictionary | List of events that trigger a notification message for the Sticker with the subscription topics that the notifications are to be sent to. The key is the event. The value is the notification topics or a list of notifications topics. The event can be one of the following: - "on_put" : A notification message is triggered when a Sticker of the given color is put on a given Twin.- "on_remove" : A notification message is triggered when a Sticker of a given color is removed from the given Twin.- "on_expire" : A notification message is triggered when the "validity_ts" of a Sticker is reached and the Sticker expires. A notification message is triggered up to 60 seconds from the time a Sticker has expired.The value is the name of the subscription topic. It must match the regular expression(opens new window) ^[0-9A-Za-z\-]{3,48}$ . |
# Status codes
Requests to this endpoint result in generic status codes. For a comprehensive list of status codes, please consult the Status codes section.
Was this article helpful?