Infrastructure/Agents
POSTAgentSince 1.0SynchronousAuth Required
AcquireLock
Acquire an exclusive operation lock on a specific agent to prevent concurrent changes
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Request Inputs
Body Fields
lockObjectRequiredThe lock value
agentIdStringUUID of the agent to acquire the lock on
Example: agent-abc123-def456
operationTypeStringType of operation requiring the lock (e.g. upgrade, restart)
Example: upgrade
holderStringIdentity of the lock holder (user or system component)
Example: upgrade-service
ttlSecondsIntegerLock expiry duration in seconds
Example: 300
Responses
Endpoint
POST/api/v1/agents/locks
/api/v1/agents/locks
Request Example
curl -X POST '{host}/api/v1/agents/locks' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"lock":{"agentId":"agent-abc123-def456","operationType":"upgrade","holder":"upgrade-service","ttlSeconds":300}}'
Response Example
200{
"acquired": true,
"lockToken": "lock-token-abc123",
"expiresAt": "example",
"message": "Lock acquired successfully"
}Change History
This API has no change history records yet.
