Authorizes one exact short-lived Source-prefix data-plane operation.
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://example.com/api/workspace/file-protection/agent/v1/grants"), Headers = { { "X-Moltaro-File-Protection-Agent", "<X-Moltaro-File-Protection-Agent>" }, }, Content = new StringContent("{ \"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\" }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}const url = 'https://example.com/api/workspace/file-protection/agent/v1/grants';const options = { method: 'POST', headers: { 'X-Moltaro-File-Protection-Agent': '<X-Moltaro-File-Protection-Agent>', 'Content-Type': 'application/json' }, body: '{"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"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Requests one exact short-lived operation inside the leased Source prefix.
object
Allowed S3 operation represented by a short-lived data-plane grant.
Server metadata PUT checksum. Public Agent operations reject this field.
Committed native bootstrap checksum; public Agent grants reject it and cannot select the server signing profile.
Requests one exact short-lived operation inside the leased Source prefix.
object
Allowed S3 operation represented by a short-lived data-plane grant.
Server metadata PUT checksum. Public Agent operations reject this field.
Committed native bootstrap checksum; public Agent grants reject it and cannot select the server signing profile.
Requests one exact short-lived operation inside the leased Source prefix.
object
Allowed S3 operation represented by a short-lived data-plane grant.
Server metadata PUT checksum. Public Agent operations reject this field.
Committed native bootstrap checksum; public Agent grants reject it and cannot select the server signing profile.
Responses
Section titled “Responses”OK
object
One short-lived presigned authorization. The URL must never be logged.
object
object
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}