Lock API (0.1.0)

Download OpenAPI specification:

The Lock API allows clients to create, retrieve, and delete locks.

Get Locks

Get all locks from the database

Note: Use with caution on large datasets as this performs a full table scan

query Parameters
offset
integer (Offset) >= 0
Default: 0

Number of items to skip for pagination

limit
integer (Limit) [ 1 .. 100 ]
Default: 100

Maximum number of items to return

header Parameters
required
Authorization (string) or Authorization (null) (Authorization)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create Lock

Create a new lock

header Parameters
required
Authorization (string) or Authorization (null) (Authorization)
Request Body schema: application/json
required
lock_key
required
string (Lock Key) [ 1 .. 100 ] characters
expiration
required
integer (Expiration)

Responses

Request samples

Content type
application/json
{
  • "lock_key": "string",
  • "expiration": 0
}

Response samples

Content type
application/json
{
  • "lock_key": "string",
  • "created_at": 0,
  • "last_updated_at": 0,
  • "expiration": 0
}

Update Lock

Create a new lock

path Parameters
lock_key
required
string (Lock Key)
header Parameters
required
Authorization (string) or Authorization (null) (Authorization)
Request Body schema: application/json
required
expiration
required
integer (Expiration)

Responses

Request samples

Content type
application/json
{
  • "expiration": 0
}

Response samples

Content type
application/json
{
  • "lock_key": "string",
  • "created_at": 0,
  • "last_updated_at": 0,
  • "expiration": 0
}

Get Lock

Get all locks with a specific lock_id (across all clients)

  • lock_id: The lock identifier
path Parameters
lock_key
required
string (Lock Key)
header Parameters
required
Authorization (string) or Authorization (null) (Authorization)

Responses

Response samples

Content type
application/json
{
  • "lock_key": "string",
  • "created_at": 0,
  • "last_updated_at": 0,
  • "expiration": 0
}

Delete Lock

Delete a lock by lock_id and client_id

  • lock_id: The lock identifier
path Parameters
lock_key
required
string (Lock Key)
header Parameters
required
Authorization (string) or Authorization (null) (Authorization)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}