From f1bf2cb5d782162404456e3a0844c8ccfd69272d Mon Sep 17 00:00:00 2001 From: "Frederick F. Kautz IV" Date: Wed, 4 Feb 2015 14:04:41 -0800 Subject: [PATCH] Adding JSON Example for GET / --- docs/docs/api/minio.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/docs/docs/api/minio.md b/docs/docs/api/minio.md index d807b8780..df07feb26 100644 --- a/docs/docs/api/minio.md +++ b/docs/docs/api/minio.md @@ -5,6 +5,9 @@ Minio stores and retrieves data in a logical format based upon REST 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: http://minio.example.com/{bucket}/{path:.*} @@ -19,6 +22,12 @@ http://minio.example.com/bucket2/path/to/object 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: ``` GET / HTTP/1.1 @@ -49,6 +58,39 @@ Content-Length: 306 ``` +``` +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}/ Lists objects in a bucket.