The Admin API provides administrative endpoints for managing MinIO server operations, configuration, users, and system maintenance. It exposes a RESTful HTTP interface at /minio/admin/v3/* for privileged operations that control the server's behavior, manage identity and access, perform healing operations, and coordinate distributed cluster activities.
This document covers the administrative API layer. For S3-compatible object and bucket operations, see S3 API Implementation. For identity and access management internals, see Identity and Access Management. For distributed coordination mechanisms, see Site Replication.
The Admin API operates as a separate HTTP endpoint namespace from the S3 API, requiring elevated privileges and using IAM-based authentication with admin-specific policy actions.
Sources: cmd/admin-router.go23-295 cmd/admin-handlers.go18-67
The admin API router is registered separately from the S3 API router and uses the path prefix /minio/admin/v3. All endpoints require authentication and are subject to IAM policy evaluation.
The router registration happens in registerAdminRouter() which creates route handlers for each administrative function category:
| Route Pattern | Handler Function | Purpose |
|---|---|---|
/service | ServiceHandler, ServiceV2Handler | Restart, stop, freeze services |
/update | ServerUpdateHandler, ServerUpdateV2Handler | In-place binary updates |
/add-user | AddUser | Create new IAM users |
/remove-user | RemoveUser | Delete IAM users |
/list-users | ListUsers | List all IAM users |
/user-info | GetUserInfo | Get user details |
/add-service-account | AddServiceAccount | Create service accounts |
/config-kv | SetConfigKVHandler, GetConfigKVHandler, DelConfigKVHandler | Manage configuration KV pairs |
/info | ServerInfoHandler | Get server information |
/storageinfo | StorageInfoHandler | Get storage metrics |
/heal | HealHandler | Trigger manual healing |
/background-heal/status | BackgroundHealStatusHandler | Get healing status |
Sources: cmd/admin-router.go47-295
Admin API requests follow a strict authentication and authorization flow before reaching the handler logic.
The validateAdminReq() function performs authentication and authorization:
validateAdminSignature()policy.DeleteUserAdminAction)Sources: cmd/admin-handlers.go88-94 cmd/admin-handlers-users.go49-100
The Admin API provides comprehensive user lifecycle management through IAM integration.
User management operations in cmd/admin-handlers-users.go48-467:
Service accounts are scoped credentials derived from parent users:
Sources: cmd/admin-handlers-users.go48-1334
The Admin API manages MinIO server configuration through a key-value structure organized by subsystems.
MinIO configuration is organized into subsystems identified by keys:
| Subsystem | Key | Purpose |
|---|---|---|
| API | api | API request throttling, CORS settings |
| Compression | compression | Object compression settings |
| LDAP | identity_ldap | LDAP authentication configuration |
| OpenID | identity_openid | OpenID Connect settings |
| Notifications | notify_webhook, notify_kafka, etc. | Event notification targets |
| Subnet | subnet | MinIO subscription network |
| Logger | logger_webhook | Audit logging targets |
Configuration operations support:
globalNotificationSys.SignalConfigReload().minio.sys/config/config.json on the storage backendSources: cmd/admin-handlers-config-kv.go22-408 cmd/config-current.go58-306
The Admin API provides operations to control MinIO server processes across a distributed cluster.
ServiceHandler (cmd/admin-handlers.go461-522):
restart, stop, freeze, unfreezepolicy.ServiceRestartAdminAction, etc.)globalNotificationSys.SignalService()ServiceV2Handler (cmd/admin-handlers.go549-634):
waitingDrivesNode()The update handlers implement in-place binary updates:
globalNotificationSys.VerifyBinary()commitBinary()restartUpdateDelay)The V2 handler adds:
Sources: cmd/admin-handlers.go85-634
Admin API exposes comprehensive system metrics and health information.
ServerInfo provides cluster-wide information:
StorageInfo returns storage subsystem details:
DataUsageInfo returns bucket-level metrics:
HealthInfo performs deep health checks:
Sources: cmd/admin-handlers.go1842-2450
The Admin API provides manual and automated healing capabilities for data integrity maintenance.
HealHandler (cmd/admin-handlers.go1155-1378) accepts:
bucket: Target bucket (optional, heals all if empty)prefix: Object prefix to heal (optional)dry-run: Validation mode without repairsremove: Remove unrecoverable objectsrecreate: Force reconstruction even if quorum existsThe handler:
newHealSequence()listPathRaw() or bucket metadata APIshealObject() to reconstruct dataBackgroundHealStatusHandler returns status of the automatic healing scanner which runs periodically to detect and repair issues without manual intervention.
Sources: cmd/admin-handlers.go1155-1490 cmd/data-scanner.go
Site replication enables multi-site active-active deployments with automatic synchronization of data, IAM, and configuration.
SiteReplicationAdd creates a new site replication configuration:
SiteReplicationEdit modifies existing configuration:
SiteReplicationStatus returns replication health:
When IAM entities change (users, policies, service accounts), the system invokes:
globalSiteReplicationSys.IAMChangeHook(ctx, madmin.SRIAMItem{
Type: madmin.SRIAMItemIAMUser,
IAMUser: &madmin.SRIAMUser{...},
UpdatedAt: UTCNow(),
})
This propagates the change to all peer sites asynchronously, maintaining eventual consistency across the deployment.
Sources: cmd/admin-handlers.go2516-3595 cmd/site-replication.go1-4531
All Admin API requests require authentication and authorization through IAM policies.
Each admin endpoint requires a specific policy action:
| Endpoint Category | Required Action |
|---|---|
| User Management | admin:CreateUser, admin:DeleteUser, admin:ListUsers |
| Service Account | admin:CreateServiceAccount, admin:RemoveServiceAccount |
| Configuration | admin:ConfigUpdate |
| Service Control | admin:ServiceRestart, admin:ServiceStop |
| Server Update | admin:ServerUpdate |
| Healing | admin:Heal |
| System Info | admin:ServerInfo, admin:StorageInfo |
| Site Replication | admin:ReplicationAdd, admin:ReplicationRemove |
validateAdminSignature() which extracts the access key and verifies the AWS SigV4 signatureglobalIAMSys.IsAllowed() evaluates attached policies against the required actionSources: cmd/admin-handlers.go91-94 cmd/iam.go1190-1225
Admin API uses consistent error handling and response formats.
Admin errors use the AdminError structure:
Common error codes include:
AdminUpdateApplyFailure: Binary update failedXMinIOAdminInvalidArgument: Invalid request parametersXMinIOAdminNoSuchUser: User not foundXMinIOAdminCredentialsMismatch: Invalid credentialsErrors are returned as JSON:
Most successful operations return:
List operations like ListUsers encrypt response data:
madmin.EncryptData()This ensures sensitive data remains protected in transit even with valid authentication.
Sources: cmd/admin-handlers.go2809-2842 cmd/admin-handlers-users.go104-177
Admin operations in distributed mode coordinate across all nodes using the notification system.
When an admin operation modifies cluster state, it:
globalNotificationSysExample from user deletion:
The notification system uses REST calls to peer nodes, with each peer executing the same operation on its local IAM cache and storage backend.
Sources: cmd/notification.go48-1396 cmd/peer-rest-client.go43-1068
Refresh this wiki