Skip to content

Quota

Quotas only apply to resources (i.e. uploaded files), but not for metadata and metametadata. I.e. there is no restriction in the amount of links that can be created.

Configuration of default settings

By default quotas are turned off. Quotas are activated and the default quota is configured through entrystore.properties. The possible settings are:

entrystore.data.quota=on|off
entrystore.data.quota.default=bytes[unit]

Possible values for the unit in the default setting are k, m, g and t (for kilo, mega, giga and tera bytes respectively). The unit is optional, if omitted bytes are used. The default quota is used for portfolios where no specific quota has been configured.

A value of -1 means unlimited quota.

Complementary to the quota settings above, a maximum file size for resources can be specified. This setting can be configured independently from the quota settings. I.e., even if quota is off, the following setting is respected:

entrystore.data.max-file-size=bytes[unit]

Quota per context

Quota information is accessed and modified through the Context's quota resource at http://base/store/context-id/quota.

The JSON object returned on GET requests holds 3 values:

Request

GET http://{base}/{context-id}/quota

Response

{
  "quota": 2097152,
  "fillLevel": 141328,
  "hasDefaultQuota": false
}

If the installation does not have quota support enabled a HTTP status 501 (not implemented) is returned.

Admin users can set the quota by doing a PUT on the Context's quota resource. The only value that can be set is "quota" in bytes:

Request

PUT http://{base}/{context-id}/quota

Request body

{ "quota": 2048 }

Quota information can also be requested using GET on the context's entry URI, e.g. GET http://base/store/_contexts/entry/1. The information is returned inside the quota object.

{
  "quota": {
    "quota": 2097152,
    "fillLevel": 141328,
    "hasDefaultQuota": false
  },
  "alias": "Some Portfolio",
  ...
}

The quota-specific parameters are quota, fillLevel and hasDefaultQuota.

All GET requests contain the parameter fillLevel which holds information about how many bytes have been used so far by that portfolio. This value cannot be set or overridden. The quota parameter can be set in PUT requests to context's resource URI (similar to setting the alias of a portfolio), but only by the admin users or users in the admin group.

Restoring default quota

The default quota can be restored by making a DELETE request on the context's quota resource, this removes the manual quota setting on the context.

HTTP behaviour when quotas are exceeded

The quota check is only performed upon creation or replacement of a binary resource. If the quota is exceeded, the response to the modifying HTTP request has a status 413 (Request Entity Too Large). The uploaded resource is not stored in the system.