Sort Extension

Fetch sortable fields for /search

Changed on

This endpoint returns a list of properties (or aliases) that can be used in the sortby parameter for the cross-collection item search (i.e. GET /search and POST /search). It returns a JSON Schema that defines the properties allowed in sortby. The precise definition of this can be found in the OGC API - Features - Part 5: Schemas.

get/sortables

Request

  • Base URL
    https://data.geo.admin.ch/api/stac/v1
  • Auth
    none declared

Response

A JSON Schema defining the properties allowed in sortby.

$schema'https://json-schema.org/draft/2020-12/schema' url required
$idstring url required
titlestring
type'object' required
additionalPropertiesboolean

If additionalProperties is not included, any property name is valid in a sorting expression on the collection that is evaluated by the server and the property reference SHALL evaluate to null, if the property does not exist for a resource.

If additionalProperties is set to false, property references that are not explicitly declared in the sortables schema SHALL result in a 400 response.

Example response

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://data.geo.admin.ch/api/stac/v1/sortables",
  "title": "Sortables",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "collection": {
      "type": "string"
    },
    "properties.datetime": {
      "type": "string",
      "format": "date-time"
    },
    "properties.title": {
      "type": "string"
    },
    "properties.created": {
      "type": "string",
      "format": "date-time"
    },
    "properties.updated": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Changes

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status