> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beta.ontoto.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get site

> Returns a single site by UUID, including the devices currently assigned to it.



## OpenAPI

````yaml get /sites/{uuid}
openapi: 3.1.0
info:
  title: Ontoto API
  description: Ontoto backend API
  version: 1.0.0
servers:
  - url: https://api.beta.ontoto.com/v1
security:
  - ApiKeyAuth: []
paths:
  /sites/{uuid}:
    get:
      summary: Get site
      description: >-
        Returns a single site by UUID, including the devices currently assigned
        to it.
      operationId: getSites:uuid
      parameters:
        - in: path
          name: uuid
          schema:
            type: string
            format: uuid
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiteItem'
        '400':
          description: Invalid request format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrBadRequest'
        '401':
          description: Client must be authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrUnauthorized'
        '403':
          description: Client does not have necessary permissions to access the resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrForbidden'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrNotFound'
        '409':
          description: Request could not be completed due to a uniqueness constraint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrConflict'
        '500':
          description: Unexpected server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrInternalServerError'
components:
  schemas:
    SiteItem:
      description: A site represents a physical location for devices
      type: object
      properties:
        uuid:
          description: Unique identifier
          type: string
          format: uuid
        orgUuid:
          description: Organisation the site belongs to
          type: string
          format: uuid
        name:
          description: Site name
          type: string
        description:
          description: Optional description
          anyOf:
            - type: string
            - type: 'null'
        timezone:
          description: >-
            IANA timezone override for devices at this site (e.g.,
            'Australia/Sydney')
          anyOf:
            - type: string
            - type: 'null'
        devices:
          description: Devices assigned to this site, if requested
          anyOf:
            - type: array
              items:
                $ref: '#/components/schemas/DeviceItem'
            - type: 'null'
        gnss:
          description: >-
            GNSS configuration, base stations, and projections for this site.
            Null when not configured.
          anyOf:
            - $ref: '#/components/schemas/SiteGnssConfig'
            - type: 'null'
        sharedBy:
          $ref: '#/components/schemas/SharedBy'
      required:
        - uuid
        - orgUuid
        - name
        - description
        - timezone
      title: SiteItem
    ErrBadRequest:
      example:
        message: Invalid request body
      type: object
      properties:
        message:
          description: Human readable message describing the issue
          type: string
      required:
        - message
      title: ErrBadRequest
    ErrUnauthorized:
      example:
        message: Authentication required
      type: object
      properties:
        message:
          description: Human readable message describing the issue
          type: string
      required:
        - message
      title: ErrUnauthorized
    ErrForbidden:
      example:
        message: You do not have permission to access this resource
      type: object
      properties:
        message:
          description: Human readable message describing the issue
          type: string
      required:
        - message
      title: ErrForbidden
    ErrNotFound:
      example:
        message: Resource not found
      type: object
      properties:
        message:
          description: Human readable message describing the issue
          type: string
      required:
        - message
      title: ErrNotFound
    ErrConflict:
      example:
        message: Duplicate entry
      type: object
      properties:
        message:
          description: Human readable message describing the issue
          type: string
      required:
        - message
      title: ErrConflict
    ErrInternalServerError:
      example:
        message: Internal server error
      type: object
      properties:
        message:
          description: Human readable message describing the issue
          type: string
      required:
        - message
      title: ErrInternalServerError
    DeviceItem:
      description: Device record
      type: object
      properties:
        deviceKind:
          description: Device category discriminator (physical, weather, virtual)
          type: string
          oneOf:
            - const: physical
              title: physical
              description: Physical hardware device
            - const: weather
              title: weather
              description: Virtual device for weather forecast data integration
            - const: virtual
              title: virtual
              description: >-
                User-defined virtual device for external data ingestion or
                archiving
        serialNumber:
          type: string
        alias:
          description: Server-set alias, primary display for UI purposes
          anyOf:
            - type: string
            - type: 'null'
        description:
          description: Optional description
          anyOf:
            - type: string
            - type: 'null'
        name:
          description: >-
            Name synchronised with device. Displayed as fallback if alias is not
            set
          anyOf:
            - type: string
            - type: 'null'
        orgUuid:
          description: Organisation the device belongs to
          type: string
          format: uuid
        legacyDeviceId:
          description: Legacy device id for backwards compatibility
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        site:
          description: Site the device is assigned to, if any
          anyOf:
            - description: Sumary of site
              type: object
              properties:
                uuid:
                  description: Site UUID
                  type: string
                  format: uuid
                name:
                  description: Site name
                  type: string
              required:
                - uuid
                - name
            - type: 'null'
        location:
          description: Device location in WGS84 coordinates
          anyOf:
            - type: object
              properties:
                lat:
                  type: number
                lon:
                  type: number
              required:
                - lat
                - lon
            - type: 'null'
        samplingPeriodSeconds:
          description: Current sampling period in seconds
          anyOf:
            - type: number
            - type: 'null'
        txPeriodSeconds:
          description: Current transmission period in seconds
          anyOf:
            - type: number
            - type: 'null'
        state:
          description: >-
            Device lifecycle state indicating operational status and
            subscription relationship
          type: string
          oneOf:
            - const: testing
              title: testing
              description: Device is undergoing internal hardware testing and validation
            - const: inventory
              title: inventory
              description: >-
                Device is in stock and available for assignment to an
                organisation
            - const: unprovisioned
              title: unprovisioned
              description: >-
                Device is assigned to an organisation but has no active
                subscription
            - const: provisioned
              title: provisioned
              description: >-
                Device has a subscription in the provisioned state and is ready
                to be deployed
            - const: deployed
              title: deployed
              description: >-
                Device is deployed in the field and pending its first
                transmission
            - const: active
              title: active
              description: Device has an active subscription and is currently billing
            - const: suspended
              title: suspended
              description: Device subscription has been suspended
            - const: overdue
              title: overdue
              description: Device subscription is overdue
            - const: retired
              title: retired
              description: Device has been permanently decommissioned
        health:
          description: Health of the device
          type: object
          properties:
            battery:
              description: Current battery health
              example:
                voltage: 3.72
                percentage: 87
                remaining: 10h 15m remaining
                isCharging: false
              type: object
              properties:
                voltage:
                  description: Battery voltage, if supported
                  anyOf:
                    - type: number
                    - type: 'null'
                percentage:
                  description: Battery state of charge as a percentage
                  anyOf:
                    - type: number
                    - type: 'null'
                remaining:
                  description: Estimate of remaining battery life
                  anyOf:
                    - type: string
                    - type: 'null'
                isCharging:
                  description: If supported, whether the battery is currently charging
                  anyOf:
                    - type: boolean
                    - type: 'null'
            connection:
              description: Current connection health
              example:
                lastSeen: '2024-06-15T08:42:11.000Z'
                status: online
                signalStrength:
                  rssi: -71
                  rsrp: -95
                  rsrq: -12
                  signalQuality: good
                error: null
                txSuccessRate: null
                txProtocol: null
                nextTxTimestamp: '2024-06-15T09:42:11.000Z'
              type: object
              properties:
                lastSeen:
                  description: Last transmission timestamp from the device
                  anyOf:
                    - type: string
                      format: date-time
                    - type: 'null'
                status:
                  description: Connection status of the device
                  type: string
                  oneOf:
                    - const: online
                      title: online
                      description: Device is transmitting on its expected schedule
                    - const: offline
                      title: offline
                      description: >-
                        Device has missed two or more consecutive scheduled
                        transmissions
                    - const: degraded
                      title: degraded
                      description: Device has missed its most recent scheduled transmission
                    - const: unknown
                      title: unknown
                      description: Connection status cannot be determined
                signalStrength:
                  description: For LTE devices, the network signal strength
                  anyOf:
                    - description: LTE/NB-IoT RF metrics when available
                      example:
                        rssi: -71
                        rsrp: -95
                        rsrq: -12
                        signalQuality: good
                      type: object
                      properties:
                        rssi:
                          anyOf:
                            - type: number
                            - type: 'null'
                        rsrp:
                          anyOf:
                            - type: number
                            - type: 'null'
                        rsrq:
                          anyOf:
                            - type: number
                            - type: 'null'
                        signalQuality:
                          anyOf:
                            - description: Categorisation of LTE signal strength
                              type: string
                              oneOf:
                                - const: no_signal
                                  title: no_signal
                                  description: No usable signal detected
                                - const: weak
                                  title: weak
                                  description: Signal present but unreliable
                                - const: ok
                                  title: ok
                                  description: Signal sufficient for normal operation
                                - const: good
                                  title: good
                                  description: Strong signal
                            - type: 'null'
                    - type: 'null'
                error:
                  anyOf:
                    - description: >-
                        Structured error from firmware, modem, or ingestion
                        pipeline
                      example:
                        code: 503
                        message: >-
                          Scheduled transmission failed: modem registration
                          timeout
                      type: object
                      properties:
                        code:
                          type: number
                        message:
                          anyOf:
                            - type: string
                            - type: 'null'
                      required:
                        - code
                    - type: 'null'
                txSuccessRate:
                  description: Percentage of successful transmissions, if available
                  anyOf:
                    - type: number
                    - type: 'null'
                txProtocol:
                  description: >-
                    For LTE devices, the protocol used for the last successful
                    transmission
                  anyOf:
                    - description: Current protocol used by NB-IoT devices to transmit data
                      type: string
                      oneOf:
                        - const: coap
                          title: coap
                          description: Constrained Application Protocol (CoAP)
                        - const: mqtt
                          title: mqtt
                          description: Message Queuing Telemetry Transport (MQTT)
                    - type: 'null'
                lteTxMode:
                  description: >-
                    For LTE devices with satellite support, whether the last
                    transmission was via terrestrial or satellite
                  type: string
                  enum:
                    - terrestrial
                    - satellite
                nextTxTimestamp:
                  description: Estimated next scheduled transmission time
                  anyOf:
                    - type: string
                      format: date-time
                    - type: 'null'
              required:
                - status
            sensors:
              description: Current sensor health
              example:
                status: ok
                metadataError: null
                errors: []
                lastDataTimestamp: '2024-06-15T08:41:03.000Z'
              type: object
              properties:
                status:
                  $ref: '#/components/schemas/SensorStatus'
                metadataError:
                  description: Error code from transmission metadata, if any
                  anyOf:
                    - description: >-
                        Structured error from firmware, modem, or ingestion
                        pipeline
                      example:
                        code: 503
                        message: >-
                          Scheduled transmission failed: modem registration
                          timeout
                      type: object
                      properties:
                        code:
                          type: number
                        message:
                          anyOf:
                            - type: string
                            - type: 'null'
                      required:
                        - code
                    - type: 'null'
                errors:
                  description: >-
                    Aggregated summary of sensor errors for the last
                    transmission, grouped by sensor
                  anyOf:
                    - type: array
                      items:
                        type: object
                        properties:
                          sensorAlias:
                            description: Sensor alias
                            type: string
                          parameterFaults:
                            description: Array of parameter errors for the sensor
                            type: array
                            items:
                              type: object
                              properties:
                                parameterAlias:
                                  description: Parameter alias
                                  type: string
                                summary:
                                  description: Summary of the parameter fault
                                  type: object
                                  properties:
                                    reason:
                                      description: >-
                                        Why a parameter's data point was flagged
                                        as faulty
                                      type: string
                                      oneOf:
                                        - const: null_value
                                          title: null_value
                                          description: Value was null
                                        - const: out_of_range
                                          title: out_of_range
                                          description: >-
                                            Value fell outside the configured
                                            operating range
                                        - const: evaluation_error
                                          title: evaluation_error
                                          description: >-
                                            Derived parameter formula failed to
                                            evaluate
                                    message:
                                      description: Message describing the fault
                                      type: string
                                    faultyPointsCount:
                                      description: >-
                                        Number of faulty data points in the last
                                        transmission
                                      type: number
                                    totalPointsCount:
                                      description: >-
                                        Total number of data points in the last
                                        transmission
                                      type: number
                                  required:
                                    - reason
                                    - message
                                    - faultyPointsCount
                                    - totalPointsCount
                              required:
                                - parameterAlias
                                - summary
                        required:
                          - sensorAlias
                          - parameterFaults
                    - type: 'null'
                lastDataTimestamp:
                  description: >-
                    Timestamp of the most recent data point received from the
                    device
                  anyOf:
                    - type: string
                      format: date-time
                    - type: 'null'
              required:
                - status
            powerSource:
              description: >-
                For devices that support multiple power sources, the current
                power source
              anyOf:
                - description: Source the device is currently drawing power from
                  type: string
                  oneOf:
                    - const: battery
                      title: battery
                      description: Running from internal battery
                    - const: external
                      title: external
                      description: Running from an external power supply (mains or solar)
                - type: 'null'
          required:
            - battery
            - connection
            - sensors
        lastTxTimestamp:
          description: Last received transmission timestamp
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        product:
          description: Product name for physical devices
          anyOf:
            - type: string
            - type: 'null'
        hardware:
          description: Hardware details for physical devices
          anyOf:
            - type: object
              properties:
                model:
                  type: string
                revision:
                  type: string
              required:
                - model
                - revision
            - type: 'null'
        modems:
          description: >-
            Modems attached to the device. Some device models may support two
            modems (LTE + satellite)
          type: array
          items:
            type: object
            properties:
              type:
                description: Communications modem hardware type
                type: string
                oneOf:
                  - const: astrocast
                    title: astrocast
                    description: Astrocast satellite modem
                  - const: iridium
                    title: iridium
                    description: Iridium satellite modem
                  - const: lte
                    title: lte
                    description: LTE / NB-IoT cellular modem
                  - const: unknown
                    title: unknown
                    description: Modem type could not be identified
              model:
                type: string
              imei:
                anyOf:
                  - type: string
                  - type: 'null'
              iccid:
                anyOf:
                  - type: string
                  - type: 'null'
              uuid:
                anyOf:
                  - type: string
                  - type: 'null'
            required:
              - type
              - model
        firmware:
          description: Firmware information
          anyOf:
            - type: object
              properties:
                string:
                  type: string
                version:
                  type: string
              required:
                - string
                - version
            - type: 'null'
        sensors:
          description: Sensors attached to the device
          type: array
          items:
            $ref: '#/components/schemas/SensorItem'
        tags:
          description: Tags associated with the device
          type: array
          items:
            type: object
            properties:
              id:
                type: number
              name:
                type: string
              colour:
                anyOf:
                  - type: string
                  - type: 'null'
            required:
              - id
              - name
              - colour
        queuedCommand:
          description: >-
            If a command is currently queued or processing for this device, a
            summary of the command
          anyOf:
            - type: object
              properties:
                uuid:
                  description: Command UUID
                  type: string
                  format: uuid
                status:
                  description: Lifecycle state of a device command
                  type: string
                  oneOf:
                    - const: processing
                      title: processing
                      description: Command is being prepared for transmission
                    - const: queued
                      title: queued
                      description: >-
                        Command is queued and waiting for the device to receive
                        it
                    - const: received
                      title: received
                      description: >-
                        Command has been delivered to and acknowledged by the
                        device
                    - const: cancelled
                      title: cancelled
                      description: Command was cancelled before delivery
                    - const: expired
                      title: expired
                      description: Command was not delivered within its validity window
                    - const: failed
                      title: failed
                      description: Command delivery failed
                createdAt:
                  description: Time command was created
                  type: string
                  format: date-time
              required:
                - uuid
                - status
                - createdAt
            - type: 'null'
        gnss:
          description: For devices with GNSS support, the GNSS processing configuration
          anyOf:
            - description: GNSS processing configuration for a device
              type: object
              properties:
                processingMode:
                  description: GNSS processing mode (static or kinematic)
                  anyOf:
                    - description: GNSS post-processing mode
                      type: string
                      oneOf:
                        - const: static
                          title: static
                          description: >-
                            Rover is assumed stationary; positions are averaged
                            for higher accuracy
                        - const: kinematic
                          title: kinematic
                          description: >-
                            Rover may be moving; positions are computed
                            per-epoch
                    - type: 'null'
                antennaType:
                  description: Antenna model/type string
                  anyOf:
                    - type: string
                    - type: 'null'
                arpHeight:
                  description: >-
                    Antenna reference point (ARP) height in metres, measured
                    from marker to bottom of mounting screw
                  anyOf:
                    - type: number
                    - type: 'null'
                azimuth:
                  description: Azimuth angle of installation in degrees
                  anyOf:
                    - type: number
                    - type: 'null'
                enableLeverArmCompensation:
                  description: >-
                    Whether lever arm compensation is enabled for position
                    correction
                  type: boolean
                isBaseStation:
                  description: >-
                    Whether this device is registered as a GNSS base station. If
                    true, postprocessing config will be unused.
                  type: boolean
                baseStation:
                  description: Reference base station used for GNSS processing
                  anyOf:
                    - type: object
                      properties:
                        id:
                          description: Base station ID
                          type: number
                        type:
                          description: Source of GNSS base station corrections
                          type: string
                          oneOf:
                            - const: cors
                              title: cors
                              description: >-
                                Public Continuously Operating Reference Station
                                network
                            - const: private
                              title: private
                              description: Privately operated reference station
                            - const: device
                              title: device
                              description: >-
                                Another Ontoto GNSS device acting as a base
                                station
                        name:
                          type: string
                        status:
                          description: Operational status of a GNSS base station
                          type: string
                          oneOf:
                            - const: active
                              title: active
                              description: Receiving data on schedule
                            - const: inactive
                              title: inactive
                              description: >-
                                Configured but not currently expected to
                                transmit
                            - const: no_data
                              title: no_data
                              description: No data has been received recently
                            - const: error
                              title: error
                              description: Base station is reporting errors
                            - const: unknown
                              title: unknown
                              description: Status cannot be determined
                        isEnabled:
                          type: boolean
                      required:
                        - id
                        - type
                        - name
                        - status
                        - isEnabled
                    - type: 'null'
                lastProcessingStatus:
                  description: >-
                    Status of the last processing attempt, including optional
                    error message
                  anyOf:
                    - type: object
                      properties:
                        status:
                          description: >-
                            Result of the most recent GNSS post-processing run
                            for a device
                          type: string
                          oneOf:
                            - const: success
                              title: success
                              description: Last run produced a valid solution
                            - const: failed
                              title: failed
                              description: Last run completed with errors
                            - const: pending
                              title: pending
                              description: Run is queued or in progress
                            - const: never_processed
                              title: never_processed
                              description: No processing has been attempted yet
                        error:
                          type: string
                      required:
                        - status
                    - type: 'null'
                lastProcessedAt:
                  description: Timestamp of the last processing attempt
                  anyOf:
                    - type: string
                      format: date-time
                    - type: 'null'
              required:
                - enableLeverArmCompensation
                - isBaseStation
            - type: 'null'
        sharedBy:
          description: Present when this device is shared from another organisation
          anyOf:
            - $ref: '#/components/schemas/SharedBy'
            - type: 'null'
      required:
        - deviceKind
        - serialNumber
        - alias
        - description
        - name
        - orgUuid
        - legacyDeviceId
        - location
        - samplingPeriodSeconds
        - txPeriodSeconds
        - state
        - health
        - lastTxTimestamp
        - product
        - hardware
        - modems
        - firmware
        - tags
      title: DeviceItem
    SiteGnssConfig:
      description: GNSS configuration and related data for a site
      type: object
      properties:
        verticalDatum:
          description: >-
            Default vertical datum for orthometric projections (e.g. 'AHD',
            'NAVD88')
          anyOf:
            - type: string
            - type: 'null'
        geoidModel:
          description: >-
            Geoid model used for ellipsoidal-to-orthometric height conversion
            (e.g. 'ausgeoid2020')
          anyOf:
            - description: Geoid model used for orthometric height conversion
              type: string
              oneOf:
                - const: ausgeoid2020
                  title: ausgeoid2020
                  description: AUSGeoid2020 (current Australian model)
                - const: ausgeoid09
                  title: ausgeoid09
                  description: AUSGeoid09 (legacy Australian model)
                - const: ausgeoid98
                  title: ausgeoid98
                  description: AUSGeoid98 (legacy Australian model)
            - type: 'null'
        baseStations:
          description: Base stations linked to this site, ordered by priority
          type: array
          items:
            $ref: '#/components/schemas/SiteGnssBaseStationLink'
        projections:
          description: Coordinate projection definitions for this site
          type: array
          items:
            description: Site projection definition
            anyOf:
              - description: Standard EPSG-based site projection
                type: object
                properties:
                  id:
                    description: Database projection id
                    type: number
                  label:
                    description: Human-readable projection name
                    type: string
                  verticalDatum:
                    description: >-
                      Vertical datum label override; inherited from site config
                      when null
                    anyOf:
                      - type: string
                      - type: 'null'
                  heightType:
                    description: Height datum type (ellipsoidal or orthometric)
                    type: string
                    oneOf:
                      - const: ellipsoidal
                        title: ellipsoidal
                        description: Height above the reference ellipsoid (e.g. WGS84)
                      - const: orthometric
                        title: orthometric
                        description: Height above the geoid (mean sea level)
                  projectionType:
                    type: string
                    const: standard
                  srid:
                    description: EPSG code for the projection
                    type: number
                required:
                  - id
                  - label
                  - verticalDatum
                  - heightType
                  - projectionType
                  - srid
              - description: 2D Helmert transform with optional vertical correction
                type: object
                properties:
                  id:
                    description: Database projection id
                    type: number
                  label:
                    description: Human-readable projection name
                    type: string
                  verticalDatum:
                    description: >-
                      Vertical datum label override; inherited from site config
                      when null
                    anyOf:
                      - type: string
                      - type: 'null'
                  heightType:
                    description: Height datum type (ellipsoidal or orthometric)
                    type: string
                    oneOf:
                      - const: ellipsoidal
                        title: ellipsoidal
                        description: Height above the reference ellipsoid (e.g. WGS84)
                      - const: orthometric
                        title: orthometric
                        description: Height above the geoid (mean sea level)
                  projectionType:
                    type: string
                    const: helmert_2d
                  baseSrid:
                    description: Base SRID to project to before applying the transform
                    type: number
                  horizontal:
                    description: Horizontal 2D Helmert transform parameters
                    type: object
                    properties:
                      originEasting:
                        description: Origin easting used as reference point (m)
                        anyOf:
                          - type: number
                          - type: 'null'
                      originNorthing:
                        description: Origin northing used as reference point (m)
                        anyOf:
                          - type: number
                          - type: 'null'
                      rotation:
                        description: Rotation in degrees. Positive is anticlockwise.
                        anyOf:
                          - type: number
                          - type: 'null'
                      scaleFactor:
                        description: Scale factor (default 1.0)
                        anyOf:
                          - type: number
                          - type: 'null'
                      northOffset:
                        description: Northing translation after rotation and scaling (m)
                        anyOf:
                          - type: number
                          - type: 'null'
                      eastOffset:
                        description: Easting translation after rotation and scaling (m)
                        anyOf:
                          - type: number
                          - type: 'null'
                    required:
                      - originEasting
                      - originNorthing
                      - rotation
                      - scaleFactor
                      - northOffset
                      - eastOffset
                  vertical:
                    description: Vertical correction parameters
                    anyOf:
                      - description: First order vertical plane correction parameters
                        type: object
                        properties:
                          originEasting:
                            description: >-
                              Origin easting for the vertical adjustment plane
                              (m)
                            anyOf:
                              - type: number
                              - type: 'null'
                          originNorthing:
                            description: >-
                              Origin northing for the vertical adjustment plane
                              (m)
                            anyOf:
                              - type: number
                              - type: 'null'
                          heightOffset:
                            description: Height offset at the vertical origin (m)
                            anyOf:
                              - type: number
                              - type: 'null'
                          slopeNorth:
                            description: >-
                              Slope correction in the north direction (m/m),
                              relative to the vertical origin
                            anyOf:
                              - type: number
                              - type: 'null'
                          slopeEast:
                            description: >-
                              Slope correction in the east direction (m/m),
                              relative to the vertical origin
                            anyOf:
                              - type: number
                              - type: 'null'
                        required:
                          - originEasting
                          - originNorthing
                          - heightOffset
                          - slopeNorth
                          - slopeEast
                      - type: 'null'
                required:
                  - id
                  - label
                  - verticalDatum
                  - heightType
                  - projectionType
                  - baseSrid
                  - horizontal
                  - vertical
              - description: PROJ string-based site projection
                type: object
                properties:
                  id:
                    description: Database projection id
                    type: number
                  label:
                    description: Human-readable projection name
                    type: string
                  verticalDatum:
                    description: >-
                      Vertical datum label override; inherited from site config
                      when null
                    anyOf:
                      - type: string
                      - type: 'null'
                  heightType:
                    description: Height datum type (ellipsoidal or orthometric)
                    type: string
                    oneOf:
                      - const: ellipsoidal
                        title: ellipsoidal
                        description: Height above the reference ellipsoid (e.g. WGS84)
                      - const: orthometric
                        title: orthometric
                        description: Height above the geoid (mean sea level)
                  projectionType:
                    type: string
                    const: proj_string
                  projString:
                    description: PROJ definition string for the projection
                    type: string
                required:
                  - id
                  - label
                  - verticalDatum
                  - heightType
                  - projectionType
                  - projString
      required:
        - verticalDatum
        - geoidModel
        - baseStations
        - projections
      title: SiteGnssConfig
    SharedBy:
      description: Present when this site is shared from another organisation
      type: object
      properties:
        orgUuid:
          description: Source organisation UUID that shared this resource
          type: string
        orgName:
          description: Source organisation name that shared this resource
          type: string
        permissionLevel:
          description: Permission level granted for a shared resource
          type: string
          oneOf:
            - const: read
              title: read
              description: Recipient can view the resource but not modify it
            - const: write
              title: write
              description: Recipient can view and modify the resource
      required:
        - orgUuid
        - orgName
        - permissionLevel
      title: SharedBy
    SensorStatus:
      description: >-
        Overall status dynamically derived from parameter errors. View details
        in the errors array.
      type: string
      oneOf:
        - const: ok
          title: ok
          description: All parameters are healthy
        - const: error
          title: error
          description: One or more parameters are in an error state
        - const: warning
          title: warning
          description: Sensor is operational but at least one parameter is faulty
        - const: unknown
          title: unknown
          description: Health cannot be determined (e.g. no data received yet)
      title: SensorStatus
    SensorItem:
      description: Sensor returned when expanding device or sensor list/detail responses
      type: object
      properties:
        uuid:
          description: Sensor UUID
          type: string
          format: uuid
        model:
          description: Sensor model identifier, if available
          anyOf:
            - $ref: '#/components/schemas/SensorModel'
            - type: 'null'
        type:
          description: Sensor type, if available
          example: ph
          anyOf:
            - $ref: '#/components/schemas/SensorType'
            - type: 'null'
        physicalSensor:
          description: Assigned physical sensor, if any
          anyOf:
            - type: object
              properties:
                uuid:
                  description: Physical sensor UUID
                  type: string
                  format: uuid
                serialNumber:
                  description: Physical sensor serial number
                  type: string
              required:
                - uuid
                - serialNumber
            - type: 'null'
        connectionType:
          description: >-
            Indicates whether the sensor is built into the device (integrated)
            or connected via an external interface (external), if available
          example: external
          anyOf:
            - $ref: '#/components/schemas/SensorConnectionType'
            - type: 'null'
        name:
          description: Internal name used for the sensor
          type: string
        alias:
          description: Sensor alias for display purposes
          type: string
        deviceSerialNumber:
          description: Serial number of the device that owns the sensor
          type: string
        parameters:
          description: Parameters attached to this sensor
          type: array
          items:
            $ref: '#/components/schemas/SensorParameterSummary'
        channelIndex:
          description: Order the sensor is read on the device
          type: number
        isActive:
          description: >-
            Whether the device is currently programmed to read the sensor. Will
            be false when the device firmware is not currently programmed to
            read this sensor.
          type: boolean
        lastActivatedAt:
          description: Timestamp of when the sensor was last activated
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        lastDeactivatedAt:
          description: Timestamp of when the sensor was last deactivated
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        enabled:
          description: >-
            For configurable sensors, whether this sensor instance is currently
            enabled and sampled by the device. Always true for non-configurable
            sensors.
          type: boolean
      required:
        - uuid
        - model
        - type
        - physicalSensor
        - connectionType
        - name
        - alias
        - deviceSerialNumber
        - parameters
        - channelIndex
        - isActive
        - enabled
      title: SensorItem
    SiteGnssBaseStationLink:
      description: Base station linked to a site with priority
      type: object
      properties:
        baseStation:
          description: Summary of the linked base station
          type: object
          properties:
            id:
              description: Base station ID
              type: number
            type:
              description: Source of GNSS base station corrections
              type: string
              oneOf:
                - const: cors
                  title: cors
                  description: Public Continuously Operating Reference Station network
                - const: private
                  title: private
                  description: Privately operated reference station
                - const: device
                  title: device
                  description: Another Ontoto GNSS device acting as a base station
            name:
              type: string
            status:
              description: Operational status of a GNSS base station
              type: string
              oneOf:
                - const: active
                  title: active
                  description: Receiving data on schedule
                - const: inactive
                  title: inactive
                  description: Configured but not currently expected to transmit
                - const: no_data
                  title: no_data
                  description: No data has been received recently
                - const: error
                  title: error
                  description: Base station is reporting errors
                - const: unknown
                  title: unknown
                  description: Status cannot be determined
            isEnabled:
              type: boolean
          required:
            - id
            - type
            - name
            - status
            - isEnabled
        priority:
          description: Priority ordering (1 = primary, 2 = first backup, etc.)
          type: number
        isEnabled:
          description: Whether this base station link is active for the site
          type: boolean
      required:
        - baseStation
        - priority
        - isEnabled
      title: SiteGnssBaseStationLink
    SensorModel:
      description: >-
        Hardware sensor model identifier. This is an open enum, new values may
        be added in future API versions; clients should handle unknown values
        gracefully.
      type: string
      oneOf:
        - const: HPT604-V
          title: HPT604-V
          description: Holykell Vented Level
        - const: HPT604-ABS
          title: HPT604-ABS
          description: Holykell Absolute Level
        - const: ATMOS41
          title: ATMOS41
          description: ATMOS41 Weather Station
        - const: SPS30
          title: SPS30
          description: Sensirion SPS30 Particulate Matter
        - const: ATMOS22
          title: ATMOS22
          description: ATMOS22 Ultrasonic Anemometer
        - const: ONTOTO-RADAR
          title: ONTOTO-RADAR
          description: Ontoto Radar
        - const: UE3002
          title: UE3002
          description: Holykell Ultrasonic Level
        - const: VW-GENERIC
          title: VW-GENERIC
          description: Vibrating Wire
        - const: WDS308
          title: WDS308
          description: WDS308 Weather Station
        - const: VIBWIRE-108-SDI12
          title: VIBWIRE-108-SDI12
          description: Keynes Vibrating Wire
        - const: PULSE-RAIN
          title: PULSE-RAIN
          description: Pulse Rain Gauge
        - const: PULSE-WATER-METER
          title: PULSE-WATER-METER
          description: Pulse Water Meter
        - const: SEN50
          title: SEN50
          description: Sensirion SEN50 Particulate Matter
        - const: ANB-AQ5
          title: ANB-AQ5
          description: ANB AQ5 pH
        - const: EP100G
          title: EP100G
          description: EP100G Soil Moisture
        - const: EP100GL
          title: EP100GL
          description: EP100GL Soil Moisture
        - const: SENTEK
          title: SENTEK
          description: Sentek Soil Moisture
        - const: 4-20MA
          title: 4-20MA
          description: 4-20 mA
        - const: UNICONN
          title: UNICONN
          description: Uniconn Gauge Pressure
        - const: CBS-BUBBLER
          title: CBS-BUBBLER
          description: CBS Bubbler Level
        - const: HPT915
          title: HPT915
          description: Holykell Absolute Level EC Temperature
        - const: SMART-IPI
          title: SMART-IPI
          description: Smart In-place Inclinometer
        - const: SO411
          title: SO411
          description: Apogee Oxygen
        - const: TDR310
          title: TDR310
          description: TDR310 Soil Moisture
        - const: SMR02
          title: SMR02
          description: Aquas Absolute Level
        - const: SMR07
          title: SMR07
          description: Aquas Conductivity
        - const: SMR04
          title: SMR04
          description: Aquas pH
        - const: SMR05
          title: SMR05
          description: Aquas ORP
        - const: SMR09
          title: SMR09
          description: Aquas Dissolved Oxygen
        - const: BAROMETER
          title: BAROMETER
          description: On-board Barometer
        - const: HWT9053
          title: HWT9053
          description: HWT9053 IMU
        - const: PONSEL-PH
          title: PONSEL-PH
          description: Ponsel pH
        - const: PONSEL-C4E
          title: PONSEL-C4E
          description: Ponsel C4E Conductivity/Salinity
        - const: PONSEL-NTU
          title: PONSEL-NTU
          description: Ponsel NTU Turbidity
        - const: GEOKON-6180
          title: GEOKON-6180
          description: Geokon 6180 Inclinometer
        - const: UF2000B
          title: UF2000B
          description: Holykell Ultrasonic Flowmeter
        - const: AS3935
          title: AS3935
          description: AS3935 Lightning
        - const: VM5XX
          title: VM5XX
          description: VM5XX VW Sensor
        - const: WXT536
          title: WXT536
          description: WXT536 Weather Station
        - const: PT12
          title: PT12
          description: Seametrics PT12 Pressure
        - const: TILT
          title: TILT
          description: Generic Tilt
        - const: SMRMAX
          title: SMRMAX
          description: SMR MAX EC + pH
        - const: AQUA-TROLL-100
          title: AQUA-TROLL-100
          description: Aqua Troll Conductivity
        - const: DAX-CTD
          title: DAX-CTD
          description: DAX CTD Level/Conductivity
        - const: G6
          title: G6
          description: G6 Gauge Pressure/Temp
        - const: SMR-LEVEL-EC
          title: SMR-LEVEL-EC
          description: SMR Level EC
        - const: SOLINST-ABS
          title: SOLINST-ABS
          description: Solinst Absolute Level
        - const: HPT604-VT
          title: HPT604-VT
          description: Holykell Vented Level/Temp
        - const: SMART-CONTRACT
          title: SMART-CONTRACT
          description: SMART Contractometer
        - const: VW-SDI12
          title: VW-SDI12
          description: VW-SDI12
        - const: LEVEL-TROLL
          title: LEVEL-TROLL
          description: Level Troll
        - const: PL100
          title: PL100
          description: DAX PL100 Absolute Level
        - const: WEATHER-FORECAST
          title: WEATHER-FORECAST
          description: Virtual Weather Forecast
        - const: GNSS
          title: GNSS
          description: GNSS
        - const: RDO-BLUE
          title: RDO-BLUE
          description: RDO Blue
      title: SensorModel
    SensorType:
      description: >-
        Category of sensor based on what it measures. This is an open enum, new
        values may be added in future API versions; clients should handle
        unknown values gracefully.
      type: string
      oneOf:
        - const: absolute_pressure
          title: absolute_pressure
          description: Absolute pressure (e.g. submerged level transducer)
        - const: gauge_pressure
          title: gauge_pressure
          description: Gauge pressure (vented level transducer)
        - const: absolute_pressure_conductivity
          title: absolute_pressure_conductivity
          description: Combined absolute pressure level + conductivity sensor
        - const: barometer
          title: barometer
          description: Barometric (atmospheric) pressure sensor
        - const: weather
          title: weather
          description: Multi-parameter weather station
        - const: vibrating_wire
          title: vibrating_wire
          description: Vibrating-wire strain or piezometer sensor
        - const: pulse_rain
          title: pulse_rain
          description: Tipping-bucket rain gauge using pulse counts
        - const: pulse_water_meter
          title: pulse_water_meter
          description: Water meter using pulse counts
        - const: dust
          title: dust
          description: Particulate matter / dust sensor
        - const: radar
          title: radar
          description: Radar level sensor
        - const: ph
          title: ph
          description: pH sensor
        - const: soil_moisture
          title: soil_moisture
          description: Soil moisture probe
        - const: gauge_pressure_temp
          title: gauge_pressure_temp
          description: Gauge pressure with integrated temperature
        - const: oxygen_gas
          title: oxygen_gas
          description: Gaseous oxygen sensor
        - const: ultrasonic_flow
          title: ultrasonic_flow
          description: Ultrasonic flow meter
        - const: ma420
          title: ma420
          description: Generic 4-20 mA analog sensor
        - const: wind
          title: wind
          description: Wind speed / direction sensor
        - const: ultrasonic_distance
          title: ultrasonic_distance
          description: Ultrasonic distance / level sensor
        - const: bubbler_level
          title: bubbler_level
          description: Bubbler-type water level sensor
        - const: inclinometer
          title: inclinometer
          description: Tilt / inclinometer sensor
        - const: conductivity
          title: conductivity
          description: Electrical conductivity / salinity sensor
        - const: turbidity
          title: turbidity
          description: Water turbidity sensor
        - const: lightning
          title: lightning
          description: Lightning detector
        - const: orp
          title: orp
          description: Oxidation-reduction potential sensor
        - const: dissolved_oxygen
          title: dissolved_oxygen
          description: Dissolved oxygen sensor
        - const: conductivity_ph
          title: conductivity_ph
          description: Combined conductivity and pH sensor
        - const: linear_displacement
          title: linear_displacement
          description: Linear displacement / extensometer sensor
        - const: weather_forecast
          title: weather_forecast
          description: Virtual sensor sourced from a weather forecast provider
        - const: gnss
          title: gnss
          description: GNSS positioning sensor
      title: SensorType
    SensorConnectionType:
      description: Whether a sensor is built into the device or attached externally
      type: string
      oneOf:
        - const: integrated
          title: integrated
          description: Sensor is built into the device hardware
        - const: external
          title: external
          description: Sensor connects to the device via an external interface
      title: SensorConnectionType
    SensorParameterSummary:
      description: Parameter attached to a sensor
      type: object
      properties:
        uuid:
          description: Parameter UUID
          type: string
          format: uuid
        sensorUuid:
          description: Sensor containing the parameter
          type: string
          format: uuid
        deviceSerialNumber:
          description: Device that owns the parameter
          type: string
        alias:
          description: Parameter display alias
          type: string
          minLength: 1
        name:
          description: Unique parameter name
          type: string
          minLength: 1
        sourceType:
          description: Origin of a parameter's data
          type: string
          oneOf:
            - const: derived
              title: derived
              description: Parameter computed from a formula or aggregation
            - const: raw
              title: raw
              description: Parameter measured directly by the device
            - const: imported
              title: imported
              description: Parameter ingested from an external (third party) source
            - const: weather_forecast
              title: weather_forecast
              description: Parameter populated from a weather forecast provider
            - const: gnss
              title: gnss
              description: Parameter produced by GNSS post-processing
            - const: gnss_field
              title: gnss_field
              description: Individual GNSS solution field (e.g. lat, lon, height)
        parameterType:
          $ref: '#/components/schemas/SensorParameterType'
        baseUnit:
          description: Storage unit (UCUM code)
          anyOf:
            - type: string
            - type: 'null'
        displayUnit:
          description: Display unit (UCUM code)
          anyOf:
            - type: string
            - type: 'null'
        displayPrecision:
          description: Display decimal places. Null truncates to at most 6 decimal places.
          anyOf:
            - type: number
            - type: 'null'
        suppressFaults:
          description: Whether fault status is suppressed for this parameter
          type: boolean
        configErrorMessage:
          description: Configuration error message, if any
          anyOf:
            - type: string
            - type: 'null'
        status:
          description: Parameter health status
          type: string
          oneOf:
            - const: ok
              title: ok
              description: No issues
            - const: data_fault
              title: data_fault
              description: >-
                Latest data points are faulty (null, out-of-range, or evaluation
                error)
            - const: config_error
              title: config_error
              description: Parameter configuration is invalid and cannot be evaluated
        lastFaultSummary:
          description: Summary of faulty data points in the last transmission
          anyOf:
            - type: object
              properties:
                reason:
                  description: Why a parameter's data point was flagged as faulty
                  type: string
                  oneOf:
                    - const: null_value
                      title: null_value
                      description: Value was null
                    - const: out_of_range
                      title: out_of_range
                      description: Value fell outside the configured operating range
                    - const: evaluation_error
                      title: evaluation_error
                      description: Derived parameter formula failed to evaluate
                message:
                  description: Message describing the fault
                  type: string
                faultyPointsCount:
                  description: Number of faulty data points in the last transmission
                  type: number
                totalPointsCount:
                  description: Total number of data points in the last transmission
                  type: number
              required:
                - reason
                - message
                - faultyPointsCount
                - totalPointsCount
            - type: 'null'
        lastFaultTimestamp:
          description: Transmission timestamp of the last fault
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        createdAt:
          description: Creation date
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        updatedAt:
          description: Last update date
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
      required:
        - uuid
        - sensorUuid
        - deviceSerialNumber
        - alias
        - name
        - sourceType
        - parameterType
        - baseUnit
        - displayUnit
        - displayPrecision
        - suppressFaults
        - status
        - createdAt
        - updatedAt
      title: SensorParameterSummary
    SensorParameterType:
      description: Physical quantity measured
      example: temperature
      type: string
      oneOf:
        - const: unknown
          title: unknown
          description: Unspecified or unrecognised quantity
        - const: conductivity
          title: conductivity
          description: Electrical conductivity
        - const: barometric_pressure
          title: barometric_pressure
          description: Atmospheric (barometric) pressure
        - const: absolute_pressure
          title: absolute_pressure
          description: Absolute pressure (referenced to vacuum)
        - const: compensated_level
          title: compensated_level
          description: Water level after barometric compensation
        - const: gauge_pressure
          title: gauge_pressure
          description: Gauge pressure (referenced to atmosphere)
        - const: level
          title: level
          description: Water level / depth
        - const: ph
          title: ph
          description: pH
        - const: moisture
          title: moisture
          description: Soil moisture content
        - const: temperature
          title: temperature
          description: Temperature
        - const: humidity
          title: humidity
          description: Relative humidity
        - const: pm
          title: pm
          description: Particulate matter concentration
        - const: frequency
          title: frequency
          description: Frequency (e.g. vibrating-wire output)
        - const: pulse
          title: pulse
          description: Raw pulse count
        - const: distance
          title: distance
          description: Distance
        - const: count
          title: count
          description: Generic counted quantity
        - const: wind_speed
          title: wind_speed
          description: Wind speed
        - const: wind_direction
          title: wind_direction
          description: Wind direction
        - const: wind_gust
          title: wind_gust
          description: Wind gust speed
        - const: solar
          title: solar
          description: Solar radiation
        - const: precipitation
          title: precipitation
          description: Rainfall depth
        - const: oxygen_gas
          title: oxygen_gas
          description: Gaseous oxygen concentration
        - const: dissolved_oxygen
          title: dissolved_oxygen
          description: Dissolved oxygen concentration
        - const: relative_permittivity
          title: relative_permittivity
          description: Relative dielectric permittivity
        - const: resistance
          title: resistance
          description: Electrical resistance
        - const: orp
          title: orp
          description: Oxidation-reduction potential
        - const: angle
          title: angle
          description: Angle / tilt
        - const: salinity
          title: salinity
          description: Salinity
        - const: turbidity
          title: turbidity
          description: Water turbidity
        - const: volume
          title: volume
          description: Volume
        - const: voltage
          title: voltage
          description: Voltage
        - const: current
          title: current
          description: Electric current
        - const: absolute_pressure_msl
          title: absolute_pressure_msl
          description: Absolute pressure adjusted to mean sea level
        - const: displacement
          title: displacement
          description: Linear displacement
        - const: tds
          title: tds
          description: Total dissolved solids
        - const: resistivity
          title: resistivity
          description: Electrical resistivity
        - const: density
          title: density
          description: Density
        - const: noise_level
          title: noise_level
          description: Sound level / noise
        - const: uv_index
          title: uv_index
          description: Ultraviolet index
        - const: probability
          title: probability
          description: Probability (0-1 or 0-100%)
        - const: gnss
          title: gnss
          description: GNSS solution (multi-field result)
        - const: ratio
          title: ratio
          description: Dimensionless ratio
        - const: status
          title: status
          description: Discrete status / state code
        - const: displacement_rate
          title: displacement_rate
          description: Rate of displacement (velocity)
        - const: geodetic_coordinates
          title: geodetic_coordinates
          description: Geodetic latitude/longitude pair
        - const: ellipsoidal_height
          title: ellipsoidal_height
          description: Height above the reference ellipsoid
        - const: orthometric_height
          title: orthometric_height
          description: Height above the geoid (orthometric)
        - const: projected_coordinates
          title: projected_coordinates
          description: Projected coordinates (e.g. UTM easting/northing)
        - const: partial_pressure
          title: partial_pressure
          description: Partial pressure of a gas component
        - const: flow_rate
          title: flow_rate
          description: Volumetric flow rate
      title: SensorParameterType
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````