Files
object-browser/restapi/embedded_spec.go
Lenin Alevski 161941d544 Profiling endpoints for mcs (#1)
start and stop profiling endpoints, test includes and many fixes for
policies

deleting duplicated file
2020-04-02 09:57:59 -07:00

2800 lines
62 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2020 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package restapi
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"encoding/json"
)
var (
// SwaggerJSON embedded version of the swagger document used at generation time
SwaggerJSON json.RawMessage
// FlatSwaggerJSON embedded flattened version of the swagger document used at generation time
FlatSwaggerJSON json.RawMessage
)
func init() {
SwaggerJSON = json.RawMessage([]byte(`{
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"schemes": [
"http"
],
"swagger": "2.0",
"info": {
"title": "MinIO Console Server",
"version": "0.1.0"
},
"paths": {
"/api/v1/buckets": {
"get": {
"tags": [
"UserAPI"
],
"summary": "List Buckets",
"operationId": "ListBuckets",
"parameters": [
{
"type": "string",
"name": "sort_by",
"in": "query"
},
{
"type": "integer",
"format": "int32",
"name": "offset",
"in": "query"
},
{
"type": "integer",
"format": "int32",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/listBucketsResponse"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"post": {
"tags": [
"UserAPI"
],
"summary": "Make bucket",
"operationId": "MakeBucket",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/makeBucketRequest"
}
}
],
"responses": {
"201": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/buckets/{bucket_name}/events": {
"get": {
"tags": [
"UserAPI"
],
"summary": "List Bucket Events",
"operationId": "ListBucketEvents",
"parameters": [
{
"type": "string",
"name": "bucket_name",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int32",
"name": "offset",
"in": "query"
},
{
"type": "integer",
"format": "int32",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/listBucketEventsResponse"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/buckets/{name}": {
"get": {
"tags": [
"UserAPI"
],
"summary": "Bucket Info",
"operationId": "BucketInfo",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/bucket"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"delete": {
"tags": [
"UserAPI"
],
"summary": "Delete Bucket",
"operationId": "DeleteBucket",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/buckets/{name}/set-policy": {
"put": {
"tags": [
"UserAPI"
],
"summary": "Bucket Set Policy",
"operationId": "BucketSetPolicy",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/setBucketPolicyRequest"
}
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/bucket"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/configs": {
"get": {
"tags": [
"AdminAPI"
],
"summary": "List Configurations",
"operationId": "ListConfig",
"parameters": [
{
"type": "integer",
"format": "int32",
"name": "offset",
"in": "query"
},
{
"type": "integer",
"format": "int32",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/listConfigResponse"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/configs/{name}": {
"get": {
"tags": [
"AdminAPI"
],
"summary": "Configuration info",
"operationId": "ConfigInfo",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/configuration"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"put": {
"tags": [
"AdminAPI"
],
"summary": "Set Configuration",
"operationId": "SetConfig",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/setConfigRequest"
}
}
],
"responses": {
"204": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/groups": {
"get": {
"tags": [
"AdminAPI"
],
"summary": "List Groups",
"operationId": "ListGroups",
"parameters": [
{
"type": "integer",
"format": "int32",
"name": "offset",
"in": "query"
},
{
"type": "integer",
"format": "int32",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/listGroupsResponse"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"post": {
"tags": [
"AdminAPI"
],
"summary": "Add Group",
"operationId": "AddGroup",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/addGroupRequest"
}
}
],
"responses": {
"201": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/groups/{name}": {
"get": {
"tags": [
"AdminAPI"
],
"summary": "Group info",
"operationId": "GroupInfo",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/group"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"put": {
"tags": [
"AdminAPI"
],
"summary": "Update Group Members or Status",
"operationId": "UpdateGroup",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/updateGroupRequest"
}
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/group"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"delete": {
"tags": [
"AdminAPI"
],
"summary": "Remove group",
"operationId": "RemoveGroup",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/login": {
"get": {
"security": [],
"tags": [
"UserAPI"
],
"summary": "Returns login strategy, form or sso.",
"operationId": "LoginDetail",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/loginDetails"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"post": {
"security": [],
"tags": [
"UserAPI"
],
"summary": "Login to mcs",
"operationId": "Login",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loginRequest"
}
}
],
"responses": {
"201": {
"description": "A successful login.",
"schema": {
"$ref": "#/definitions/loginResponse"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/policies": {
"get": {
"tags": [
"AdminAPI"
],
"summary": "List Policies",
"operationId": "ListPolicies",
"parameters": [
{
"type": "integer",
"format": "int32",
"name": "offset",
"in": "query"
},
{
"type": "integer",
"format": "int32",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/listPoliciesResponse"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"post": {
"tags": [
"AdminAPI"
],
"summary": "Add Policy",
"operationId": "AddPolicy",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/addPolicyRequest"
}
}
],
"responses": {
"201": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/policy"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/policies/{name}": {
"get": {
"tags": [
"AdminAPI"
],
"summary": "Policy info",
"operationId": "PolicyInfo",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/policy"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"delete": {
"tags": [
"AdminAPI"
],
"summary": "Remove policy",
"operationId": "RemovePolicy",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/profiling/start": {
"post": {
"tags": [
"AdminAPI"
],
"summary": "Start recording profile data",
"operationId": "ProfilingStart",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/profilingStartRequest"
}
}
],
"responses": {
"201": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/startProfilingList"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/profiling/stop": {
"post": {
"produces": [
"application/octet-stream"
],
"tags": [
"AdminAPI"
],
"summary": "Stop and download profile data",
"operationId": "ProfilingStop",
"responses": {
"201": {
"description": "A successful response.",
"schema": {
"type": "file"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/service/restart": {
"post": {
"tags": [
"AdminAPI"
],
"summary": "Restart Service",
"operationId": "RestartService",
"responses": {
"204": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/set-policy/{name}": {
"put": {
"tags": [
"AdminAPI"
],
"summary": "Set policy",
"operationId": "SetPolicy",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/setPolicyRequest"
}
}
],
"responses": {
"204": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/users": {
"get": {
"tags": [
"AdminAPI"
],
"summary": "List Users",
"operationId": "ListUsers",
"parameters": [
{
"type": "integer",
"format": "int32",
"name": "offset",
"in": "query"
},
{
"type": "integer",
"format": "int32",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/listUsersResponse"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"post": {
"tags": [
"AdminAPI"
],
"summary": "Add User",
"operationId": "AddUser",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/addUserRequest"
}
}
],
"responses": {
"201": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/user"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
}
},
"definitions": {
"addGroupRequest": {
"type": "object",
"required": [
"group",
"members"
],
"properties": {
"group": {
"type": "string"
},
"members": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"addPolicyRequest": {
"type": "object",
"required": [
"name"
],
"properties": {
"definition": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"addUserRequest": {
"type": "object",
"required": [
"accessKey",
"secretKey"
],
"properties": {
"accessKey": {
"type": "string"
},
"secretKey": {
"type": "string"
}
}
},
"bucket": {
"type": "object",
"required": [
"name"
],
"properties": {
"access": {
"$ref": "#/definitions/bucketAccess"
},
"creation_date": {
"type": "string"
},
"name": {
"type": "string",
"minLength": 3
},
"size": {
"type": "integer",
"format": "int64"
}
}
},
"bucketAccess": {
"type": "string",
"default": "PRIVATE",
"enum": [
"PRIVATE",
"PUBLIC",
"CUSTOM"
]
},
"configDescription": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"key": {
"type": "string"
}
}
},
"configuration": {
"type": "object",
"properties": {
"key_values": {
"type": "array",
"items": {
"$ref": "#/definitions/configurationKV"
}
},
"name": {
"type": "string"
}
}
},
"configurationKV": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"error": {
"type": "object",
"required": [
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int64"
},
"message": {
"type": "string"
}
}
},
"group": {
"type": "object",
"properties": {
"members": {
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": "string"
},
"policy": {
"type": "string"
},
"status": {
"type": "string"
}
}
},
"listBucketEventsResponse": {
"type": "object",
"properties": {
"events": {
"type": "array",
"items": {
"$ref": "#/definitions/notificationConfig"
}
},
"total": {
"type": "integer",
"format": "int64",
"title": "total number of bucket events"
}
}
},
"listBucketsResponse": {
"type": "object",
"properties": {
"buckets": {
"type": "array",
"title": "list of resulting buckets",
"items": {
"$ref": "#/definitions/bucket"
}
},
"total": {
"type": "integer",
"format": "int64",
"title": "number of buckets accessible to tenant user"
}
}
},
"listConfigResponse": {
"type": "object",
"properties": {
"configurations": {
"type": "array",
"items": {
"$ref": "#/definitions/configDescription"
}
},
"total": {
"type": "integer",
"format": "int64",
"title": "total number of configurations"
}
}
},
"listGroupsResponse": {
"type": "object",
"properties": {
"groups": {
"type": "array",
"title": "list of groups",
"items": {
"type": "string"
}
},
"total": {
"type": "integer",
"format": "int64",
"title": "total number of groups"
}
}
},
"listPoliciesResponse": {
"type": "object",
"properties": {
"policies": {
"type": "array",
"title": "list of policies",
"items": {
"$ref": "#/definitions/policy"
}
},
"total": {
"type": "integer",
"format": "int64",
"title": "total number of policies"
}
}
},
"listUsersResponse": {
"type": "object",
"properties": {
"users": {
"type": "array",
"title": "list of resulting users",
"items": {
"$ref": "#/definitions/user"
}
}
}
},
"loginDetails": {
"type": "object",
"properties": {
"loginStrategy": {
"type": "string",
"enum": [
"form",
"redirect"
]
},
"redirect": {
"type": "string"
}
}
},
"loginRequest": {
"type": "object",
"required": [
"accessKey",
"secretKey"
],
"properties": {
"accessKey": {
"type": "string"
},
"secretKey": {
"type": "string"
}
}
},
"loginResponse": {
"type": "object",
"properties": {
"sessionId": {
"type": "string"
}
}
},
"makeBucketRequest": {
"type": "object",
"required": [
"name"
],
"properties": {
"access": {
"$ref": "#/definitions/bucketAccess"
},
"name": {
"type": "string"
}
}
},
"notificationConfig": {
"type": "object",
"properties": {
"arn": {
"type": "string"
},
"events": {
"type": "array",
"title": "filter specific type of event. Defaults to all event (default: '[put,delete,get]')",
"items": {
"$ref": "#/definitions/notificationEventType"
}
},
"id": {
"type": "string"
},
"prefix": {
"type": "string",
"title": "filter event associated to the specified prefix"
},
"suffix": {
"type": "string",
"title": "filter event associated to the specified suffix"
}
}
},
"notificationEventType": {
"type": "string",
"enum": [
"put",
"delete",
"get"
]
},
"policy": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"statements": {
"type": "array",
"items": {
"$ref": "#/definitions/statement"
}
},
"version": {
"type": "string"
}
}
},
"policyEntity": {
"type": "string",
"default": "user",
"enum": [
"user",
"group"
]
},
"principal": {
"type": "string"
},
"profilerType": {
"type": "string",
"enum": [
"cpu",
"mem",
"block",
"mutex",
"trace",
"threads",
"goroutines"
]
},
"profilingStartRequest": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"$ref": "#/definitions/profilerType"
}
}
},
"setBucketPolicyRequest": {
"type": "object",
"required": [
"access"
],
"properties": {
"access": {
"$ref": "#/definitions/bucketAccess"
}
}
},
"setConfigRequest": {
"type": "object",
"required": [
"key_values"
],
"properties": {
"arn_resource_id": {
"type": "string",
"title": "Used if configuration is an event notification's target"
},
"key_values": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/configurationKV"
}
}
}
},
"setPolicyRequest": {
"type": "object",
"required": [
"entityType",
"entityName"
],
"properties": {
"entityName": {
"type": "string"
},
"entityType": {
"$ref": "#/definitions/policyEntity"
}
}
},
"startProfilingItem": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"nodeName": {
"type": "string"
},
"success": {
"type": "boolean"
}
}
},
"startProfilingList": {
"type": "object",
"properties": {
"startResults": {
"type": "array",
"items": {
"$ref": "#/definitions/startProfilingItem"
}
},
"total": {
"type": "integer",
"format": "int64",
"title": "number of start results"
}
}
},
"statement": {
"type": "object",
"properties": {
"actions": {
"type": "array",
"items": {
"type": "string"
}
},
"effect": {
"type": "string"
},
"resources": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"updateGroupRequest": {
"type": "object",
"required": [
"members",
"status"
],
"properties": {
"members": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string"
}
}
},
"user": {
"type": "object",
"properties": {
"accessKey": {
"type": "string"
},
"memberOf": {
"type": "array",
"items": {
"type": "string"
}
},
"policy": {
"type": "string"
},
"status": {
"type": "string"
}
}
}
},
"securityDefinitions": {
"key": {
"type": "oauth2",
"flow": "accessCode",
"authorizationUrl": "http://min.io",
"tokenUrl": "http://min.io"
}
},
"security": [
{
"key": []
}
]
}`))
FlatSwaggerJSON = json.RawMessage([]byte(`{
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"schemes": [
"http"
],
"swagger": "2.0",
"info": {
"title": "MinIO Console Server",
"version": "0.1.0"
},
"paths": {
"/api/v1/buckets": {
"get": {
"tags": [
"UserAPI"
],
"summary": "List Buckets",
"operationId": "ListBuckets",
"parameters": [
{
"type": "string",
"name": "sort_by",
"in": "query"
},
{
"type": "integer",
"format": "int32",
"name": "offset",
"in": "query"
},
{
"type": "integer",
"format": "int32",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/listBucketsResponse"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"post": {
"tags": [
"UserAPI"
],
"summary": "Make bucket",
"operationId": "MakeBucket",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/makeBucketRequest"
}
}
],
"responses": {
"201": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/buckets/{bucket_name}/events": {
"get": {
"tags": [
"UserAPI"
],
"summary": "List Bucket Events",
"operationId": "ListBucketEvents",
"parameters": [
{
"type": "string",
"name": "bucket_name",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int32",
"name": "offset",
"in": "query"
},
{
"type": "integer",
"format": "int32",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/listBucketEventsResponse"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/buckets/{name}": {
"get": {
"tags": [
"UserAPI"
],
"summary": "Bucket Info",
"operationId": "BucketInfo",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/bucket"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"delete": {
"tags": [
"UserAPI"
],
"summary": "Delete Bucket",
"operationId": "DeleteBucket",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/buckets/{name}/set-policy": {
"put": {
"tags": [
"UserAPI"
],
"summary": "Bucket Set Policy",
"operationId": "BucketSetPolicy",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/setBucketPolicyRequest"
}
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/bucket"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/configs": {
"get": {
"tags": [
"AdminAPI"
],
"summary": "List Configurations",
"operationId": "ListConfig",
"parameters": [
{
"type": "integer",
"format": "int32",
"name": "offset",
"in": "query"
},
{
"type": "integer",
"format": "int32",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/listConfigResponse"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/configs/{name}": {
"get": {
"tags": [
"AdminAPI"
],
"summary": "Configuration info",
"operationId": "ConfigInfo",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/configuration"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"put": {
"tags": [
"AdminAPI"
],
"summary": "Set Configuration",
"operationId": "SetConfig",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/setConfigRequest"
}
}
],
"responses": {
"204": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/groups": {
"get": {
"tags": [
"AdminAPI"
],
"summary": "List Groups",
"operationId": "ListGroups",
"parameters": [
{
"type": "integer",
"format": "int32",
"name": "offset",
"in": "query"
},
{
"type": "integer",
"format": "int32",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/listGroupsResponse"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"post": {
"tags": [
"AdminAPI"
],
"summary": "Add Group",
"operationId": "AddGroup",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/addGroupRequest"
}
}
],
"responses": {
"201": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/groups/{name}": {
"get": {
"tags": [
"AdminAPI"
],
"summary": "Group info",
"operationId": "GroupInfo",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/group"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"put": {
"tags": [
"AdminAPI"
],
"summary": "Update Group Members or Status",
"operationId": "UpdateGroup",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/updateGroupRequest"
}
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/group"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"delete": {
"tags": [
"AdminAPI"
],
"summary": "Remove group",
"operationId": "RemoveGroup",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/login": {
"get": {
"security": [],
"tags": [
"UserAPI"
],
"summary": "Returns login strategy, form or sso.",
"operationId": "LoginDetail",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/loginDetails"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"post": {
"security": [],
"tags": [
"UserAPI"
],
"summary": "Login to mcs",
"operationId": "Login",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/loginRequest"
}
}
],
"responses": {
"201": {
"description": "A successful login.",
"schema": {
"$ref": "#/definitions/loginResponse"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/policies": {
"get": {
"tags": [
"AdminAPI"
],
"summary": "List Policies",
"operationId": "ListPolicies",
"parameters": [
{
"type": "integer",
"format": "int32",
"name": "offset",
"in": "query"
},
{
"type": "integer",
"format": "int32",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/listPoliciesResponse"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"post": {
"tags": [
"AdminAPI"
],
"summary": "Add Policy",
"operationId": "AddPolicy",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/addPolicyRequest"
}
}
],
"responses": {
"201": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/policy"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/policies/{name}": {
"get": {
"tags": [
"AdminAPI"
],
"summary": "Policy info",
"operationId": "PolicyInfo",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/policy"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"delete": {
"tags": [
"AdminAPI"
],
"summary": "Remove policy",
"operationId": "RemovePolicy",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/profiling/start": {
"post": {
"tags": [
"AdminAPI"
],
"summary": "Start recording profile data",
"operationId": "ProfilingStart",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/profilingStartRequest"
}
}
],
"responses": {
"201": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/startProfilingList"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/profiling/stop": {
"post": {
"produces": [
"application/octet-stream"
],
"tags": [
"AdminAPI"
],
"summary": "Stop and download profile data",
"operationId": "ProfilingStop",
"responses": {
"201": {
"description": "A successful response.",
"schema": {
"type": "file"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/service/restart": {
"post": {
"tags": [
"AdminAPI"
],
"summary": "Restart Service",
"operationId": "RestartService",
"responses": {
"204": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/set-policy/{name}": {
"put": {
"tags": [
"AdminAPI"
],
"summary": "Set policy",
"operationId": "SetPolicy",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/setPolicyRequest"
}
}
],
"responses": {
"204": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/api/v1/users": {
"get": {
"tags": [
"AdminAPI"
],
"summary": "List Users",
"operationId": "ListUsers",
"parameters": [
{
"type": "integer",
"format": "int32",
"name": "offset",
"in": "query"
},
{
"type": "integer",
"format": "int32",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/listUsersResponse"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"post": {
"tags": [
"AdminAPI"
],
"summary": "Add User",
"operationId": "AddUser",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/addUserRequest"
}
}
],
"responses": {
"201": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/user"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
}
},
"definitions": {
"addGroupRequest": {
"type": "object",
"required": [
"group",
"members"
],
"properties": {
"group": {
"type": "string"
},
"members": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"addPolicyRequest": {
"type": "object",
"required": [
"name"
],
"properties": {
"definition": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"addUserRequest": {
"type": "object",
"required": [
"accessKey",
"secretKey"
],
"properties": {
"accessKey": {
"type": "string"
},
"secretKey": {
"type": "string"
}
}
},
"bucket": {
"type": "object",
"required": [
"name"
],
"properties": {
"access": {
"$ref": "#/definitions/bucketAccess"
},
"creation_date": {
"type": "string"
},
"name": {
"type": "string",
"minLength": 3
},
"size": {
"type": "integer",
"format": "int64"
}
}
},
"bucketAccess": {
"type": "string",
"default": "PRIVATE",
"enum": [
"PRIVATE",
"PUBLIC",
"CUSTOM"
]
},
"configDescription": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"key": {
"type": "string"
}
}
},
"configuration": {
"type": "object",
"properties": {
"key_values": {
"type": "array",
"items": {
"$ref": "#/definitions/configurationKV"
}
},
"name": {
"type": "string"
}
}
},
"configurationKV": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"error": {
"type": "object",
"required": [
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int64"
},
"message": {
"type": "string"
}
}
},
"group": {
"type": "object",
"properties": {
"members": {
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": "string"
},
"policy": {
"type": "string"
},
"status": {
"type": "string"
}
}
},
"listBucketEventsResponse": {
"type": "object",
"properties": {
"events": {
"type": "array",
"items": {
"$ref": "#/definitions/notificationConfig"
}
},
"total": {
"type": "integer",
"format": "int64",
"title": "total number of bucket events"
}
}
},
"listBucketsResponse": {
"type": "object",
"properties": {
"buckets": {
"type": "array",
"title": "list of resulting buckets",
"items": {
"$ref": "#/definitions/bucket"
}
},
"total": {
"type": "integer",
"format": "int64",
"title": "number of buckets accessible to tenant user"
}
}
},
"listConfigResponse": {
"type": "object",
"properties": {
"configurations": {
"type": "array",
"items": {
"$ref": "#/definitions/configDescription"
}
},
"total": {
"type": "integer",
"format": "int64",
"title": "total number of configurations"
}
}
},
"listGroupsResponse": {
"type": "object",
"properties": {
"groups": {
"type": "array",
"title": "list of groups",
"items": {
"type": "string"
}
},
"total": {
"type": "integer",
"format": "int64",
"title": "total number of groups"
}
}
},
"listPoliciesResponse": {
"type": "object",
"properties": {
"policies": {
"type": "array",
"title": "list of policies",
"items": {
"$ref": "#/definitions/policy"
}
},
"total": {
"type": "integer",
"format": "int64",
"title": "total number of policies"
}
}
},
"listUsersResponse": {
"type": "object",
"properties": {
"users": {
"type": "array",
"title": "list of resulting users",
"items": {
"$ref": "#/definitions/user"
}
}
}
},
"loginDetails": {
"type": "object",
"properties": {
"loginStrategy": {
"type": "string",
"enum": [
"form",
"redirect"
]
},
"redirect": {
"type": "string"
}
}
},
"loginRequest": {
"type": "object",
"required": [
"accessKey",
"secretKey"
],
"properties": {
"accessKey": {
"type": "string"
},
"secretKey": {
"type": "string"
}
}
},
"loginResponse": {
"type": "object",
"properties": {
"sessionId": {
"type": "string"
}
}
},
"makeBucketRequest": {
"type": "object",
"required": [
"name"
],
"properties": {
"access": {
"$ref": "#/definitions/bucketAccess"
},
"name": {
"type": "string"
}
}
},
"notificationConfig": {
"type": "object",
"properties": {
"arn": {
"type": "string"
},
"events": {
"type": "array",
"title": "filter specific type of event. Defaults to all event (default: '[put,delete,get]')",
"items": {
"$ref": "#/definitions/notificationEventType"
}
},
"id": {
"type": "string"
},
"prefix": {
"type": "string",
"title": "filter event associated to the specified prefix"
},
"suffix": {
"type": "string",
"title": "filter event associated to the specified suffix"
}
}
},
"notificationEventType": {
"type": "string",
"enum": [
"put",
"delete",
"get"
]
},
"policy": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"statements": {
"type": "array",
"items": {
"$ref": "#/definitions/statement"
}
},
"version": {
"type": "string"
}
}
},
"policyEntity": {
"type": "string",
"default": "user",
"enum": [
"user",
"group"
]
},
"principal": {
"type": "string"
},
"profilerType": {
"type": "string",
"enum": [
"cpu",
"mem",
"block",
"mutex",
"trace",
"threads",
"goroutines"
]
},
"profilingStartRequest": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"$ref": "#/definitions/profilerType"
}
}
},
"setBucketPolicyRequest": {
"type": "object",
"required": [
"access"
],
"properties": {
"access": {
"$ref": "#/definitions/bucketAccess"
}
}
},
"setConfigRequest": {
"type": "object",
"required": [
"key_values"
],
"properties": {
"arn_resource_id": {
"type": "string",
"title": "Used if configuration is an event notification's target"
},
"key_values": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/configurationKV"
}
}
}
},
"setPolicyRequest": {
"type": "object",
"required": [
"entityType",
"entityName"
],
"properties": {
"entityName": {
"type": "string"
},
"entityType": {
"$ref": "#/definitions/policyEntity"
}
}
},
"startProfilingItem": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"nodeName": {
"type": "string"
},
"success": {
"type": "boolean"
}
}
},
"startProfilingList": {
"type": "object",
"properties": {
"startResults": {
"type": "array",
"items": {
"$ref": "#/definitions/startProfilingItem"
}
},
"total": {
"type": "integer",
"format": "int64",
"title": "number of start results"
}
}
},
"statement": {
"type": "object",
"properties": {
"actions": {
"type": "array",
"items": {
"type": "string"
}
},
"effect": {
"type": "string"
},
"resources": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"updateGroupRequest": {
"type": "object",
"required": [
"members",
"status"
],
"properties": {
"members": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "string"
}
}
},
"user": {
"type": "object",
"properties": {
"accessKey": {
"type": "string"
},
"memberOf": {
"type": "array",
"items": {
"type": "string"
}
},
"policy": {
"type": "string"
},
"status": {
"type": "string"
}
}
}
},
"securityDefinitions": {
"key": {
"type": "oauth2",
"flow": "accessCode",
"authorizationUrl": "http://min.io",
"tokenUrl": "http://min.io"
}
},
"security": [
{
"key": []
}
]
}`))
}