Skip to content

Leases the next backup-only command assigned to this Agent.

POST
/api/workspace/file-protection/agent/v1/commands:lease
curl --request POST \
--url https://example.com/api/workspace/file-protection/agent/v1/commands:lease \
--header 'Content-Type: application/json' \
--header 'X-Moltaro-File-Protection-Agent: <X-Moltaro-File-Protection-Agent>' \
--data '{ "AgentVersion": "example", "ProtocolVersion": "example", "MaximumConcurrentOperations": 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.

Requests the next command assigned to the authenticated Agent.

object
AgentVersion
string
nullable
ProtocolVersion
string
nullable
MaximumConcurrentOperations
integer format: int32
Examplegenerated
{
"AgentVersion": "example",
"ProtocolVersion": "example",
"MaximumConcurrentOperations": 1
}

OK

Media typeapplication/json
object
Data

Result of leasing. A missing command is a normal idle response.

object
Command

One leased backup-only command with exact repository custody; Source master secrets stay on the server.

object
CommandId
string
nullable
Kind

Supported backup command kinds. Restore is deliberately absent.

integer format: int32
Allowed values: 0
SourceId
string
nullable
LeaseToken
string
nullable
LeaseExpiresAtUtc
string format: date-time
ConfirmedSourceKind

Source selector interpreted only by the local Agent.

integer format: int32
Allowed values: 0 1 2
SourceKindDeclarationRevision
string format: uuid
nullable
SourceRepository

One immutable writer target; the password is the actual Kopia password, never the Source master key.

object
BindingId
string
nullable
Revision
string format: uuid
RepositoryId
string
nullable
RepositoryPrefix
string
nullable
RepositoryPassword
string
nullable
ExpectedFingerprint
string
nullable
RequireExisting
boolean
MayProposeBootstrap
boolean
SourceTreeBaseline

Previously verified V2 content; never supplied for a Pending or legacy-only Source binding.

object
RecoveryPointId
string
nullable
Snapshot

One shared tree identity, including an empty root; logical items never carry its password.

object
SourceId
string
nullable
RepositoryBindingRevision
string format: uuid
RepositoryId
string
nullable
RepositoryFingerprint
string
nullable
SnapshotId
string
nullable
RootKind

The type of the Kopia snapshot root, not the Source selector.

integer format: int32
Allowed values: 0 1
RootPath
string
nullable
CaptureStartedAtUtc
string format: date-time
CaptureCompletedAtUtc
string format: date-time
ManifestDigest
string
nullable
Items
Array<object>
nullable

Safe logical recovery metadata; no Kopia object/chunk keys are exposed.

object
LogicalPath
string
nullable
IsDirectory
boolean
SizeBytes
integer format: int64
Sha256
string
nullable
RepositorySnapshot

Verified single-file snapshot identity. This metadata is internal to the Agent protocol.

object
RepositoryId
string
nullable
SnapshotId
string
nullable
RepositoryFingerprint
string
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
{
"Data": {
"Command": {
"Kind": 0,
"ConfirmedSourceKind": 0,
"SourceTreeBaseline": {
"Snapshot": {
"RootKind": 0
}
}
}
},
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}