Merge pull request #120 from fkautz/pr_out_adding_minio_api_documentation

master
Frederick F. Kautz IV 10 years ago
commit 41688e491c
  1. 158
      docs/docs/api/minio.md

@ -1,14 +1,162 @@
# Minio API
## General Overview
Minio stores and retrieves data in a logical format based upon REST
based URLs.
```
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
```
## /
## GET /bucket/
List buckets accessible by the user.
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>
```
## GET /{bucket}/
Lists objects in a bucket.
Example:
```
GET /minio/ HTTP/1.1
```
```
HTTP/1.1 200 OK
Connection: close
Content-Type: application/xml
Server: Minio
Date: Mon, 02 Feb 2015 22:07:20 GMT
Content-Length: 352
<?xml version="1.0"?>
<ListBucketResult>
<Name>minio</Name>
<Marker/>
<MaxKeys>1000</MaxKeys>
<IsTruncated>false</IsTruncated>
<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>
```
## PUT /{bucket}/
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
## GET /{bucket}/{object}
```
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
## HEAD /{bucket}/{object}
```
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
```
## PUT /bucket/
Retrieves meta-data about an object
## GET /bucket/object
## PUT /{bucket}/{object}
## HEAD /bucket/object
Stores an object
## PUT /bucket/object
```
PUT /minio/hello HTTP/1.1
Content-Length: 75
<?xml version="1.0"?>
<html>
<head/>
<body>Hello World!</body>
</html>
```
```
HTTP/1.1 200 OK
```

Loading…
Cancel
Save