Adding JSON Example for GET /

master
Frederick F. Kautz IV 10 years ago
parent 2a6128a0b8
commit f1bf2cb5d7
  1. 42
      docs/docs/api/minio.md

@ -5,6 +5,9 @@
Minio stores and retrieves data in a logical format based upon REST Minio stores and retrieves data in a logical format based upon REST
based URLs. based URLs.
### Note about examples:
XML and JSON results have been prettified for readability. As a result, the Content-Length may not match exactly.
``` ```
Form: Form:
http://minio.example.com/{bucket}/{path:.*} http://minio.example.com/{bucket}/{path:.*}
@ -19,6 +22,12 @@ http://minio.example.com/bucket2/path/to/object
List buckets accessible by the user. List buckets accessible by the user.
The default output is XML. JSON output may also be requested by adding the following header:
```
Accept: "application/json"
```
Example: Example:
``` ```
GET / HTTP/1.1 GET / HTTP/1.1
@ -49,6 +58,39 @@ Content-Length: 306
</ListAllMyBucketsResult> </ListAllMyBucketsResult>
``` ```
```
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"
}
]
}
}
```
## GET /{bucket}/ ## GET /{bucket}/
Lists objects in a bucket. Lists objects in a bucket.

Loading…
Cancel
Save