Skip to content

Instantly share code, notes, and snippets.

@krisis
Last active January 20, 2017 09:20
Show Gist options
  • Save krisis/dfb01e450dadb75d8ab19bc0e342f1a1 to your computer and use it in GitHub Desktop.
Save krisis/dfb01e450dadb75d8ab19bc0e342f1a1 to your computer and use it in GitHub Desktop.

Management REST API

Authors

  • Anis
  • KP

Authentication

  • AWS signatureV4
  • Region can't be empty string. Currently using "minio" as constant string.

Versioning

  • No versioning in URL.

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, json format of StorageInfo

Lock Management APIs

  • List

    • 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 // for bucket
      • ErrInvalidObjectName // for prefix
      • ErrInvalidDuration // for rel_time
  • Clear

    • POST /?lock&bucket=mybucket&object=myobject
    • x-minio-operation: clear
    • Response: On success 200, returning a list of locks that were cleared
    • Possible error responses
      • ErrInvalidBucketName // for bucket
      • ErrInvalidObjectName // for object name

Healing Management APIs

  • StorageFormat

    • POST /?heal
    • x-minio-operation: format
    • Response: On success 200, indicate if format was healed. TBD: {wasHealed:true}
  • HealBucket

    • POST /?heal&bucket=mybucket&dry-run=[yes|no]
    • x-minio-operation: bucket
    • Response: On success 200, return list of objects healed as json.
  • HealObject

    • POST /?heal&bucket=mybucket&prefix=myprefix&dry-run=[yes|no]
    • x-minio-operation: object
    • Response: On success 200, return list of objects matching prefix that were healed.
  • ListObjectHeal

    • GET /?heal&bucket=mybucket&prefix=myprefix&marker=mymarker&delimiter=&mydelimiter&maxKey=1000
    • x-minio-operation: list
    • On success 200, return list of objects matching prefix that require healing.
    • On failure one of the following errors are returned.
      • ErrServerNotInitialized
      • ErrSignatureMismatch
      • ErrInvalidObjectName
      • ErrInvalidBucketName
      • ErrInvalidMaxKeys
      • ErrNotImplemented
      • ErrInternalError - json marshalling failure
@donatello
Copy link

We could also add free space available in the cluster as a part of this API so the operator can query this value to get alerts about space usage.

@krisis
Copy link
Author

krisis commented Dec 7, 2016

Change Shutdown to Stop in section listing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment