Files

1180 lines
26 KiB
YAML
Raw Permalink Normal View History

# @format
swagger: "2.0"
info:
title: MinIO Console Server
version: 0.1.0
consumes:
- application/json
produces:
- application/json
schemes:
- http
- ws
2020-04-03 13:17:31 -07:00
basePath: /api/v1
# We are going to be taking `Authorization: Bearer TOKEN` header for our authentication
securityDefinitions:
key:
type: oauth2
flow: accessCode
authorizationUrl: http://min.io
tokenUrl: http://min.io
anonymous:
name: X-Anonymous
in: header
type: apiKey
# Apply the key security definition to all APIs
security:
2025-05-09 16:41:27 -07:00
- key: [ ]
parameters:
limit:
name: limit
in: query
type: number
format: int32
default: 20
offset:
name: offset
in: query
type: number
format: int32
default: 0
paths:
/login:
get:
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/ApiError"
# Exclude this API from the authentication requirement
2025-05-09 16:41:27 -07:00
security: [ ]
tags:
- Auth
post:
2020-07-25 14:38:16 -07:00
summary: Login to Console
operationId: Login
parameters:
- name: body
in: body
required: true
schema:
$ref: "#/definitions/loginRequest"
responses:
204:
description: A successful login.
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
# Exclude this API from the authentication requirement
2025-05-09 16:41:27 -07:00
security: [ ]
tags:
- Auth
/logout:
post:
summary: Logout from Console.
operationId: Logout
parameters:
- name: body
in: body
required: true
schema:
$ref: "#/definitions/logoutRequest"
responses:
200:
description: A successful response.
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- Auth
/session:
get:
summary: Endpoint to check if your session is still valid
operationId: SessionCheck
responses:
200:
description: A successful response.
schema:
$ref: "#/definitions/sessionResponse"
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- Auth
2020-04-03 13:17:31 -07:00
/buckets:
get:
summary: List Buckets
operationId: ListBuckets
responses:
200:
description: A successful response.
schema:
$ref: "#/definitions/listBucketsResponse"
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- Bucket
post:
summary: Make bucket
operationId: MakeBucket
parameters:
- name: body
in: body
required: true
schema:
$ref: "#/definitions/makeBucketRequest"
responses:
200:
description: A successful response.
schema:
$ref: "#/definitions/makeBucketsResponse"
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- Bucket
2020-04-03 13:17:31 -07:00
/buckets/{name}:
get:
summary: Bucket Info
operationId: BucketInfo
parameters:
- name: name
in: path
required: true
type: string
responses:
200:
description: A successful response.
schema:
$ref: "#/definitions/bucket"
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- Bucket
/buckets/{bucket_name}/objects:
get:
summary: List Objects
security:
2025-05-09 16:41:27 -07:00
- key: [ ]
- anonymous: [ ]
operationId: ListObjects
parameters:
- name: bucket_name
in: path
required: true
type: string
- name: prefix
in: query
required: false
type: string
- name: recursive
in: query
required: false
type: boolean
- name: with_versions
in: query
required: false
type: boolean
- name: with_metadata
in: query
required: false
type: boolean
- $ref: "#/parameters/limit"
responses:
200:
description: A successful response.
schema:
$ref: "#/definitions/listObjectsResponse"
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- Object
delete:
summary: Delete Object
operationId: DeleteObject
parameters:
- name: bucket_name
in: path
required: true
type: string
- name: prefix
in: query
required: true
type: string
- name: version_id
in: query
required: false
type: string
- name: recursive
in: query
required: false
type: boolean
- name: all_versions
in: query
required: false
type: boolean
- name: non_current_versions
in: query
required: false
type: boolean
- name: bypass
in: query
required: false
type: boolean
responses:
200:
description: A successful response.
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- Object
/buckets/{bucket_name}/delete-objects:
post:
summary: Delete Multiple Objects
operationId: DeleteMultipleObjects
parameters:
- name: bucket_name
in: path
required: true
type: string
- name: all_versions
in: query
required: false
type: boolean
- name: bypass
in: query
required: false
type: boolean
- name: files
in: body
required: true
schema:
type: array
items:
$ref: "#/definitions/deleteFile"
responses:
200:
description: A successful response.
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- Object
/buckets/{bucket_name}/objects/upload:
post:
summary: Uploads an Object.
security:
2025-05-09 16:41:27 -07:00
- key: [ ]
- anonymous: [ ]
consumes:
- multipart/form-data
parameters:
- name: bucket_name
in: path
required: true
type: string
- name: prefix
in: query
type: string
responses:
200:
description: A successful response.
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- Object
/buckets/{bucket_name}/objects/download-multiple:
post:
summary: Download Multiple Objects
operationId: DownloadMultipleObjects
security:
2025-05-09 16:41:27 -07:00
- key: [ ]
- anonymous: [ ]
produces:
- application/octet-stream
parameters:
- name: bucket_name
in: path
required: true
type: string
- name: objectList
in: body
required: true
schema:
type: array
items:
type: string
responses:
200:
description: A successful response.
schema:
type: file
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- Object
/buckets/{bucket_name}/objects/download:
get:
summary: Download Object
operationId: Download Object
security:
2025-05-09 16:41:27 -07:00
- key: [ ]
- anonymous: [ ]
produces:
- application/octet-stream
parameters:
- name: bucket_name
in: path
required: true
type: string
- name: prefix
in: query
required: true
type: string
- name: version_id
in: query
required: false
type: string
- name: preview
in: query
required: false
type: boolean
default: false
- name: override_file_name
in: query
required: false
type: string
default: ""
responses:
200:
description: A successful response.
schema:
type: file
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- Object
2020-10-22 11:18:27 -07:00
/buckets/{bucket_name}/objects/share:
get:
2020-10-22 11:18:27 -07:00
summary: Shares an Object on a url
operationId: ShareObject
parameters:
- name: bucket_name
in: path
required: true
type: string
- name: prefix
in: query
2020-10-22 11:18:27 -07:00
required: true
type: string
- name: version_id
in: query
required: true
type: string
- name: expires
in: query
required: false
type: string
2020-10-22 11:18:27 -07:00
responses:
200:
description: A successful response.
schema:
type: string
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
2020-10-22 11:18:27 -07:00
tags:
- Object
/buckets/{bucket_name}/objects/tags:
put:
summary: Put Object's tags
operationId: PutObjectTags
parameters:
- name: bucket_name
in: path
required: true
type: string
- name: prefix
in: query
required: true
type: string
- name: version_id
in: query
required: true
type: string
- name: body
in: body
required: true
schema:
$ref: "#/definitions/putObjectTagsRequest"
responses:
200:
description: A successful response.
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- Object
/buckets/{bucket_name}/objects/restore:
put:
summary: Restore Object to a selected version
operationId: PutObjectRestore
parameters:
- name: bucket_name
in: path
required: true
type: string
- name: prefix
in: query
required: true
type: string
- name: version_id
in: query
required: true
type: string
responses:
200:
description: A successful response.
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- Object
/buckets/{bucket_name}/objects/metadata:
get:
summary: Gets the metadata of an object
operationId: GetObjectMetadata
parameters:
- name: bucket_name
in: path
required: true
type: string
- name: prefix
in: query
required: true
type: string
- name: versionID
in: query
type: string
responses:
200:
description: A successful response.
schema:
$ref: "#/definitions/metadata"
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- Object
/buckets/{name}/quota:
get:
summary: Get Bucket Quota
operationId: GetBucketQuota
parameters:
- name: name
in: path
required: true
type: string
responses:
200:
description: A successful response.
schema:
$ref: "#/definitions/bucketQuota"
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- Bucket
/buckets/{bucket_name}/versioning:
get:
summary: Bucket Versioning
operationId: GetBucketVersioning
parameters:
- name: bucket_name
in: path
required: true
type: string
responses:
200:
description: A successful response.
schema:
$ref: "#/definitions/bucketVersioningResponse"
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- Bucket
put:
summary: Set Bucket Versioning
operationId: SetBucketVersioning
parameters:
- name: bucket_name
in: path
required: true
type: string
- name: body
in: body
required: true
schema:
$ref: "#/definitions/setBucketVersioning"
responses:
201:
description: A successful response.
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- Bucket
/buckets/{bucket_name}/rewind/{date}:
get:
summary: Get objects in a bucket for a rewind date
operationId: GetBucketRewind
parameters:
- name: bucket_name
in: path
required: true
type: string
- name: date
in: path
required: true
type: string
- name: prefix
in: query
required: false
type: string
responses:
200:
description: A successful response.
schema:
$ref: "#/definitions/rewindResponse"
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- Bucket
/buckets/max-share-exp:
get:
summary: Get max expiration time for share link in seconds
operationId: GetMaxShareLinkExp
responses:
200:
description: A successful response.
schema:
$ref: "#/definitions/maxShareLinkExpResponse"
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- Bucket
/admin/info:
get:
summary: Returns information about the deployment
operationId: AdminInfo
parameters:
- name: defaultOnly
in: query
required: false
type: boolean
default: false
2023-03-10 09:16:29 -06:00
responses:
200:
description: A successful response.
schema:
$ref: "#/definitions/adminInfoResponse"
2023-03-10 09:16:29 -06:00
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
2023-03-10 09:16:29 -06:00
tags:
- System
2023-03-10 09:16:29 -06:00
/license/acknowledge:
get:
summary: Acknowledge the license
operationId: LicenseAcknowledge
responses:
200:
description: A successful response.
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- License
/download-shared-object/{url}:
get:
summary: Downloads an object from a presigned url
operationId: DownloadSharedObject
2025-05-09 16:41:27 -07:00
security: [ ]
produces:
- application/octet-stream
parameters:
- name: url
in: path
required: true
type: string
responses:
200:
description: A successful response.
schema:
type: file
default:
description: Generic error response.
schema:
$ref: "#/definitions/ApiError"
tags:
- Public
definitions:
bucketAccess:
type: string
enum:
- PRIVATE
- PUBLIC
- CUSTOM
default: PRIVATE
bucket:
type: object
required:
- name
properties:
name:
type: string
minLength: 3
size:
type: integer
format: int64
access:
$ref: "#/definitions/bucketAccess"
definition:
type: string
rw_access:
type: object
properties:
write:
type: boolean
read:
type: boolean
objects:
type: integer
format: int64
details:
type: object
properties:
versioning:
type: boolean
versioningSuspended:
type: boolean
locking:
type: boolean
replication:
type: boolean
tags:
type: object
additionalProperties:
type: string
quota:
type: object
properties:
quota:
type: integer
format: int64
type:
type: string
enum:
- hard
creation_date:
type: string
listBucketsResponse:
type: object
properties:
buckets:
type: array
items:
$ref: "#/definitions/bucket"
title: list of resulting buckets
total:
type: integer
format: int64
title: number of buckets accessible to the user
2025-05-09 16:41:27 -07:00
objectRetentionUnit:
type: string
enum:
- days
- years
objectRetentionMode:
type: string
enum:
- governance
- compliance
getBucketRetentionConfig:
type: object
properties:
2025-05-09 16:41:27 -07:00
mode:
$ref: "#/definitions/objectRetentionMode"
unit:
$ref: "#/definitions/objectRetentionUnit"
validity:
type: integer
format: int32
listObjectsResponse:
type: object
properties:
objects:
type: array
items:
$ref: "#/definitions/bucketObject"
title: list of resulting objects
total:
type: integer
format: int64
title: number of objects
bucketObject:
type: object
properties:
name:
type: string
size:
type: integer
format: int64
content_type:
type: string
last_modified:
type: string
is_latest:
type: boolean
is_delete_marker:
type: boolean
version_id:
type: string
user_tags:
type: object
additionalProperties:
type: string
expiration:
type: string
expiration_rule_id:
type: string
legal_hold_status:
type: string
retention_mode:
type: string
retention_until_date:
type: string
etag:
type: string
tags:
type: object
additionalProperties:
type: string
metadata:
type: object
additionalProperties:
type: string
user_metadata:
type: object
additionalProperties:
type: string
makeBucketRequest:
type: object
required:
- name
properties:
name:
type: string
ApiError:
type: object
properties:
message:
type: string
detailedMessage:
type: string
2025-05-09 16:41:27 -07:00
makeBucketsResponse:
type: object
properties:
2025-05-09 16:41:27 -07:00
bucketName:
type: string
2025-05-09 16:41:27 -07:00
bucketQuota:
type: object
properties:
2025-05-09 16:41:27 -07:00
quota:
type: integer
2025-05-09 16:41:27 -07:00
type:
type: string
2025-05-09 16:41:27 -07:00
enum:
- hard
loginResponse:
type: object
properties:
2025-05-09 16:41:27 -07:00
sessionId:
type: string
2025-05-09 16:41:27 -07:00
IDPRefreshToken:
type: string
2025-05-09 16:41:27 -07:00
loginDetails:
2020-04-02 15:54:34 -07:00
type: object
properties:
2025-05-09 16:41:27 -07:00
loginStrategy:
type: string
enum: [ form, service-account, redirect-service-account ]
2025-05-09 16:41:27 -07:00
redirectRules:
2021-04-01 16:13:57 -07:00
type: array
items:
2025-05-09 16:41:27 -07:00
$ref: "#/definitions/redirectRule"
isK8S:
type: boolean
animatedLogin:
type: boolean
loginRequest:
type: object
properties:
2025-05-09 16:41:27 -07:00
accessKey:
type: string
secretKey:
type: string
2025-05-09 16:41:27 -07:00
sts:
type: string
2025-05-09 16:41:27 -07:00
features:
type: object
properties:
hide_menu:
type: boolean
logoutRequest:
type: object
properties:
2025-05-09 16:41:27 -07:00
state:
type: string
2025-05-09 16:41:27 -07:00
# Structure that holds the `Bearer {TOKEN}` present on authenticated requests
principal:
type: object
properties:
2025-05-09 16:41:27 -07:00
STSAccessKeyID:
type: string
2025-05-09 16:41:27 -07:00
STSSecretAccessKey:
type: string
2025-05-09 16:41:27 -07:00
STSSessionToken:
type: string
2025-05-09 16:41:27 -07:00
accountAccessKey:
type: string
2025-05-09 16:41:27 -07:00
hm:
type: boolean
ob:
type: boolean
customStyleOb:
type: string
2025-05-09 16:41:27 -07:00
sessionResponse:
type: object
properties:
2025-05-09 16:41:27 -07:00
features:
type: array
items:
type: string
status:
type: string
2025-05-09 16:41:27 -07:00
enum: [ ok ]
operator:
type: boolean
distributedMode:
type: boolean
serverEndPoint:
type: string
2025-05-09 16:41:27 -07:00
permissions:
type: object
additionalProperties:
type: array
items:
type: string
customStyles:
type: string
2025-05-09 16:41:27 -07:00
allowResources:
type: array
items:
2025-05-09 16:41:27 -07:00
$ref: "#/definitions/permissionResource"
envConstants:
$ref: "#/definitions/environmentConstants"
widgetResult:
type: object
properties:
2025-05-09 16:41:27 -07:00
metric:
type: object
additionalProperties:
type: string
values:
type: array
2025-05-09 16:41:27 -07:00
items: { }
resultTarget:
type: object
properties:
2025-05-09 16:41:27 -07:00
legendFormat:
type: string
2025-05-09 16:41:27 -07:00
resultType:
type: string
2025-05-09 16:41:27 -07:00
result:
type: array
items:
2025-05-09 16:41:27 -07:00
$ref: "#/definitions/widgetResult"
widget:
type: object
properties:
2025-05-09 16:41:27 -07:00
title:
type: string
2025-05-09 16:41:27 -07:00
type:
type: string
id:
type: integer
format: int32
2025-05-09 16:41:27 -07:00
options:
type: object
properties:
reduceOptions:
type: object
properties:
calcs:
type: array
items:
2025-05-09 16:41:27 -07:00
type: string
targets:
2022-10-07 12:50:17 -05:00
type: array
items:
2025-05-09 16:41:27 -07:00
$ref: "#/definitions/resultTarget"
adminInfoResponse:
type: object
properties:
2025-05-09 16:41:27 -07:00
buckets:
type: integer
2025-05-09 16:41:27 -07:00
objects:
type: integer
2025-05-09 16:41:27 -07:00
usage:
type: integer
2025-05-09 16:41:27 -07:00
advancedMetricsStatus:
type: string
enum:
- not configured
- available
- unavailable
widgets:
type: array
items:
2025-05-09 16:41:27 -07:00
$ref: "#/definitions/widget"
servers:
type: array
items:
$ref: "#/definitions/serverProperties"
backend:
$ref: "#/definitions/BackendProperties"
serverProperties:
type: object
properties:
2025-05-09 16:41:27 -07:00
state:
type: string
endpoint:
type: string
uptime:
type: integer
2025-05-09 16:41:27 -07:00
version:
type: string
commitID:
type: string
poolNumber:
type: integer
2025-05-09 16:41:27 -07:00
network:
type: object
additionalProperties:
type: string
drives:
type: array
items:
2025-05-09 16:41:27 -07:00
$ref: "#/definitions/serverDrives"
serverDrives:
type: object
properties:
2025-05-09 16:41:27 -07:00
uuid:
type: string
2025-05-09 16:41:27 -07:00
state:
type: string
endpoint:
type: string
drivePath:
type: string
rootDisk:
type: boolean
healing:
type: boolean
model:
type: string
2025-05-09 16:41:27 -07:00
totalSpace:
type: integer
2025-05-09 16:41:27 -07:00
usedSpace:
type: integer
availableSpace:
type: integer
2025-05-09 16:41:27 -07:00
BackendProperties:
type: object
properties:
2025-05-09 16:41:27 -07:00
backendType:
type: string
2025-05-09 16:41:27 -07:00
rrSCParity:
type: integer
2025-05-09 16:41:27 -07:00
standardSCParity:
type: integer
2025-05-09 16:41:27 -07:00
onlineDrives:
type: integer
offlineDrives:
type: integer
bucketVersioningResponse:
type: object
properties:
2025-05-09 16:41:27 -07:00
status:
type: string
2025-05-09 16:41:27 -07:00
MFADelete:
type: string
2025-05-09 16:41:27 -07:00
excludedPrefixes:
type: array
items:
type: object
properties:
prefix:
type: string
excludeFolders:
type: boolean
2025-05-09 16:41:27 -07:00
setBucketVersioning:
type: object
properties:
enabled:
type: boolean
2025-05-09 16:41:27 -07:00
excludePrefixes:
type: array
2025-05-09 16:41:27 -07:00
maxLength: 10
items:
2025-05-09 16:41:27 -07:00
type: string
excludeFolders:
type: boolean
2025-05-09 16:41:27 -07:00
putObjectTagsRequest:
type: object
properties:
2025-05-09 16:41:27 -07:00
tags:
additionalProperties:
type: string
2025-05-09 16:41:27 -07:00
deleteFile:
type: object
properties:
2025-05-09 16:41:27 -07:00
path:
type: string
2025-05-09 16:41:27 -07:00
versionID:
type: string
2025-05-09 16:41:27 -07:00
recursive:
type: boolean
2025-05-09 16:41:27 -07:00
rewindItem:
type: object
properties:
2025-05-09 16:41:27 -07:00
last_modified:
type: string
2025-05-09 16:41:27 -07:00
size:
type: integer
2025-05-09 16:41:27 -07:00
format: int64
version_id:
type: string
2025-05-09 16:41:27 -07:00
delete_flag:
type: boolean
2025-05-09 16:41:27 -07:00
action:
type: string
2025-05-09 16:41:27 -07:00
name:
type: string
2025-05-09 16:41:27 -07:00
is_latest:
type: boolean
2023-03-10 09:16:29 -06:00
2025-05-09 16:41:27 -07:00
rewindResponse:
2023-03-10 09:16:29 -06:00
type: object
properties:
2025-05-09 16:41:27 -07:00
objects:
2023-03-10 09:16:29 -06:00
type: array
items:
2025-05-09 16:41:27 -07:00
$ref: "#/definitions/rewindItem"
metadata:
2023-03-10 09:16:29 -06:00
type: object
properties:
2025-05-09 16:41:27 -07:00
objectMetadata:
type: object
additionalProperties: true
2023-03-10 09:16:29 -06:00
2025-05-09 16:41:27 -07:00
permissionResource:
2023-03-10 09:16:29 -06:00
type: object
properties:
2025-05-09 16:41:27 -07:00
resource:
type: string
conditionOperator:
2023-03-10 09:16:29 -06:00
type: string
2025-05-09 16:41:27 -07:00
prefixes:
2023-03-10 09:16:29 -06:00
type: array
items:
type: string
2025-05-09 16:41:27 -07:00
environmentConstants:
2023-03-10 09:16:29 -06:00
type: object
properties:
2025-05-09 16:41:27 -07:00
maxConcurrentUploads:
type: integer
maxConcurrentDownloads:
type: integer
2023-03-10 09:16:29 -06:00
2025-05-09 16:41:27 -07:00
redirectRule:
2023-03-10 09:16:29 -06:00
type: object
properties:
2025-05-09 16:41:27 -07:00
redirect:
type: string
displayName:
type: string
serviceType:
2023-03-10 09:16:29 -06:00
type: string
2023-10-19 14:03:14 -07:00
maxShareLinkExpResponse:
type: object
properties:
exp:
type: number
format: int64
required:
- exp