Skip to content

Authorizes one exact short-lived Source-prefix data-plane operation.

POST
/api/workspace/file-protection/agent/v1/grants
curl --request POST \
--url https://example.com/api/workspace/file-protection/agent/v1/grants \
--header 'Content-Type: application/json' \
--header 'X-Moltaro-File-Protection-Agent: <X-Moltaro-File-Protection-Agent>' \
--data '{ "CommandId": "example", "LeaseToken": "example", "Operation": 0, "ObjectKey": "example", "UploadId": "example", "PartNumber": 1, "ContentLength": 1, "ContinuationToken": "example", "VersionId": "example", "RetainUntilUtc": "2026-04-15T12:00:00Z", "ContentMd5": "example", "ContentSha256": "example" }'

Requires TLS at the API connection. A workspace bearer token does not authenticate an Agent.

Send the enrolled device credential in the X-Moltaro-File-Protection-Agent header. Revoked or invalid credentials are rejected.

Requests one exact short-lived operation inside the leased Source prefix.

object
CommandId
string
nullable
LeaseToken
string
nullable
Operation

Allowed S3 operation represented by a short-lived data-plane grant.

integer format: int32
Allowed values: 0 1 2 3 4 5 6 7 8 9 10 11 12 13
ObjectKey
string
nullable
UploadId
string
nullable
PartNumber
integer format: int32
nullable
ContentLength
integer format: int64
nullable
ContinuationToken
string
nullable
VersionId
string
nullable
RetainUntilUtc
string format: date-time
nullable
ContentMd5

Server metadata PUT checksum. Public Agent operations reject this field.

string
nullable
ContentSha256

Committed native bootstrap checksum; public Agent grants reject it and cannot select the server signing profile.

string
nullable

OK

Media typeapplication/json
object
Data

One short-lived presigned authorization. The URL must never be logged.

object
Url
string format: uri
nullable
ExpiresAtUtc
string format: date-time
RequiredHeaders
object
key
additional properties
string
MetadataXml
string
nullable
MetadataStatusCode
integer format: int32
nullable
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}