{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/contabo/json-schema/contabo-list-image-response-schema.json",
  "title": "ListImageResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/contabo-images-api-openapi.yml#/components/schemas/ListImageResponse",
  "type": "object",
  "properties": {
    "_pagination": {
      "description": "Data about pagination like how many results, pages, page size.",
      "allOf": [
        {
          "$ref": "#/$defs/PaginationMeta"
        }
      ]
    },
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ListImageResponseData"
      }
    },
    "_links": {
      "allOf": [
        {
          "$ref": "#/$defs/Links"
        }
      ]
    }
  },
  "required": [
    "_pagination",
    "data",
    "_links"
  ],
  "$defs": {
    "AssignedTagResponse": {
      "type": "object",
      "properties": {
        "tagId": {
          "type": "number",
          "description": "Tag's id"
        },
        "tagName": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255,
          "description": "Tag's name"
        }
      },
      "required": [
        "tagId",
        "tagName"
      ]
    },
    "Links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "string",
          "description": "Link to current resource."
        },
        "first": {
          "type": "string",
          "description": "Link to first page, if applicable."
        },
        "previous": {
          "type": "string",
          "description": "Link to previous page, if applicable."
        },
        "next": {
          "type": "string",
          "description": "Link to next page, if applicable."
        },
        "last": {
          "type": "string",
          "description": "Link to last page, if applicable."
        }
      },
      "required": [
        "self",
        "first",
        "last"
      ]
    },
    "ListImageResponseData": {
      "type": "object",
      "properties": {
        "imageId": {
          "type": "string",
          "description": "Image's id"
        },
        "tenantId": {
          "type": "string",
          "minLength": 1,
          "description": "Your customer tenant id",
          "enum": [
            "DE",
            "INT"
          ]
        },
        "customerId": {
          "type": "string",
          "minLength": 1,
          "description": "Customer ID"
        },
        "name": {
          "type": "string",
          "description": "Image Name"
        },
        "description": {
          "type": "string",
          "description": "Image Description"
        },
        "url": {
          "type": "string",
          "description": "URL from where the image has been downloaded / provided."
        },
        "sizeMb": {
          "type": "number",
          "description": "Image Size in MB"
        },
        "uploadedSizeMb": {
          "type": "number",
          "description": "Image Uploaded Size in MB"
        },
        "osType": {
          "type": "string",
          "description": "Type of operating system (OS)"
        },
        "version": {
          "type": "string",
          "description": "Version number to distinguish the contents of an image. Could be the version of the operating system for example."
        },
        "format": {
          "type": "string",
          "description": "Image format",
          "enum": [
            "iso",
            "qcow2"
          ]
        },
        "status": {
          "type": "string",
          "description": "Image status (e.g. if image is still downloading)"
        },
        "errorMessage": {
          "type": "string",
          "description": "Image download error message"
        },
        "standardImage": {
          "type": "boolean",
          "description": "Flag indicating that image is either a standard (true) or a custom image (false)"
        },
        "gpu": {
          "type": "boolean",
          "description": "Flag indicating that image can be used for GPU product."
        },
        "creationDate": {
          "type": "string",
          "format": "date-time",
          "description": "The creation date time for the image"
        },
        "lastModifiedDate": {
          "type": "string",
          "format": "date-time",
          "description": "The last modified date time for the image"
        },
        "tags": {
          "description": "The tags assigned to the image",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AssignedTagResponse"
          }
        }
      },
      "required": [
        "imageId",
        "tenantId",
        "customerId",
        "name",
        "description",
        "url",
        "sizeMb",
        "uploadedSizeMb",
        "osType",
        "version",
        "format",
        "status",
        "errorMessage",
        "standardImage",
        "gpu",
        "creationDate",
        "lastModifiedDate",
        "tags"
      ]
    },
    "PaginationMeta": {
      "type": "object",
      "properties": {
        "size": {
          "type": "number",
          "description": "Number of elements per page."
        },
        "totalElements": {
          "type": "number",
          "description": "Number of overall matched elements."
        },
        "totalPages": {
          "type": "number",
          "description": "Overall number of pages."
        },
        "page": {
          "type": "number",
          "description": "Current number of page."
        }
      },
      "required": [
        "size",
        "totalElements",
        "totalPages",
        "page"
      ]
    }
  }
}