{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/blacksky/json-schema/blacksky-staccollection-schema.json",
  "title": "Collection",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/blacksky-data-management-api-openapi.yml#/components/schemas/STACCollection",
  "required": [
    "description",
    "extent",
    "id",
    "license",
    "links",
    "stac_extensions",
    "stac_version"
  ],
  "type": "object",
  "properties": {
    "assets": {
      "title": "Assets",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/Asset"
      },
      "description": "Geospatial assets.\n",
      "default": {}
    },
    "links": {
      "title": "Links",
      "type": "array",
      "description": "Links related to the item. Use to navigate through objects.\n",
      "items": {
        "$ref": "#/$defs/Link"
      }
    },
    "stac_extensions": {
      "title": "STAC extensions",
      "type": "array",
      "description": "STAC extensions activated for the resource.\n",
      "items": {
        "type": "string"
      }
    },
    "title": {
      "title": "Title",
      "type": [
        "string",
        "null"
      ],
      "description": "The title of the resource.\n"
    },
    "description": {
      "title": "Description",
      "type": "string",
      "description": "The description of the resource.\n"
    },
    "keywords": {
      "title": "Keywords",
      "type": "array",
      "description": "The keywords for the STAC collection.",
      "items": {
        "type": "string"
      }
    },
    "license": {
      "title": "License",
      "type": "string",
      "description": "The STAC collection data license type."
    },
    "providers": {
      "title": "Providers",
      "type": "array",
      "description": "A list of providers associated with the STAC collection.",
      "items": {
        "$ref": "#/$defs/STACProvider"
      }
    },
    "extent": {
      "title": "Collection extent",
      "description": "The spatiotemporal extent of the STAC collection.",
      "allOf": [
        {
          "$ref": "#/$defs/Extent"
        }
      ]
    },
    "stac_version": {
      "title": "STAC API version",
      "type": "string",
      "description": "The UP42 STAC API version."
    },
    "type": {
      "title": "STAC object type",
      "type": "string",
      "description": "The type of resource.\n",
      "default": "Collection",
      "enum": [
        "Collection"
      ]
    },
    "id": {
      "title": "Identifier",
      "type": "string",
      "description": "The resource ID.",
      "format": "uuid"
    }
  },
  "$defs": {
    "Asset": {
      "title": "Asset",
      "required": [
        "href"
      ],
      "type": "object",
      "properties": {
        "href": {
          "title": "Data URL",
          "type": "string",
          "description": "The URL of a downloadable or a streamable file related to the STAC asset."
        },
        "title": {
          "title": "Data title",
          "type": [
            "string",
            "null"
          ],
          "description": "The STAC asset title."
        },
        "description": {
          "title": "Data description",
          "type": [
            "string",
            "null"
          ],
          "description": "The STAC asset description."
        },
        "type": {
          "title": "Data media type",
          "type": "string",
          "description": "The STAC asset data type."
        },
        "roles": {
          "title": "Data role",
          "type": [
            "array",
            "null"
          ],
          "description": "The purpose of the STAC asset.",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Extent": {
      "title": "Extent",
      "required": [
        "spatial",
        "temporal"
      ],
      "type": "object",
      "properties": {
        "spatial": {
          "title": "Spatial extent",
          "description": "Spatial characteristics.",
          "allOf": [
            {
              "$ref": "#/$defs/SpatialExtent"
            }
          ]
        },
        "temporal": {
          "title": "Temporal extent",
          "description": "Temporal characteristics.",
          "allOf": [
            {
              "$ref": "#/$defs/TemporalExtent"
            }
          ]
        }
      }
    },
    "Link": {
      "type": "object",
      "properties": {
        "rel": {
          "type": "string"
        },
        "href": {
          "type": "string"
        }
      }
    },
    "STACProvider": {
      "title": "Provider",
      "required": [
        "name"
      ],
      "type": "object",
      "properties": {
        "name": {
          "title": "Provider name",
          "type": "string",
          "description": "The name of the provider."
        },
        "roles": {
          "title": "Provider role",
          "type": [
            "array",
            "null"
          ],
          "description": "The role of the provider.",
          "items": {
            "type": "string"
          }
        },
        "url": {
          "title": "Provider website",
          "type": [
            "string",
            "null"
          ],
          "description": "The link to the provider's website."
        }
      }
    },
    "SpatialExtent": {
      "title": "SpatialExtent",
      "required": [
        "bbox"
      ],
      "type": "object",
      "properties": {
        "bbox": {
          "title": "Bounding box",
          "type": "array",
          "description": "The bounding box that encloses all STAC items of the STAC collection.",
          "items": {
            "anyOf": [
              {
                "maxItems": 4,
                "minItems": 4,
                "type": "array",
                "items": {
                  "type": "number"
                }
              },
              {
                "maxItems": 6,
                "minItems": 6,
                "type": "array",
                "items": {
                  "type": "number"
                }
              }
            ]
          }
        }
      }
    },
    "TemporalExtent": {
      "title": "TemporalExtent",
      "required": [
        "interval"
      ],
      "type": "object",
      "properties": {
        "interval": {
          "title": "Datetime interval",
          "type": "array",
          "description": "The datetime interval that spans all STAC items of the STAC collection.",
          "items": {
            "type": "array",
            "items": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        }
      }
    }
  }
}