Saved Files
#
IntroductionThe saved files mecanism implements a storage space for users to keep some files on the platform. These files must come from an existing box and can be removed from the storage space at any time.
#
Creating a Saved FileThis endpoints allows a user to add a file to their storage space.
#
RequestCookies:
accesstoken
(opaque token) (ACR >= 2): the identity of the token must be the same than the one in the requesttokentype
: must bebearer
Headers:
X-CSRF-Token
: a token to prevent from CSRF attacks, delivered at the end of the auth flow
JSON Body:
identity_id
(string) (uuid): id of the identity owning the saved file.encrypted_file_id
(string) (uuid): id of the encrypted file.encrypted_metadata
(string): encrypted metadata about the file.key_fingerprint
(string): fingerprint of the key used to encrypt to file.
#
ResponseCode:
JSON Body:
#
Listing the saved files#
RequestCookies:
accesstoken
(opaque token) (ACR >= 2): the identity of the token must be the same than the one in the requesttokentype
: must bebearer
Headers:
X-CSRF-Token
: a token to prevent from CSRF attacks, delivered at the end of the auth flow
Query Parameters:
identity_id
(string) (uuid): a filter to list only files belonging to this identity- Pagination (more info). Default limit is 500.
#
ResponseCode:
JSON Body:
identity_id
(string) (uuid): id of the identity owning the saved file.encrypted_file_id
(string) (uuid): id of the encrypted file.encrypted_metadata
(string): encrypted metadata about the file.key_fingerprint
(string): fingerprint of the key used to encrypt to file.created_at
(string) (iso-8601 date): date of creation server-side
#
Deleting a saved file/!\ This won’t delete the actual file from the storage if it is linked to another entity (a box event for example).
The stored file will be deleted only in the saved file entity is the last one linked to the stored file.
#
RequestCookies:
accesstoken
(opaque token) (ACR >= 2): the identity of the token must be the same than the one in the requesttokentype
: must bebearer
Headers:
X-CSRF-Token
: a token to prevent from CSRF attacks, delivered at the end of the auth flow
Query Parameters:
id
(string) (uuid): id of the saved file to delete.
#
ResponseCode:
#
Count saved files for a user#
RequestCookies:
accesstoken
(opaque token) (ACR >= 2): a valid token.tokentype
: must bebearer
Headers:
X-CSRF-Token
: a token to prevent from CSRF attacks.
Query Parameters:
identity_id
(string) (uuid): a filter to count only files belonging to this identity
#
ResponseCode:
Headers:
X-Total-Count
(integer): the total count of file saved for a given identity_id.
#
Upload directly a file to saved files#
RequestPath Parameters:
id
(uuid string): the identity id.
Cookies:
accesstoken
(opaque token) (ACR >= 2): the identity of the token must be the same than the one in the requesttokentype
: must bebearer
Headers:
X-CSRF-Token
: a token to prevent from CSRF attacks, delivered at the end of the auth flow
Multipart Form Data Body:
encrypted_metadata
(string): encrypted metadata about the file.key_fingerprint
(string): fingerprint of the key used to encrypt to file.
#
ResponseCode:
JSON Body: