You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
215 lines
3.7 KiB
215 lines
3.7 KiB
10 years ago
|
### Minio API
|
||
10 years ago
|
|
||
10 years ago
|
#### General Overview
|
||
10 years ago
|
|
||
10 years ago
|
Minio stores and retrieves data in a logical format based upon REST based URLs.
|
||
10 years ago
|
|
||
10 years ago
|
**Note about examples:**
|
||
10 years ago
|
|
||
|
XML and JSON results have been prettified for readability. As a result, the Content-Length may not match exactly.
|
||
10 years ago
|
```
|
||
|
Form:
|
||
|
http://minio.example.com/{bucket}/{path:.*}
|
||
|
|
||
|
Examples:
|
||
|
http://minio.example.com/bucket/object
|
||
|
http://minio.example.com/bucket/path/to/object
|
||
|
http://minio.example.com/bucket2/path/to/object
|
||
|
```
|
||
|
|
||
10 years ago
|
#### GET /
|
||
10 years ago
|
|
||
10 years ago
|
List buckets accessible by the user.
|
||
|
|
||
10 years ago
|
The default output is XML. JSON output may also be requested by adding the following header:
|
||
|
|
||
|
```
|
||
|
Accept: "application/json"
|
||
|
```
|
||
|
|
||
10 years ago
|
Example:
|
||
|
```
|
||
|
GET / HTTP/1.1
|
||
|
```
|
||
|
```
|
||
|
HTTP/1.1 200 OK
|
||
|
Connection: close
|
||
|
Content-Type: application/xml
|
||
|
Server: Minio
|
||
|
Date: Mon, 02 Feb 2015 22:09:00 GMT
|
||
|
Content-Length: 306
|
||
|
|
||
|
<ListAllMyBucketsResult>
|
||
|
<Owner>
|
||
|
<ID>minio</ID>
|
||
|
<DisplayName>minio</DisplayName>
|
||
|
</Owner>
|
||
|
<Buckets>
|
||
|
<Bucket>
|
||
|
<Name>bucket</Name>
|
||
|
<CreationDate>2015-01-30T15:20:09.013Z</CreationDate>
|
||
|
</Bucket>
|
||
|
<Bucket>
|
||
|
<Name>minio</Name>
|
||
|
<CreationDate>2015-01-27T17:46:28.264Z</CreationDate>
|
||
|
</Bucket>
|
||
|
</Buckets>
|
||
|
</ListAllMyBucketsResult>
|
||
|
```
|
||
|
|
||
10 years ago
|
```
|
||
|
GET / HTTP/1.1
|
||
|
Accept: application/json
|
||
|
```
|
||
|
|
||
|
```
|
||
|
HTTP/1.1 200 OK
|
||
|
Connection: close
|
||
|
Content-Type: application/json
|
||
|
Server: Minio
|
||
|
Date: Wed, 04 Feb 2015 21:59:10 GMT
|
||
|
Content-Length: 223
|
||
|
|
||
|
{
|
||
|
"Owner" : {
|
||
|
"ID" : "minio"
|
||
|
"DisplayName" : "minio",
|
||
|
},
|
||
|
"Buckets" : {
|
||
|
"Bucket" : [
|
||
|
{
|
||
|
"Name" : "bucket",
|
||
|
"CreationDate" : "2015-01-30T15:20:09.013Z"
|
||
|
},
|
||
|
{
|
||
|
"Name" : "minio",
|
||
|
"CreationDate" : "2015-02-02T14:52:34.914Z"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
```
|
||
|
|
||
10 years ago
|
NOTE: ``Accept: application/json`` is Minio Object Server specific
|
||
|
|
||
10 years ago
|
#### GET /{bucket}/
|
||
10 years ago
|
|
||
|
Lists objects in a bucket.
|
||
|
|
||
|
Example:
|
||
|
```
|
||
|
GET /minio/ HTTP/1.1
|
||
|
```
|
||
|
```
|
||
|
HTTP/1.1 200 OK
|
||
|
Connection: close
|
||
|
Content-Type: application/xml
|
||
|
Server: Minio
|
||
10 years ago
|
Date: Tue, 03 Feb 2015 00:57:59 GMT
|
||
|
Content-Length: 579
|
||
10 years ago
|
|
||
|
<ListBucketResult>
|
||
|
<Name>minio</Name>
|
||
|
<Marker/>
|
||
|
<MaxKeys>1000</MaxKeys>
|
||
|
<IsTruncated>false</IsTruncated>
|
||
10 years ago
|
<Contents>
|
||
|
<Key>hello</Key>
|
||
|
<LastModified>2015-02-02T14:52:34.914Z</LastModified>
|
||
|
<ETag>minio#hello</ETag>
|
||
|
<Size>75</Size>
|
||
|
<StorageClass>STANDARD</StorageClass>
|
||
|
<Owner>
|
||
|
<ID>minio</ID>
|
||
|
<DisplayName>minio</DisplayName>
|
||
|
</Owner>
|
||
|
</Contents>
|
||
10 years ago
|
<Contents>
|
||
|
<Key>one</Key>
|
||
|
<LastModified>2015-01-27T17:46:28.264Z</LastModified>
|
||
|
<ETag>minio#one</ETag>
|
||
|
<Size>4096</Size>
|
||
|
<StorageClass>STANDARD</StorageClass>
|
||
|
<Owner>
|
||
|
<ID>minio</ID>
|
||
|
<DisplayName>minio</DisplayName>
|
||
|
</Owner>
|
||
|
</Contents>
|
||
|
</ListBucketResult>
|
||
|
```
|
||
|
|
||
10 years ago
|
#### PUT /{bucket}/
|
||
10 years ago
|
|
||
|
Example:
|
||
|
```
|
||
|
PUT /books/ HTTP/1.1
|
||
|
```
|
||
|
```
|
||
|
HTTP/1.1 200 OK
|
||
|
Connection: close
|
||
|
Server: Minio
|
||
|
Date: Mon, 02 Feb 2015 22:05:43 GMT
|
||
|
Content-Length: 0
|
||
|
Content-Type: text/plain; charset=utf-8
|
||
|
```
|
||
|
|
||
|
EXAMPLE
|
||
10 years ago
|
#### GET /{bucket}/{object}
|
||
10 years ago
|
|
||
|
```
|
||
|
GET /minio/hello HTTP/1.1
|
||
|
```
|
||
|
```
|
||
|
HTTP/1.1 200 OK
|
||
|
Connection: close
|
||
|
Content-Length: 75
|
||
|
Content-Type: text/plain
|
||
|
Etag: minio#hello
|
||
|
Last-Modified: Mon, 02 Feb 2015 14:52:34 PST
|
||
|
Server: Minio
|
||
|
Date: Mon, 02 Feb 2015 22:59:51 GMT
|
||
|
|
||
|
<?xml version="1.0"?>
|
||
|
<html>
|
||
|
<head/>
|
||
|
<body>Hello World!</body>
|
||
|
</html>
|
||
|
```
|
||
|
|
||
|
Retrieves an object from a bucket
|
||
|
|
||
10 years ago
|
#### HEAD /{bucket}/{object}
|
||
10 years ago
|
```
|
||
|
HEAD /minio/hello HTTP/1.1
|
||
|
```
|
||
|
```
|
||
|
HTTP/1.1 200 OK
|
||
|
Connection: close
|
||
|
Content-Length: 75
|
||
|
Content-Type: text/plain
|
||
|
Etag: minio#hello
|
||
|
Last-Modified: Mon, 02 Feb 2015 14:52:34 PST
|
||
|
Server: Minio
|
||
|
Date: Mon, 02 Feb 2015 23:02:30 GMT
|
||
|
```
|
||
10 years ago
|
|
||
10 years ago
|
Retrieves meta-data about an object
|
||
10 years ago
|
|
||
10 years ago
|
#### PUT /{bucket}/{object}
|
||
10 years ago
|
|
||
10 years ago
|
Stores an object
|
||
10 years ago
|
|
||
10 years ago
|
```
|
||
|
PUT /minio/hello HTTP/1.1
|
||
|
Content-Length: 75
|
||
10 years ago
|
|
||
10 years ago
|
<?xml version="1.0"?>
|
||
|
<html>
|
||
|
<head/>
|
||
|
<body>Hello World!</body>
|
||
|
</html>
|
||
|
```
|
||
|
```
|
||
|
HTTP/1.1 200 OK
|
||
|
```
|