Skip to main content
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

  • lockObjectRequired

    The lock value

    • agentIdString

      UUID of the agent to acquire the lock on

      Example: agent-abc123-def456

    • operationTypeString

      Type of operation requiring the lock (e.g. upgrade, restart)

      Example: upgrade

    • holderString

      Identity of the lock holder (user or system component)

      Example: upgrade-service

    • ttlSecondsInteger

      Lock expiry duration in seconds

      Example: 300

Responses

200 OK

On success, this API returns the following response structure.

  • acquiredBoolean

    Whether the lock was successfully acquired

    Example: true

  • lockTokenString

    Token used to identify and release the lock

    Example: lock-token-abc123

  • expiresAtString

    Expires at

    Example: 2026-01-15T08:00:00Z

  • messageString

    Informational message about the lock acquisition result

    Example: Lock acquired successfully

Endpoint

POST/api/v1/agents/locks

/api/v1/agents/locks

Operation ID

AcquireLock

Permalink

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.

View all change history