Skip to main content

Storage quota

Concept#

Storage quota are used to compute already used storage and max autorized storage for a user.

The shape and rules for storage objects are described here.

Get storage quota#

This route is used to retrieve all the storage_quotum object associated to an identity

Request#

GET https://api.misakey.com/box-users/:id/storage-quota

Cookies:

  • accesstoken (opaque token) (ACR >= 1): mid claim as the identity id.
  • tokentype: must be bearer

Headers:

  • X-CSRF-Token: a token to prevent from CSRF attacks.

Path Parameters:

  • id (uuid string): the identity id.

Response#

Code:

HTTP 200 OK
[
{
"id": "e989f6fd-7b01-4e1b-b05b-5ad41bc71af3",
"origin": "base",
"identity_id": "b88d88e2-b99c-40d6-bcaa-6efc91d00bfd",
"value": 104857600
}
]

Get current user storage use#

This route is used to retrieve all the box_used_space object associated to an identity

Request#

POST https://api.misakey.com/box-used-spaces?&identity_id=

Cookies:

  • accesstoken (opaque token) (ACR >= 1): mid claim as the identity id.
  • tokentype: must be bearer

Headers:

  • X-CSRF-Token: a token to prevent from CSRF attacks.

Query Parameters:

  • identity_id (uuid string): the identity id.

Response#

Code:

HTTP 200 OK
[
{
"box_id": "e989f6fd-7b01-4e1b-b05b-5ad41bc71af3",
"value": 16475271
}
]

Get vault used space#

This route is used to retrieve the vault used space linked to an identity.

Request#

POST https://api.misakey.com/box-users/:id/vault-used-space

Cookies:

  • accesstoken (opaque token) (ACR >= 1): mid claim as the identity id.
  • tokentype: must be bearer

Headers:

  • X-CSRF-Token: a token to prevent from CSRF attacks.

Path Parameters:

  • id (uuid string): the identity id.

Response#

Code:

HTTP 200 OK
{
"value": 5271
}