Add put object retention api (#340)

This commit is contained in:
Cesar N
2020-10-23 15:04:02 -07:00
committed by GitHub
parent fce361e5bd
commit 0325bb7e2d
12 changed files with 1131 additions and 6 deletions

View File

@@ -517,6 +517,54 @@ func init() {
}
}
},
"/buckets/{bucket_name}/objects/retention": {
"put": {
"tags": [
"UserAPI"
],
"summary": "Put Object's retention status",
"operationId": "PutObjectRetention",
"parameters": [
{
"type": "string",
"name": "bucket_name",
"in": "path",
"required": true
},
{
"type": "string",
"name": "prefix",
"in": "query",
"required": true
},
{
"type": "string",
"name": "version_id",
"in": "query",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/putObjectRetentionRequest"
}
}
],
"responses": {
"200": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/buckets/{bucket_name}/objects/share": {
"get": {
"tags": [
@@ -3750,6 +3798,13 @@ func init() {
"disabled"
]
},
"objectRetentionMode": {
"type": "string",
"enum": [
"governance",
"compliance"
]
},
"parityResponse": {
"type": "array",
"items": {
@@ -3891,6 +3946,24 @@ func init() {
}
}
},
"putObjectRetentionRequest": {
"type": "object",
"required": [
"mode",
"expires"
],
"properties": {
"expires": {
"type": "string"
},
"governance_bypass": {
"type": "boolean"
},
"mode": {
"$ref": "#/definitions/objectRetentionMode"
}
}
},
"remoteBucket": {
"type": "object",
"required": [
@@ -5124,6 +5197,54 @@ func init() {
}
}
},
"/buckets/{bucket_name}/objects/retention": {
"put": {
"tags": [
"UserAPI"
],
"summary": "Put Object's retention status",
"operationId": "PutObjectRetention",
"parameters": [
{
"type": "string",
"name": "bucket_name",
"in": "path",
"required": true
},
{
"type": "string",
"name": "prefix",
"in": "query",
"required": true
},
{
"type": "string",
"name": "version_id",
"in": "query",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/putObjectRetentionRequest"
}
}
],
"responses": {
"200": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/buckets/{bucket_name}/objects/share": {
"get": {
"tags": [
@@ -8836,6 +8957,13 @@ func init() {
"disabled"
]
},
"objectRetentionMode": {
"type": "string",
"enum": [
"governance",
"compliance"
]
},
"parityResponse": {
"type": "array",
"items": {
@@ -8955,6 +9083,24 @@ func init() {
}
}
},
"putObjectRetentionRequest": {
"type": "object",
"required": [
"mode",
"expires"
],
"properties": {
"expires": {
"type": "string"
},
"governance_bypass": {
"type": "boolean"
},
"mode": {
"$ref": "#/definitions/objectRetentionMode"
}
}
},
"remoteBucket": {
"type": "object",
"required": [