Quota rules

Vidispine can monitor the disk usage and the number of items that exist in the system, and send a notification if the usage exceeds certain user defined limits. A quota rule is used to define the limits that apply for a certain set of resources - items and files.

Managing quota rules

Create a quota rule

POST /quota/

Creates a quota rule with the filters and resource limits as specified in the quota rule document.

Accepts:
Produces:
Role:

_quota_write

Example

Limit user stephen to 1000 items and 10000000 bytes of storage on VX-1:

POST /quota
Content-Type: application/xml

<QuotaRuleDocument xmlns="http://xml.vidispine.com/schema/vidispine">
  <user>stephen</user>
  <storage>VX-1</storage>
  <resource>
    <name>item</name>
    <limit>1000</limit>
  </resource>
  <resource>
    <name>storage</name>
    <limit>10000000</limit>
  </resource>
</QuotaRuleDocument>
<QuotaRuleDocument xmlns="http://xml.vidispine.com/schema/vidispine">
  <id>VX-255</id>
  <user>stephen</user>
  <storage>VX-1</storage>
  <resource>
    <name>item</name>
    <limit>1000</limit>
    <usage>2</usage>
  </resource>
  <resource>
    <name>storage</name>
    <limit>10000000</limit>
    <usage>1266704</usage>
  </resource>
</QuotaRuleDocument>

List all quota rules

GET /quota/

Returns the quota rules that exist in the system.

Query Parameters:
  • content (string) – Comma-separated list of addition content to retrieve. Valid values are: external.
  • filter (string) – Comma-separated list of key-value pairs (in the format key=value) that can be used to filter the result set. Valid key values are: user, group, storage, storageGroup, collection, library and tag.
  • exceeded (boolean) –
    • true - Returns only rules where the usage of a resource exceeds the limit that has been specified for a rule.
    • false (default) - Returns rules regardless of the current resource usage.
Produces:
Role:

_quota_read

Example

GET /quota
<QuotaRuleListDocument xmlns="http://xml.vidispine.com/schema/vidispine">
  <rule>
    <id>VX-255</id>
    <user>stephen</user>
    <storage>VX-1</storage>
    <resource>
      <name>item</name>
      <limit>1000</limit>
      <usage>2</usage>
    </resource>
    <resource>
      <name>storage</name>
      <limit>10000000</limit>
      <usage>1266704</usage>
    </resource>
  </rule>
</QuotaRuleListDocument>

Retrieve a quota rule

GET /quota/(rule-id)

Retrieves a specific quota rule.

Produces:
Role:

_quota_read

Evaluate a quota rule

PUT /quota/(rule-id)/evaluate

Immediately calculates the resource usage as defined by a quota rule.

Role:_quota_write

Delete a quota rule

DELETE /quota/(rule-id)

Deletes the quota rule.

Role:_quota_write