Skip to content

Conversation

cesnietor
Copy link
Collaborator

Status can be set to either 'enabled' or 'disabled':
Api PUT on /api/v1/buckets/<bucket_name>/objects/legalhold?prefix=<file_path>&version_id=<file_version>
Request payload example:

{
    "status": "disabled"
}

After a successful response you can do get on list objects and the status should be reflected there e.g.:
GET on /api/v1/buckets/<bucket_name>/objects?prefix=<file_path>&with_versions=true

{
    "objects": [
        {
            "is_latest": true,
            "last_modified": "2020-10-14 21:54:00.842 +0000 UTC",
            "legal_hold_status": "ON",
            "name": "<file>",
            "size": 19822527,
            "version_id": "<version>"
        },
       ...
}
  • Tests included

@cesnietor cesnietor mentioned this pull request Oct 22, 2020
1 task
@Alevsk
Copy link
Contributor

Alevsk commented Oct 22, 2020

LGTM

@dvaldivia dvaldivia merged commit 3ac45a2 into minio:master Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants