# Quota Controller Resource

### GET /quotas

Returns list of quotas filtered by specified query parameters.

Request Parameters
name | type | description | constraints
--- | --- | --- | ---
active | query |  | boolean
direction | query |  |
filter | query |  |
hypervisor-manager | query |  |
nameLike | query |  |
orderBy | query |  |
page | query |  |
size | query |  |

Response Body
media type | data type | description
--- | --- | ---
application/json | array of QuotaListRecord (JSON) | list of quotas filtered by specified query parameters

#### Example

##### Request

    GET /quotas
    Content-Type: */*
    Accept: application/json

    ...

##### Response

    HTTP/1.1 200 OK
    Content-Type: application/json

    [ { } ]

### POST /quotas

Create quota

Request Body
media type | data type | description
--- | --- | ---
application/json | QuotaRequest (JSON) | specify details for new quota

Response Body
media type | data type | description
--- | --- | ---
application/json | QuotaDetails (JSON) | details for newly created quota

#### Example

##### Request

    POST /quotas
    Content-Type: application/json
    Accept: application/json

    { }

##### Response

    HTTP/1.1 201 Created
    Content-Type: application/json

    { }

### GET /quotas/detailed

Returns list of detailed quotas filtered by specified query parameters.

Request Parameters
name | type | description | constraints
--- | --- | --- | ---
active | query |  | boolean
direction | query |  |
filter | query |  |
hypervisor-manager | query |  |
nameLike | query |  |
orderBy | query |  |
page | query |  |
size | query |  |

Response Body
media type | data type | description
--- | --- | ---
application/json | array of QuotaDetails (JSON) | list of quotas filtered by specified query parameters

#### Example

##### Request

    GET /quotas/detailed
    Content-Type: */*
    Accept: application/json

    ...

##### Response

    HTTP/1.1 200 OK
    Content-Type: application/json

    [ { } ]

### DELETE /quotas/{guid}

Remove quota

Request Parameters
name | type | description
--- | --- | ---
guid | path | specify local unique identifier for quota (use by vProtect)

#### Example

##### Request

    DELETE /quotas/{guid}
    Content-Type: */*

    ...

##### Response

    HTTP/1.1 204 No Content

### GET /quotas/{guid}

Get a single quota

Request Parameters
name | type | description
--- | --- | ---
guid | path | specify local unique identifier for quota (use by vProtect)

Response Body
media type | data type | description
--- | --- | ---
application/json | QuotaDetails (JSON) | quota details

#### Example

##### Request

    GET /quotas/{guid}
    Content-Type: */*
    Accept: application/json

    ...

##### Response

    HTTP/1.1 200 OK
    Content-Type: application/json

    { }

### PUT /quotas/{guid}

Change quota details.

Request Parameters
name | type | description
--- | --- | ---
guid | path | specify local unique identifier for quota (use by vProtect)

Request Body
media type | data type | description
--- | --- | ---
application/json | QuotaRequest (JSON) | specify quota details to update

Response Body
media type | data type | description
--- | --- | ---
application/json | QuotaDetails (JSON) | updated details for quota

#### Example

##### Request

    PUT /quotas/{guid}
    Content-Type: application/json
    Accept: application/json

    { }

##### Response

    HTTP/1.1 204 No Content
    Content-Type: application/json

    { }

### POST /quotas/{guid}/clone

Clone quota

Request Parameters
name | type | description
--- | --- | ---
guid | path | specify local unique identifier for quota (use by vProtect)
name | query |

Response Body
media type | data type | description
--- | --- | ---
application/json | QuotaDetails (JSON) | details for newly created quota

#### Example

##### Request

    POST /quotas/{guid}/clone
    Content-Type: application/json
    Accept: application/json

    ...

##### Response

    HTTP/1.1 201 Created
    Content-Type: application/json

    { }