Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Set object's legalhold status api #339

Merged
merged 3 commits into from
Oct 22, 2020

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