GET service ostor-quotas

Description

Lists information about quotas on storage usage for the specified user/bucket or for all users/buckets.

Requests

Syntax

GET /?ostor-quotas&emailAddress=<value> HTTP/1.1
Host: <host>
Date: <date>
Authorization: <authorization_string>
GET /?ostor-quotas&bucket=<value> HTTP/1.1
Host: <host>
Date: <date>
Authorization: <authorization_string>
GET /?ostor-quotas&default=<value> HTTP/1.1
Host: <host>
Date: <date>
Authorization: <authorization_string>

Parameters

GET service ostor-limits parameters

Parameter Description Required
emailAddress

User email address.

Type: string.

Default value: none.

Yes*

id

User ID.

Type: string.

Default value: none.

Yes*
bucket

Bucket name.

Type: string.

Default value: none.

Yes*
default

Shows the default value for quotas. If set to user, shows the default quotas for all users. If set to bucket, shows the default quotas for all buckets.

Type: string.

Default value: none.

No

* Only one of the required parameters can be set in a single request.

Headers

This implementation uses only common request headers.

Responses

Headers

This implementation uses only common response headers.

Body

A JSON dictionary with information about limits for a user or bucket in the following format:

{
"version" : "<quota_version>",
"type" : "{0|1}",
"size" : "<usage_limit_value_in_bytes>"
}

For the type parameter, 0 means "user" and 1 means "bucket".

For the size parameter, zero value means “unlimited”.

Errors

Returns Error Code 400 if multiple parameters are set at once.

Examples

Sample request #1

Returns information about quotas for the user with the email user1@email.com.

GET /?ostor-quotas&emailAddress=user1@email.com HTTP/1.1
Host: s3.example.com
Date: Thu, 09 Sep 2021 20:53:41 GMT
Authorization: <authorization_string>

Sample response #1

HTTP/1.1 200 OK
Transfer-encoding : chunked
Server : nginx/1.8.1
Connection: closed
x-amz-request-id : 80000000000000030005c8caec96d65b
Date : Thu, 09 Sep 2021 20:53:46 GMT
Content-type : application/json
{
"version" : "1",
"type" : "0",
"size" : "1024"
}

Sample request #2

Returns information about quotas for the bucket bucket1.

GET /?ostor-quotas&bucket=bucket1 HTTP/1.1
Host: s3.example.com
Date: Thu, 09 Sep 2021 20:54:34 GMT
Authorization: <authorization_string>

Sample response #2

HTTP/1.1 200 OK
Transfer-encoding : chunked
Server : nginx/1.8.1
Connection : closed
x-amz-request-id : 80000000000000030003c6b538eedd95
Date: Thu, 09 Sep 2021 20:54:37 GMT
Content-type : application/json
{
"version" : "1",
"type" : "1",
"size" : "256"
}

Sample request #3

Returns information about the default user quotas.

GET /?ostor-quotas&default=user HTTP/1.1
Host: s3.example.com
Date: Thu, 09 Sep 2021 20:57:48 GMT
Authorization: <authorization_string>

Sample response #3

HTTP/1.1 200 OK
Transfer-encoding : chunked
Server : nginx/1.8.1
Connection: closed
x-amz-request-id : 80000000000000030005c8caec96d65b
Date : Thu, 09 Sep 2021 20:57:51 GMT
Content-type : application/json
{
"version" : "1",
"type" : "0",
"size" : "1024"
}

Sample request #4

Returns information about the default bucket quotas.

GET /?ostor-quotas&default=bucket HTTP/1.1
Host: s3.example.com
Date: Thu, 09 Sep 2021 20:58:05 GMT
Authorization: <authorization_string>

Sample response #4

HTTP/1.1 200 OK
Transfer-encoding : chunked
Server : nginx/1.8.1
Connection : closed
x-amz-request-id : 80000000000000030003c6b538eedd95
Date: Thu, 09 Sep 2021 20:58:09 GMT
Content-type : application/json
{
"version" : "1",
"type" : "1",
"size" : "256"
}