Add list objects api (#291)

This includes the basic information of an object
This commit is contained in:
Cesar N
2020-09-29 14:34:51 -07:00
committed by GitHub
parent 8313a62f17
commit 7afd608faa
13 changed files with 1176 additions and 7 deletions

View File

@@ -341,6 +341,47 @@ func init() {
}
}
},
"/buckets/{bucket_name}/objects": {
"get": {
"tags": [
"UserAPI"
],
"summary": "List Objects",
"operationId": "ListObjects",
"parameters": [
{
"type": "string",
"name": "bucket_name",
"in": "path",
"required": true
},
{
"type": "string",
"name": "prefix",
"in": "query"
},
{
"type": "boolean",
"name": "recursive",
"in": "query"
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/listObjectsResponse"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/buckets/{bucket_name}/replication": {
"get": {
"tags": [
@@ -2413,6 +2454,24 @@ func init() {
}
}
},
"bucketObject": {
"type": "object",
"properties": {
"content_type": {
"type": "string"
},
"last_modified": {
"type": "string"
},
"name": {
"type": "string"
},
"size": {
"type": "integer",
"format": "int64"
}
}
},
"bucketReplicationDestination": {
"type": "object",
"properties": {
@@ -2978,6 +3037,23 @@ func init() {
}
}
},
"listObjectsResponse": {
"type": "object",
"properties": {
"objects": {
"type": "array",
"title": "list of resulting objects",
"items": {
"$ref": "#/definitions/bucketObject"
}
},
"total": {
"type": "integer",
"format": "int64",
"title": "number of objects"
}
}
},
"listPoliciesResponse": {
"type": "object",
"properties": {
@@ -4505,6 +4581,47 @@ func init() {
}
}
},
"/buckets/{bucket_name}/objects": {
"get": {
"tags": [
"UserAPI"
],
"summary": "List Objects",
"operationId": "ListObjects",
"parameters": [
{
"type": "string",
"name": "bucket_name",
"in": "path",
"required": true
},
{
"type": "string",
"name": "prefix",
"in": "query"
},
{
"type": "boolean",
"name": "recursive",
"in": "query"
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/listObjectsResponse"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/buckets/{bucket_name}/replication": {
"get": {
"tags": [
@@ -7100,6 +7217,24 @@ func init() {
}
}
},
"bucketObject": {
"type": "object",
"properties": {
"content_type": {
"type": "string"
},
"last_modified": {
"type": "string"
},
"name": {
"type": "string"
},
"size": {
"type": "integer",
"format": "int64"
}
}
},
"bucketReplicationDestination": {
"type": "object",
"properties": {
@@ -7665,6 +7800,23 @@ func init() {
}
}
},
"listObjectsResponse": {
"type": "object",
"properties": {
"objects": {
"type": "array",
"title": "list of resulting objects",
"items": {
"$ref": "#/definitions/bucketObject"
}
},
"total": {
"type": "integer",
"format": "int64",
"title": "number of objects"
}
}
},
"listPoliciesResponse": {
"type": "object",
"properties": {