Renews one active command lease and publishes bounded progress.
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/commands/example/lease:renew"), Headers = { { "X-Moltaro-File-Protection-Agent", "<X-Moltaro-File-Protection-Agent>" }, }, Content = new StringContent("{ \"LeaseToken\": \"example\", \"State\": 0, \"ProcessedBytes\": 1, \"TotalBytes\": 1, \"SafeStatusCode\": \"example\", \"UsefulWorkSequence\": 1 }") { 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/commands/example/lease:renew';const options = { method: 'POST', headers: { 'X-Moltaro-File-Protection-Agent': '<X-Moltaro-File-Protection-Agent>', 'Content-Type': 'application/json' }, body: '{"LeaseToken":"example","State":0,"ProcessedBytes":1,"TotalBytes":1,"SafeStatusCode":"example","UsefulWorkSequence":1}'};
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/commands/example/lease:renew \ --header 'Content-Type: application/json' \ --header 'X-Moltaro-File-Protection-Agent: <X-Moltaro-File-Protection-Agent>' \ --data '{ "LeaseToken": "example", "State": 0, "ProcessedBytes": 1, "TotalBytes": 1, "SafeStatusCode": "example", "UsefulWorkSequence": 1 }'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”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Body
Section titled “Request Body”Renews an active command lease and optionally reports progress.
object
Durable state of one manual protection run.
Monotonic sequence of useful read/hash/transfer events in this attempt; repeated heartbeats do not advance it.
Renews an active command lease and optionally reports progress.
object
Durable state of one manual protection run.
Monotonic sequence of useful read/hash/transfer events in this attempt; repeated heartbeats do not advance it.
Renews an active command lease and optionally reports progress.
object
Durable state of one manual protection run.
Monotonic sequence of useful read/hash/transfer events in this attempt; repeated heartbeats do not advance it.
Responses
Section titled “Responses”OK
object
Confirms the renewed lease expiry.
object
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}