Request Queue Lock Storage (v1.0)

http://localhost:9130

Table of contents

Request Queue Lock API

Storage for request queue locks

Request queue lock storage

POST /request-queue-lock-storage

Create a lock for an item or instance request queue

POST /request-queue-lock-storage
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "description": "A request to acquire a request queue lock",
  "additionalProperties": false,
  "required": [
    "queueType",
    "queueId",
    "ttlMs"
  ],
  "properties": {
    "queueType": {
      "description": "The kind of request queue protected by the lock",
      "type": "string",
      "enum": [
        "INSTANCE",
        "ITEM"
      ]
    },
    "queueId": {
      "description": "Instance or item ID identifying the queue",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "type": "string",
      "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
    },
    "ttlMs": {
      "description": "Time to live for the lock in milliseconds",
      "type": "integer",
      "minimum": 1
    }
  }
}

Example:

{
  "queueType": "INSTANCE",
  "queueId": "11111111-1111-4111-8111-111111111111",
  "ttlMs": 10000
}

Response 201

Request queue lock created

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "description": "A request queue lock",
  "additionalProperties": false,
  "required": [
    "id",
    "queueType",
    "queueId",
    "createdAt",
    "expiresAt"
  ],
  "properties": {
    "id": {
      "description": "ID of the lock",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "type": "string",
      "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
    },
    "queueType": {
      "description": "The kind of request queue protected by the lock",
      "type": "string",
      "enum": [
        "INSTANCE",
        "ITEM"
      ]
    },
    "queueId": {
      "description": "Instance or item ID identifying the queue",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "type": "string",
      "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
    },
    "createdAt": {
      "description": "Date and time when the lock was acquired",
      "type": "string",
      "format": "date-time"
    },
    "expiresAt": {
      "description": "Date and time when the lock becomes reclaimable",
      "type": "string",
      "format": "date-time"
    }
  }
}

Example:

{
  "id": "22222222-2222-4222-8222-222222222222",
  "queueType": "INSTANCE",
  "queueId": "11111111-1111-4111-8111-111111111111",
  "createdAt": "2026-09-23T10:00:00.000Z",
  "expiresAt": "2026-09-23T10:00:10.000Z"
}

Response 400

Invalid request

Body

Media type: text/plain

Type: any

Response 409

The request queue is already locked

Body

Media type: text/plain

Type: any

Response 422

Validation errors

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "errors.schema",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "id": "error.schema",
        "description": "An error",
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message text"
          },
          "type": {
            "type": "string",
            "description": "Error message type"
          },
          "code": {
            "type": "string",
            "description": "Error message code"
          },
          "parameters": {
            "description": "Error message parameters",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "parameters.schema",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              }
            }
          }
        },
        "required": [
          "message"
        ]
      }
    },
    "total_records": {
      "description": "Total number of errors",
      "type": "integer"
    }
  }
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

DELETE /request-queue-lock-storage/{lockId}

Delete a request queue lock

DELETE /request-queue-lock-storage/{lockId}
URI Parameters
  • lockId: required (string)

Response 204

Request queue lock deleted

Response 400

Invalid lock ID

Body

Media type: text/plain

Type: any

Response 500

Internal server error

Body

Media type: text/plain

Type: any