{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/linode/json-schema/linode-paginated-database-list-schema.json",
  "title": "PaginatedDatabaseList",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/linode-databases-api-openapi.yml#/components/schemas/PaginatedDatabaseList",
  "allOf": [
    {
      "$ref": "#/$defs/Pagination"
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Database"
          }
        }
      }
    }
  ],
  "$defs": {
    "Database": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The unique ID of this database."
        },
        "label": {
          "type": "string",
          "description": "The label of this database."
        },
        "engine": {
          "type": "string",
          "description": "The database engine and version."
        },
        "type": {
          "type": "string",
          "description": "The Linode type for database nodes."
        },
        "region": {
          "type": "string",
          "description": "The region where this database is located."
        },
        "status": {
          "type": "string",
          "enum": [
            "provisioning",
            "active",
            "suspending",
            "suspended",
            "resuming",
            "restoring",
            "failed",
            "degraded",
            "updating",
            "backing_up"
          ],
          "description": "The current status of this database."
        },
        "cluster_size": {
          "type": "integer",
          "enum": [
            1,
            3
          ],
          "description": "The number of nodes in the database cluster."
        },
        "hosts": {
          "type": "object",
          "properties": {
            "primary": {
              "type": "string",
              "description": "The primary host for this database."
            },
            "secondary": {
              "type": "string",
              "description": "The secondary host for this database."
            }
          },
          "description": "The connection endpoints for this database."
        },
        "port": {
          "type": "integer",
          "description": "The port for database connections."
        },
        "ssl_connection": {
          "type": "boolean",
          "description": "Whether SSL is required for connections."
        },
        "allow_list": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "IP addresses or CIDRs allowed to connect."
        },
        "created": {
          "type": "string",
          "format": "date-time",
          "description": "When this database was created."
        },
        "updated": {
          "type": "string",
          "format": "date-time",
          "description": "When this database was last updated."
        }
      }
    },
    "Pagination": {
      "type": "object",
      "properties": {
        "page": {
          "type": "integer",
          "description": "The current page number."
        },
        "pages": {
          "type": "integer",
          "description": "The total number of pages."
        },
        "results": {
          "type": "integer",
          "description": "The total number of results."
        }
      }
    }
  }
}