Box Events
#
IntroductionBoxes contain events that have a type.
In practice, most events will be of type msg.text
or msg.file
,
corresponding to the sending of messages (with either text or files in it) to the box.
There are however a few other events,
most of them describing a change of the state of the box.
The shape and rules for box events are described here.
#
Events on boxes#
SINGLE creation of an event for a boxThis endpoint allows the creation of events of a specific box. Considering the type of event, side effects will occurs.
ℹ️ The shape and rules for box events are described here.
This endpoint does not allow the creation of all type of event though. Some require to use different routes to be created as a side effect:
create
type events are created by the server during the creation of the box.msg.file
type events are created by the server during the upload of an encrypted file.access.*
type events can only be created using events batch creation.member.kick
type events are created by the server during the removal of an access.
#
RequestJSON Body:
#
Response#
BATCH creation of events for a boxThis endpoint allows the creation of many events in a single request, on a specific box.
This action is called a batch events creation.
ℹ️ The shape and rules for box events are described here.
Batch event creation can't be performed using any type of events. There are type of batches.
Here is the exhaustive list of possible batch types:
accesses
: allow the add and removal of many accesses.
#
RequestJSON Body:
#
ResponseJSON Body:
#
Getting Events in a Box#
RequestCookies:
accesstoken
(opaque token) (ACR >= 1): a valid token.tokentype
: must bebearer
Headers:
X-CSRF-Token
: a token to prevent from CSRF attacks.
Query Parameters: Pagination (more info). Default limit is 500.
#
ResponseCode:
#
Getting File Events in a Box#
RequestCookies:
accesstoken
(opaque token) (ACR >= 1): a valid token.tokentype
: must bebearer
Headers:
X-CSRF-Token
: a token to prevent from CSRF attacks.
Query Parameters:
Pagination (more info). Default limit is 500.
#
ResponseCode:
Events are returned in chronological order.
#
Count events for a given box#
RequestCookies:
accesstoken
(opaque token) (ACR >= 1): a valid token.tokentype
: must bebearer
Headers:
X-CSRF-Token
: a token to prevent from CSRF attacks.
#
ResponseCode:
Headers:
X-Total-Count
(integer): the total count of events that the user can see.
#
Count file events for a given box#
RequestCookies:
accesstoken
(opaque token) (ACR >= 1): a valid token.tokentype
: must bebearer
Headers:
X-CSRF-Token
: a token to prevent from CSRF attacks.
#
ResponseCode:
Headers:
X-Total-Count
(integer): the total count of file events.