mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
Implement list, clear locks REST API w/ pkg/madmin support (#3491)
* Filter lock info based on bucket, prefix and time since lock was held * Implement list and clear locks REST API * madmin: Add list and clear locks API * locks: Clear locks matching bucket, prefix, relTime. * Gather lock information across nodes for both list and clear locks admin REST API. * docs: Add lock API to management APIs
This commit is contained in:
committed by
Harshavardhana
parent
cae62ce543
commit
c8f57133a4
82
docs/admin-api/management-api.md
Normal file
82
docs/admin-api/management-api.md
Normal file
@@ -0,0 +1,82 @@
|
||||
# Management REST API
|
||||
|
||||
## Authentication
|
||||
- AWS signatureV4
|
||||
- We use "minio" as region. Here region is set only for signature calculation.
|
||||
|
||||
## List of management APIs
|
||||
- Service
|
||||
- Stop
|
||||
- Restart
|
||||
- Status
|
||||
|
||||
- Locks
|
||||
- List
|
||||
- Clear
|
||||
|
||||
- Healing
|
||||
|
||||
### Service Management APIs
|
||||
* Stop
|
||||
- POST /?service
|
||||
- x-minio-operation: stop
|
||||
- Response: On success 200
|
||||
|
||||
* Restart
|
||||
- POST /?service
|
||||
- x-minio-operation: restart
|
||||
- Response: On success 200
|
||||
|
||||
* Status
|
||||
- GET /?service
|
||||
- x-minio-operation: status
|
||||
- Response: On success 200, return json formatted StorageInfo object.
|
||||
|
||||
### Lock Management APIs
|
||||
* ListLocks
|
||||
- GET /?lock&bucket=mybucket&prefix=myprefix&older-than=rel_time
|
||||
- x-minio-operation: list
|
||||
- Response: On success 200, json encoded response containing all locks held, older than rel_time. e.g, older than 3 hours.
|
||||
- Possible error responses
|
||||
- ErrInvalidBucketName
|
||||
<Error>
|
||||
<Code>InvalidBucketName</Code>
|
||||
<Message>The specified bucket is not valid.</Message>
|
||||
<Key></Key>
|
||||
<BucketName></BucketName>
|
||||
<Resource>/</Resource>
|
||||
<RequestId>3L137</RequestId>
|
||||
<HostId>3L137</HostId>
|
||||
</Error>
|
||||
|
||||
- ErrInvalidObjectName
|
||||
<Error>
|
||||
<Code>XMinioInvalidObjectName</Code>
|
||||
<Message>Object name contains unsupported characters. Unsupported characters are `^*|\"</Message>
|
||||
<Key></Key>
|
||||
<BucketName></BucketName>
|
||||
<Resource>/</Resource>
|
||||
<RequestId>3L137</RequestId>
|
||||
<HostId>3L137</HostId>
|
||||
</Error>
|
||||
|
||||
- ErrInvalidDuration
|
||||
<Error>
|
||||
<Code>InvalidDuration</Code>
|
||||
<Message>Relative duration provided in the request is invalid.</Message>
|
||||
<Key></Key>
|
||||
<BucketName></BucketName>
|
||||
<Resource>/</Resource>
|
||||
<RequestId>3L137</RequestId>
|
||||
<HostId>3L137</HostId>
|
||||
</Error>
|
||||
|
||||
|
||||
* ClearLocks
|
||||
- POST /?lock&bucket=mybucket&prefix=myprefix&older-than=rel_time
|
||||
- x-minio-operation: clear
|
||||
- Response: On success 200, json encoded response containing all locks cleared, older than rel_time. e.g, older than 3 hours.
|
||||
- Possible error responses, similar to errors listed in ListLocks.
|
||||
- ErrInvalidBucketName
|
||||
- ErrInvalidObjectName
|
||||
- ErrInvalidDuration
|
||||
@@ -1,33 +0,0 @@
|
||||
# Service REST API
|
||||
|
||||
## Authentication
|
||||
- AWS signatureV4
|
||||
- We use "minio" as region. Here region is set only for signature calculation.
|
||||
|
||||
## List of management APIs
|
||||
- Service
|
||||
- Stop
|
||||
- Restart
|
||||
- Status
|
||||
|
||||
- Locks
|
||||
- List
|
||||
- Clear
|
||||
|
||||
- Healing
|
||||
|
||||
### Service Management APIs
|
||||
* Stop
|
||||
- POST /?service
|
||||
- x-minio-operation: stop
|
||||
- Response: On success 200
|
||||
|
||||
* Restart
|
||||
- POST /?service
|
||||
- x-minio-operation: restart
|
||||
- Response: On success 200
|
||||
|
||||
* Status
|
||||
- GET /?service
|
||||
- x-minio-operation: status
|
||||
- Response: On success 200, return json formatted StorageInfo object.
|
||||
Reference in New Issue
Block a user