# List Stickers

This endpoint lists all Stickers if two conditions are met:

  • the user sending the request is on the recipients list of the Sticker,
  • the Sticker was created by the account of the caller. To widen the search, the user can add a query parameter to see all Stickers where they are on the recipients list regardless of the account where the Stickers were created (context=system) or Stickers which were created by an account with a given account UUID (context={account}).
Method Path Operation*
GET /stickers list_stickers

*

In order for a user to perform the "list_stickers" operation, the "list_stickers" permission must be included in the list of allowed actions in the statement of the user's role.

# Request

Parameter Type In Description
color
optional*
string query string Colors of the stickers to be returned in the response.
context
optional**
string, value is {account}, personal, or system; DEFAULT=personal query string You can narrow down the list of Stickers to be included in the search:
- {account}: Account UUID of the account where the Sticker was created.
- personal: Stickers for which the requesting user is the recipient.
- system: Stickers in the entire Trusted Twin system visible to the requesting user.
ge
optional***
timestamp query string Returns Stickers where creation timestamp is greater than or equal to the given Unix (opens new window) timestamp.
le
optional***
timestamp query string Returns Stickers where creation timestamp is lower than or equal to the given Unix (opens new window) timestamp.
limit
optional***
integer, DEFAULT=100 query string Limit on the number of Stickers to be returned in descending order. The default and maximum value is 100.
offset
optional
integer, DEFAULT=0 query string Determines the offset from which the records are to be provided. The records are provided in descending order (i.e., starting from the most recent record).

*

If no color keys are specified, all Stickers will be returned in the response filtered by other parameters.

**

If no context parameter is provided, the default value (context=personal) is used and only Stickers created by the account of the requesting using where he is on the "recipients" list are returned.

***

The ge, le, limit, and offset parameters are optional and do not need to be included in the request. If they are not included in the request, their default values are used. If the number of the records to be returned exceeds the limit provided in the request:

  • if the ge parameter is provided, the records to be returned are counted starting from the timestamp provided.
  • if the le parameter is provided, the records to be returned are counted from the timestamp provided.
  • if both ge and le parameters are provided, the records to be returned are counted from the timestamp provided in the le parameter (i.e., the most recent records are returned).

# Response

Attribute Type Description
color string User-defined category of the sticker. It must be unique in the context of an account. It must match the regular expression (opens new window) ^[a-z_][0-9a-z_]{0,127}$.
account string Account UUID of the account that created the Sticker.
twin string Twin UUID of the Twin with the Sticker.
message string Message for the recipients of the Sticker. The maximum length of a message is 256 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).

# Status codes

Requests to this endpoint result in generic status codes. For a comprehensive list of status codes, please consult the Status codes section.