openapi: 3.0.1
info:
  title: Image mosaicks discovery and management interface
  contact:
    name: Claudius Ptolomaeus - The Ancient Geographers
    email: claudius.ptolomaeus@gmail.com
  version: 2.18-SNAPSHOT
externalDocs:
  description: Images specification
  url: https://app.swaggerhub.com/apis/UAB-CREAF/ogc-api-images-opf-xml/1.0.0
servers:
- url: http://service.datacove.eu/geoserver/ogc/images
  description: This server
tags:
- name: OGC API Common
  description: Common characteristics of this API
- name: Images
  description: access to Images
- name: Manage Images
  description: Creation, modification of deletion of images
paths:
  /:
    get:
      tags:
      - OGC API Common
      summary: landing page
      description: The landing page provides links to the API definition, the conformance
        statements and to the feature collections in this dataset.
      operationId: getLandingPage
      parameters:
      - $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/parameters/f-json-html
      responses:
        "200":
          description: Links to the API capabilities shared by this API.
          content:
            application/x-yaml:
              schema:
                type: string
                format: binary
            application/json:
              schema:
                type: string
                format: binary
            application/cbor:
              schema:
                type: string
                format: binary
            text/html:
              schema:
                type: string
        "500":
          $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/responses/ServerError
  /conformance:
    get:
      tags:
      - OGC API Common
      summary: information about specifications that this API conforms to
      description: "A list of all requirements classes specified in a standard that\
        \ the \nserver conforms to."
      operationId: getConformanceDeclaration
      parameters:
      - $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/parameters/f-json
      responses:
        "200":
          description: "the URIs of all requirements classes supported by \nthis API\
            \        "
          content:
            application/x-yaml:
              schema:
                type: string
                format: binary
            application/json:
              schema:
                type: string
                format: binary
            application/cbor:
              schema:
                type: string
                format: binary
            text/html:
              schema:
                type: string
        "400":
          $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/responses/InvalidParam
        "406":
          $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/responses/UnsupportedFormat
        "500":
          $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/responses/ServerError
  /collections:
    get:
      tags:
      - OGC API Common
      summary: the collections in the dataset
      operationId: getCollections
      parameters:
      - $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/parameters/f-json-html
      responses:
        "200":
          content:
            application/x-yaml:
              schema:
                type: string
                format: binary
            application/json:
              schema:
                type: string
                format: binary
            application/cbor:
              schema:
                type: string
                format: binary
            text/html:
              schema:
                type: string
          $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/responses/Collections
        "500":
          $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/responses/ServerError
  /collections/{collectionId}:
    get:
      tags:
      - OGC API Common
      summary: describe a collection
      operationId: describeCollection
      parameters:
      - $ref: '#/components/parameters/collectionId'
      - $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/parameters/f-json-html
      responses:
        "200":
          description: Metadata about the collection including image list
          content:
            application/x-yaml:
              schema:
                type: string
                format: binary
            application/json:
              schema:
                type: string
                format: binary
            application/cbor:
              schema:
                type: string
                format: binary
            text/html:
              schema:
                type: string
        "404":
          $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/responses/NotFound
        "500":
          $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/responses/ServerError
  /collections/{collectionId}/images:
    get:
      tags:
      - Images
      summary: retrieve images of the collection
      operationId: getImages
      parameters:
      - $ref: '#/components/parameters/collectionId'
      - $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/parameters/limit
      - $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/parameters/offset
      - $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/parameters/bbox
      - $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/parameters/datetime
      - $ref: '#/components/parameters/f-stac-html'
      responses:
        "200":
          description: |-
            Information about the feature collection plus the first features
            matching the selection parameters.
          content:
            application/stac.collection+json:
              schema:
                $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-images/1.0.0#/components/schemas/stacCollection
            text/html:
              schema:
                type: string
        "404":
          $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/responses/NotFound
        "500":
          $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/responses/ServerError
    post:
      tags:
      - Manage images
      summary: adds a new image
      description: |-
        Adds an image to the image collection
        The URI of the new image is returned in the header `Location`.
        This operation is only available to registered image authors.
      operationId: addImage
      parameters:
      - $ref: '#/components/parameters/collectionId'
      requestBody:
        description: image to be added in the form of a STAC document
        content:
          image/geo+tiff:
            schema:
              type: string
              format: binary
          application/vnd.ogc.multipart;container=application/x-zip-compressed;images=geo+tiff:
            schema:
              type: string
              format: binary
          application/vnd.ogc.multipart;container=application/x-zip-compressed;images=geo+tiff;description=application/stac.item+json:
            schema:
              type: string
              format: binary
      responses:
        "201":
          $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/responses/Created
        "400":
          $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/responses/Invalid
        "401":
          $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/responses/UnauthorizedAccess
        "409":
          $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/responses/AlreadyExist
      security:
      - BasicAuth: []
  /collections/{collectionId}/images/{imageId}:
    get:
      tags:
      - Images
      summary: fetch a image
      operationId: getImage
      parameters:
      - $ref: '#/components/parameters/collectionId'
      - $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-images/1.0.0#/components/parameters/imageId
      - $ref: '#/components/parameters/f-stac-html'
      responses:
        "200":
          description: An image.
          content:
            application/stac.item+json:
              schema:
                $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-images/1.0.0#/components/schemas/stacItemImage
            text/html:
              schema:
                type: string
        "404":
          $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/responses/NotFound
        "500":
          $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/responses/ServerError
    put:
      tags:
      - Manage images
      summary: replace an image resource or add a new one
      description: |-
        Replace an existing image with the id `imageId`. If no such image exists, a new resource with that id is added.
        The resource will only by available in the native format in which the resource is posted. There is no support for         automated conversions to other representations.

        This operation is only available to registered image authors.
      operationId: updateImage
      parameters:
      - $ref: '#/components/parameters/collectionId'
      - $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-images/1.0.0#/components/parameters/imageId
      requestBody:
        description: A single image resource.
        content:
          application/stac.item+json:
            schema:
              $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-images/1.0.0#/components/schemas/stacItem
          image/geo+tiff:
            schema:
              type: string
              format: binary
          application/vnd.ogc.multipart;container=application/x-zip-compressed;images=geo+tiff:
            schema:
              type: string
              format: binary
          application/vnd.ogc.multipart;container=application/x-zip-compressed;images=geo+tiff;description=application/stac.item+json:
            schema:
              type: string
              format: binary
      responses:
        "204":
          $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/responses/Updated
        "401":
          $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/responses/UnauthorizedAccess
      security:
      - BasicAuth: []
    delete:
      tags:
      - Manage images
      summary: delete an image resource
      description: "Delete an existing image with the id `imageId`. If no \nsuch resource\
        \ exists, an error is returned.\nThis operation is only available to registered\
        \ image authors."
      operationId: deleteImage
      parameters:
      - $ref: '#/components/parameters/collectionId'
      - $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-images/1.0.0#/components/parameters/imageId
      responses:
        "204":
          $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/responses/Deleted
        "401":
          $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/responses/UnauthorizedAccess
        "404":
          $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/responses/NotFound
      security:
      - BasicAuth: []
components:
  schemas:
    collection:
      allOf:
      - $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/schemas/collection
      - $ref: '#/components/schemas/collection-link'
    collection-link:
      required:
      - links
      type: object
      properties:
        links:
          type: array
          example:
          - $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/examples/link-collection-describedBy
          - $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/examples/link-collection-license-html
          - $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/examples/link-collection-license-rdf
          - href: http://data.example.com/collections/buildings/images
            rel: image
            type: image/geotiff
          items:
            $ref: https://api.swaggerhub.com/domains/UAB-CREAF/ogc-api-common/1.0.0#/components/schemas/link
  parameters:
    collectionId:
      name: collectionId
      in: path
      description: Identifier (name) of a specific collection
      required: true
      schema:
        type: string
        enum: []
    f-stac-html:
      name: f
      in: query
      description: |-
        The format of the response. If no value is provided, the standard http rules apply, i.e., the accept header is used to determine the format.

        Pre-defined values are "application/stac+json" and "test/html".
      required: false
      style: form
      explode: false
      schema:
        type: string
        enum:
        - application/stac.collection+json
        - text/html
      example: application/stac.collection+json