{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/airbus-oneatlas/refs/heads/main/json-schema/oneatlas-search-options-schema.json",
  "title": "SearchOptions",
  "type": "object",
  "properties": {
    "acquisitionDate": {
      "description": "The acquisition date or the acquisition date range.",
      "oneOf": [
        {
          "description": "The acquisition date.",
          "example": "2017-08-29T00:00:00Z",
          "format": "date-time",
          "type": "string"
        },
        {
          "description": "The acquisition dates range.\n\nRanges are expressed as follow:\n  - Comma to separate start value from end value\n  - Start value or end value can be omitted (it means values are infinite)\n  - Start with `[` means *start value is included*\n  - Start with `]` means *start value is excluded*\n  - End with `[` means *end value is included*\n  - End with `]` means *end value is excluded*",
          "example": "[2017-08-29T00:00:00Z",
          "format": "date-time-range",
          "type": "string"
        }
      ]
    },
    "bbox": {
      "description": "The geographic search area expressed as a bbox string (decimal degrees values  separated by a comma). Values are min lon,min lat, max lon, max lat.",
      "example": "1.8292,48.5821,2.9718,49.0811",
      "type": "string"
    },
    "cloudCover": {
      "description": "The cloud cover percentage or the cloud cover percentage range.",
      "oneOf": [
        {
          "description": "The cloud cover percentage from 0 to 100.",
          "example": "5",
          "format": "float",
          "type": "number"
        },
        {
          "description": "The cloud cover percentages range\n\nRanges are expressed as follow:\n  - Comma to separate start value from end value\n  - Start value or end value can be omitted (it means values are infinite)\n  - Start with `[` means *start value is included*\n  - Start with `]` means *start value is excluded*\n  - End with `[` means *end value is included*\n  - End with `]` means *end value is excluded*",
          "example": "5[",
          "format": "float-range",
          "type": "string"
        }
      ]
    },
    "commercialReference": {
      "description": "The commercial reference.",
      "example": "SO17011862-6",
      "type": "string"
    },
    "constellation": {
      "description": "The constellation or constellation list (comma separated list). Possible values will be described in a future endpoint (*/api/v1/opensearch/domains/constellation*).",
      "example": "PHR,Sentinel",
      "type": "string"
    },
    "correlationId": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Id"
        },
        {
          "description": "The correlation id or correlation id list (comma separated list). The correlation id is used to trace features sharing the same `X-Ads-Correlation-Id` header when ingested or processed."
        }
      ]
    },
    "expirationDate": {
      "oneOf": [
        {
          "description": "Date of deletion of the data in the platform and deletion of the metadata item if no other prodution status is defined.",
          "example": "2017-08-29T00:00:00Z",
          "format": "date-time",
          "type": "string"
        },
        {
          "description": "Dates range of deletion of the data in the platform and deletion of the metadata item if no other prodution status is defined.\n\nRanges are expressed as follow:\n  - Comma to separate start value from end value\n  - Start value or end value can be omitted (it means values are infinite)\n  - Start with `[` means *start value is included*\n  - Start with `]` means *start value is excluded*\n  - End with `[` means *end value is included*\n  - End with `]` means *end value is excluded*",
          "example": "[2017-08-29T00:00:00Z",
          "format": "date-time-range",
          "type": "string"
        }
      ]
    },
    "geometry": {
      "description": "The geographic search area.",
      "example": "POLYGON((1 1,5 1,5 5,1 5,1 1))",
      "oneOf": [
        {
          "example": "POLYGON((1 1,5 1,5 5,1 5,1 1))",
          "format": "WKT",
          "type": "string"
        },
        {
          "example": "{type: \"Polygon\", coordinates: [[1, 1], [5, 1], [5, 5], [1, 5], [1, 1]]}",
          "format": "geojson",
          "type": "string"
        },
        {
          "$ref": "#/components/schemas/GeojsonGeometry"
        }
      ]
    },
    "id": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Id"
        },
        {
          "description": "The item id or item id list (comma separated list)."
        }
      ]
    },
    "incidenceAngle": {
      "description": "The incident angle or the incident angle range in degree.",
      "oneOf": [
        {
          "description": "The incident angle in degree.",
          "example": "5.1542",
          "format": "float",
          "type": "number"
        },
        {
          "description": "The incident angle range in degree.\n\nRanges are expressed as follow:\n  - Comma to separate start value from end value\n  - Start value or end value can be omitted (it means values are infinite)\n  - Start with `[` means *start value is included*\n  - Start with `]` means *start value is excluded*\n  - End with `[` means *end value is included*\n  - End with `]` means *end value is excluded*",
          "example": "[80,100]",
          "format": "float-range",
          "type": "string"
        }
      ]
    },
    "itemsPerPage": {
      "default": 50,
      "description": "The maximum number of items that the response can contain.",
      "example": 100,
      "format": "int32",
      "maximum": 500,
      "type": "integer"
    },
    "page": {
      "default": 1,
      "description": "The requested page",
      "example": 1,
      "format": "int32",
      "type": "integer"
    },
    "parentIdentifier": {
      "description": "The parent identifier (identified as sourceId in other catalogs)",
      "example": "DS_SPOT7_201412071054567_FR1_FR1_FR1_FR1_W003N39_01709",
      "type": "string"
    },
    "platform": {
      "description": "The platform or platform list (comma separated list). Possible values will be described in a future endpoint (*/api/v1/opensearch/domains/platform*).",
      "example": "PHR1A",
      "type": "string"
    },
    "productType": {
      "description": "The product type or product type list (comma separated list). Possible values will be described in a future endpoint (*/api/v1/opensearch/domains/productType*).",
      "example": "changeDetectionReport,mono",
      "type": "string"
    },
    "productionStatus": {
      "description": "The production status or production status list (comma separated list).",
      "enum": [
        "IN_CLOUD",
        "ARCHIVED"
      ],
      "example": "IN_CLOUD",
      "type": "string"
    },
    "publicationDate": {
      "description": "The publication date or the publication date range.",
      "oneOf": [
        {
          "description": "The publication date.",
          "example": "2017-08-29T00:00:00Z",
          "format": "date-time",
          "type": "string"
        },
        {
          "description": "The publication dates range.\n\nRanges are expressed as follow:\n  - Comma to separate start value from end value\n  - Start value or end value can be omitted (it means values are infinite)\n  - Start with `[` means *start value is included*\n  - Start with `]` means *start value is excluded*\n  - End with `[` means *end value is included*\n  - End with `]` means *end value is excluded*",
          "example": "[2017-08-29T00:00:00Z",
          "format": "date-time-range",
          "type": "string"
        }
      ]
    },
    "q": {
      "description": "A generic query parameter, will search in productType and title. Search is in \"contains\" mode.",
      "example": "PHR",
      "type": "string"
    },
    "resolution": {
      "description": "The resolution or the resolution range in meters.",
      "oneOf": [
        {
          "description": "The resolution in meters.",
          "example": "10",
          "format": "float",
          "type": "number"
        },
        {
          "description": "The resolution range in meters.\n\nRanges are expressed as follow:\n  - Comma to separate start value from end value\n  - Start value or end value can be omitted (it means values are infinite)\n  - Start with `[` means *start value is included*\n  - Start with `]` means *start value is excluded*\n  - End with `[` means *end value is included*\n  - End with `]` means *end value is excluded*",
          "example": "10]",
          "format": "float-range",
          "type": "number"
        }
      ]
    },
    "snowCover": {
      "description": "The snow cover percentage or the snow cover percentage range.",
      "oneOf": [
        {
          "description": "The snow cover percentage from 0 to 100.",
          "example": "5",
          "format": "float",
          "type": "number"
        },
        {
          "description": "The snow cover percentage range.\n\nRanges are expressed as follow:\n  - Comma to separate start value from end value\n  - Start value or end value can be omitted (it means values are infinite)\n  - Start with `[` means *start value is included*\n  - Start with `]` means *start value is excluded*\n  - End with `[` means *end value is included*\n  - End with `]` means *end value is excluded*",
          "example": "5[",
          "format": "float-range",
          "type": "string"
        }
      ]
    },
    "sortBy": {
      "default": "-acquisitionDate,cloudCover",
      "description": "The order strategy for the items.\n\nAccepted values are all opensearch attributes separated by a comma. Minus sign can be used to sort descending on the attribute. Otherwise the sort is ascending.",
      "example": "-acquisitionDate,cloudCover",
      "type": "string"
    },
    "sourceIdentifier": {
      "description": "The product identifier inside original referential",
      "example": "DS_SPOT7_201412071054567_FR1_FR1_FR1_FR1_W003N39_01709",
      "type": "string"
    },
    "workspace": {
      "description": "The workspace id/name or workspace id/name list (comma separated list)",
      "example": "dc143057-3457-47b3-af19-4ef8d26d2064",
      "type": "string"
    }
  }
}