Methods for Quotas

Set and clear quotas and check on quota statuses using the Content Management API in addition to specifying quota policies directly in the Content Portal:

See https://perifery.atlassian.net/wiki/spaces/public/pages/2443818631 and https://perifery.atlassian.net/wiki/spaces/public/pages/2443817185.

Legend:

  • {M} = metric name, one of “bandwidth”, “rawstorage”, “storage”

  • {T} = tenant name

  • {D} = domain name

  • {B} = bucket name

Method and Suffix

Query Arguments

Policy Action

Notes

Method and Suffix

Query Arguments

Policy Action

Notes

PUT /_admin/manage/tenants/{T}/

  • quota/{M}/limit

  • domains/{D}/quota/{M}/limit

  • domains/{D}/buckets/{B}/quota/{M}/limit

limit={integer}{KB|MB|GB|TB}

state={ok|notify|nowrite|read|lock}

None removes current values

 PutQuota

Sets or clears a limit and state. If this results in a state change, then email notifications are sent.
*Not applicable to the System domain

Affected headers:

  • x-caringo-meta-quota-{M}-limit 

  • x-caringo-meta-quota-{M}-current

PUT /_admin/manage/tenants/{T}/

  • quota/{M}/override

  • domains/{D}/quota/{M}/override

  • domains/{D}/buckets/{B}/quota/{M}/override

duration={number}{s|m|d|w}

deadline={timestamp}

statduration={ok|notify|nowrite|read|lock}

None removes current values

 PutQuota 

Sets or clears an override. If this results in a state change, then email notifications are send.

Duration is a number plus a unit suffix for seconds, minutes, days, or weeks.

Deadline is a timestamp in ISO 8601 format, such as 2016-07-01T00:00:00Z, which specifies when the override expires.
*Not applicable to the System domain

Affected headers:

  • x-caringo-meta-quota-{M}-override

PUT /_admin/manage/tenants/{T}/

  • quota/email

  • domains/{D}/quota/email

  • domains/{D}/buckets/{B}/quota/email

addresses={email}[,{email},...]

None removes current values

PutQuota 

Sets or clears one or more email recipients for quota notifications.

Updates the header on the context object, where multiple email addresses are collapsed into a single comma-separated list. The list is always replaced as a whole.
*Not applicable to the System domain

Affected headers:

  • x-caringo-meta-quota-email 

HEAD /_admin/manage/tenants/{T}/

  • quota/{M}

  • domains/{D}/quota/{M}

  • domains/{D}/buckets/{B}/quota/{M}

  • quota/*

  • domains/{D}/quota/*

  • domains/{D}/buckets/{B}/quota/*

-

GetQuota 

Retrieves quota information for a single metric or all (*) metrics of a specific context (tenant, domain, bucket). 

If a metric {M} has no limit or override configured, then the corresponding current/limit/override headers are not present in the response. If the context has no quota config for any metric, no quota headers are returned.
*Not applicable to the System domain

Affected headers:

  • x-caringo-meta-quota-{M}-current = {computed state}; {actual usage}; {timestamp}

  • x-caringo-meta-quota-{M}-limit = {state}; {limit}

  • x-caringo-meta-quota-{M}-override = {state}; {user}; {deadline}

  • x-caringo-meta-quota-{M}-refreshdelay = {milliseconds}

  • x-caringo-meta-quota-email = {comma-separated-list}

HEAD /_admin/manage/tenants/{T}/

  • quota/check

  • domains/{D}/quota/check

  • domains/{D}/buckets/{B}/quota/check

-

GetQuota 

Performs a quota status check, which takes into account parent/child context relationships and overrides.
*Not applicable to the System domain

Affected headers:

  • x-caringo-meta-quota-metric

  • x-caringo-meta-quota-context-type

  • x-caringo-meta-quota-context-name

  • x-caringo-meta-quota-type

  • x-caringo-meta-quota-state

  • x-caringo-meta-quota-message

GET /_admin/manage/quota/status

-

ListDomain 

Performs a check whether the quota feature is enabled.
*Not applicable to the System domain

Returns JSON body {“enabled”:true}

GET /_admin/manage/tenants/{T}/

  • domains/{D}/meter/usage/bytesIn

  • domains/{D}/meter/usage/bytesOut

from={timestamp}

to={timestamp}



Retrieves the current bandwidth usage between a date range. The bandwidth metric is a special case; it is reset at the beginning of each month. The corresponding Elasticsearch queries must adapt the from/to interval to take this into account.

Each argument is a timestamp in ISO 8601 format, such as 2016-07-01T00:00:00Z.

GET /_admin/manage/tenants/{T}/

  • meter/usage/bytesSize/current

  • domains/{D}/meter/usage/bytesSize/current

  • domains/{D}/buckets/{B}/meter/usage/bytesSize/current

  • meter/usage/bytesStored/current

  • domains/{D}/meter/usage/bytesStored/current

  • domains/{D}/buckets/{B}/meter/usage/bytesStored/current

-



Retrieves the current logical or raw storage through a point-in-time query.

 

© DataCore Software Corporation. · https://www.datacore.com · All rights reserved.