{
  "openapi": "3.1.1",
  "info": {
    "title": "SAEON.NearRealTime.API | v1",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://buoysapi.saeon.ac.za/"
    }
  ],
  "paths": {
    "/sites": {
      "get": {
        "tags": [
          "Sites"
        ],
        "summary": "All Sites",
        "description": "All the Sites",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Site"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sites/{id}": {
      "get": {
        "tags": [
          "Sites"
        ],
        "summary": "Site by Id",
        "description": "Site by Id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Site"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/sites/code/{code}": {
      "get": {
        "tags": [
          "Sites"
        ],
        "summary": "Site by Code",
        "description": "Site by Code",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Site"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/sites/name/{name}": {
      "get": {
        "tags": [
          "Sites"
        ],
        "summary": "Site by Name",
        "description": "Site by Name",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Site"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/sites/{id}/stations": {
      "get": {
        "tags": [
          "Sites"
        ],
        "summary": "Site Stations",
        "description": "All the Stations of the Site",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Station"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/stations": {
      "get": {
        "tags": [
          "Stations"
        ],
        "summary": "All Stations",
        "description": "All the Stations",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Station"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/stations/{id}": {
      "get": {
        "tags": [
          "Stations"
        ],
        "summary": "Station by Id",
        "description": "Station by Id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Station"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/stations/code/{code}": {
      "get": {
        "tags": [
          "Stations"
        ],
        "summary": "Station by Code",
        "description": "Station by Code",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Station"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/stations/name/{name}": {
      "get": {
        "tags": [
          "Stations"
        ],
        "summary": "Station by Name",
        "description": "Station by Name",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Station"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/stations/{id}/instruments": {
      "get": {
        "tags": [
          "Stations"
        ],
        "summary": "Station Instruments",
        "description": "All the Instruments of the Station",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Instrument"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/instruments": {
      "get": {
        "tags": [
          "Instruments"
        ],
        "summary": "All Instruments",
        "description": "All the Instruments",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Instrument"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/instruments/{id}": {
      "get": {
        "tags": [
          "Instruments"
        ],
        "summary": "Instrument by Id",
        "description": "Instrument by Id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Instrument"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/instruments/code/{code}": {
      "get": {
        "tags": [
          "Instruments"
        ],
        "summary": "Instrument by Code",
        "description": "Instrument by Code",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Instrument"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/instruments/name/{name}": {
      "get": {
        "tags": [
          "Instruments"
        ],
        "summary": "Instrument by Name",
        "description": "Instrument by Name",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Instrument"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/instruments/{id}/sensors": {
      "get": {
        "tags": [
          "Instruments"
        ],
        "summary": "Instrument Sensors",
        "description": "All the Sensors of the Instrument",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Sensor"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sensors": {
      "get": {
        "tags": [
          "Sensors"
        ],
        "summary": "All Sensors",
        "description": "All the Sensors",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Sensor"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sensors/{id}": {
      "get": {
        "tags": [
          "Sensors"
        ],
        "summary": "Sensor by Id",
        "description": "Sensor by Id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Sensor"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/sensors/code/{code}": {
      "get": {
        "tags": [
          "Sensors"
        ],
        "summary": "Sensor by Code",
        "description": "Sensor by Code",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Sensor"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/sensors/name/{name}": {
      "get": {
        "tags": [
          "Sensors"
        ],
        "summary": "Sensor by Name",
        "description": "Sensor by Name",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Sensor"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/sensors/{id}/variable": {
      "get": {
        "tags": [
          "Sensors"
        ],
        "summary": "Sensor's Variable",
        "description": "The Variable of the Sensor",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Variable"
                }
              }
            }
          }
        }
      }
    },
    "/variables": {
      "get": {
        "tags": [
          "Variables"
        ],
        "summary": "All Variables",
        "description": "All the Variables",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Variable"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/variables/{id}": {
      "get": {
        "tags": [
          "Variables"
        ],
        "summary": "Variable by Id",
        "description": "Variable by Id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Variable"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/variables/code/{code}": {
      "get": {
        "tags": [
          "Variables"
        ],
        "summary": "Variable by Code",
        "description": "Variable by Code",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Variable"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/variables/name/{name}": {
      "get": {
        "tags": [
          "Variables"
        ],
        "summary": "Variable by Name",
        "description": "Variable by Name",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Variable"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/variables/{id}/phenomenon": {
      "get": {
        "tags": [
          "Variables"
        ],
        "summary": "Variable's Phenomenon",
        "description": "The Phenomenon of the Variable",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Phenomenon"
                }
              }
            }
          }
        }
      }
    },
    "/variables/{id}/offering": {
      "get": {
        "tags": [
          "Variables"
        ],
        "summary": "Variable's Offering",
        "description": "The Offering of the Variable",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Offering"
                }
              }
            }
          }
        }
      }
    },
    "/variables/{id}/unit": {
      "get": {
        "tags": [
          "Variables"
        ],
        "summary": "Variable's Unit",
        "description": "The Unit of the Variable",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unit"
                }
              }
            }
          }
        }
      }
    },
    "/phenomena": {
      "get": {
        "tags": [
          "Phenomena"
        ],
        "summary": "All Phenomena",
        "description": "All the Phenomena",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Phenomenon"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/phenomena/{id}": {
      "get": {
        "tags": [
          "Phenomena"
        ],
        "summary": "Phenomenon by Id",
        "description": "Phenomenon by Id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Phenomenon"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/phenomena/code/{code}": {
      "get": {
        "tags": [
          "Phenomena"
        ],
        "summary": "Phenomenon by Code",
        "description": "Phenomenon by Code",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Phenomenon"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/phenomena/name/{name}": {
      "get": {
        "tags": [
          "Phenomena"
        ],
        "summary": "Phenomenon by Name",
        "description": "Phenomenon by Name",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Phenomenon"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/offerings": {
      "get": {
        "tags": [
          "Offerings"
        ],
        "summary": "All Offerings",
        "description": "All the Offerings",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Offering"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/offerings/{id}": {
      "get": {
        "tags": [
          "Offerings"
        ],
        "summary": "Offering by Id",
        "description": "Offering by Id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Offering"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/offerings/code/{code}": {
      "get": {
        "tags": [
          "Offerings"
        ],
        "summary": "Offering by Code",
        "description": "Offering by Code",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Offering"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/offerings/name/{name}": {
      "get": {
        "tags": [
          "Offerings"
        ],
        "summary": "Offering by Name",
        "description": "Offering by Name",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Offering"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/units": {
      "get": {
        "tags": [
          "Units"
        ],
        "summary": "All Units",
        "description": "All the Units",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Unit"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/units/{id}": {
      "get": {
        "tags": [
          "Units"
        ],
        "summary": "Unit by Id",
        "description": "Unit by Id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unit"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/units/code/{code}": {
      "get": {
        "tags": [
          "Units"
        ],
        "summary": "Unit by Code",
        "description": "Unit by Code",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unit"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/units/name/{name}": {
      "get": {
        "tags": [
          "Units"
        ],
        "summary": "Unit by Name",
        "description": "Unit by Name",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unit"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Instrument": {
        "required": [
          "instrumentType",
          "latitude",
          "longitude",
          "cardType",
          "friendlyName",
          "code",
          "name"
        ],
        "type": "object",
        "properties": {
          "manufacturer": {
            "maxLength": 150,
            "type": [
              "null",
              "string"
            ]
          },
          "model": {
            "maxLength": 150,
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "maxLength": 150,
            "type": [
              "null",
              "string"
            ]
          },
          "latitude": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "longitude": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "friendlyName": {
            "maxLength": 150,
            "type": "string"
          },
          "description": {
            "maxLength": 5000,
            "type": [
              "null",
              "string"
            ]
          },
          "code": {
            "maxLength": 50,
            "type": "string"
          },
          "name": {
            "maxLength": 150,
            "type": "string"
          },
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "Offering": {
        "required": [
          "friendlyName",
          "code",
          "name"
        ],
        "type": "object",
        "properties": {
          "friendlyName": {
            "maxLength": 150,
            "type": "string"
          },
          "description": {
            "maxLength": 5000,
            "type": [
              "null",
              "string"
            ]
          },
          "code": {
            "maxLength": 50,
            "type": "string"
          },
          "name": {
            "maxLength": 150,
            "type": "string"
          },
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "Phenomenon": {
        "required": [
          "friendlyName",
          "code",
          "name"
        ],
        "type": "object",
        "properties": {
          "friendlyName": {
            "maxLength": 150,
            "type": "string"
          },
          "description": {
            "maxLength": 5000,
            "type": [
              "null",
              "string"
            ]
          },
          "code": {
            "maxLength": 50,
            "type": "string"
          },
          "name": {
            "maxLength": 150,
            "type": "string"
          },
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "Sensor": {
        "required": [
          "code",
          "instrumentId",
          "samplingIntervalSecs",
          "variableId",
          "elevation",
          "name"
        ],
        "type": "object",
        "properties": {
          "code": {
            "maxLength": 75,
            "type": "string"
          },
          "instrumentId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "manufacturer": {
            "maxLength": 150,
            "type": [
              "null",
              "string"
            ]
          },
          "model": {
            "maxLength": 150,
            "type": [
              "null",
              "string"
            ]
          },
          "samplingIntervalSecs": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "variableId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "postition": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "elevation": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "description": {
            "maxLength": 5000,
            "type": [
              "null",
              "string"
            ]
          },
          "name": {
            "maxLength": 150,
            "type": "string"
          },
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "Site": {
        "required": [
          "friendlyName",
          "code",
          "name"
        ],
        "type": "object",
        "properties": {
          "friendlyName": {
            "maxLength": 150,
            "type": "string"
          },
          "description": {
            "maxLength": 5000,
            "type": [
              "null",
              "string"
            ]
          },
          "code": {
            "maxLength": 50,
            "type": "string"
          },
          "name": {
            "maxLength": 150,
            "type": "string"
          },
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "Station": {
        "required": [
          "siteId",
          "latitude",
          "longitude",
          "friendlyName",
          "code",
          "name"
        ],
        "type": "object",
        "properties": {
          "siteId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "latitude": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "longitude": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "friendlyName": {
            "maxLength": 150,
            "type": "string"
          },
          "description": {
            "maxLength": 5000,
            "type": [
              "null",
              "string"
            ]
          },
          "code": {
            "maxLength": 50,
            "type": "string"
          },
          "name": {
            "maxLength": 150,
            "type": "string"
          },
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "Unit": {
        "required": [
          "friendlyName",
          "code",
          "name"
        ],
        "type": "object",
        "properties": {
          "symbol": {
            "type": [
              "null",
              "string"
            ]
          },
          "friendlyName": {
            "maxLength": 150,
            "type": "string"
          },
          "description": {
            "maxLength": 5000,
            "type": [
              "null",
              "string"
            ]
          },
          "code": {
            "maxLength": 50,
            "type": "string"
          },
          "name": {
            "maxLength": 150,
            "type": "string"
          },
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "Variable": {
        "required": [
          "phenomenonId",
          "offeringId",
          "unitId",
          "shortName",
          "unitType",
          "friendlyName",
          "code",
          "name"
        ],
        "type": "object",
        "properties": {
          "phenomenonId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "offeringId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "unitId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "shortName": {
            "type": "string"
          },
          "friendlyName": {
            "maxLength": 150,
            "type": "string"
          },
          "description": {
            "maxLength": 5000,
            "type": [
              "null",
              "string"
            ]
          },
          "code": {
            "maxLength": 50,
            "type": "string"
          },
          "name": {
            "maxLength": 150,
            "type": "string"
          },
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Sites"
    },
    {
      "name": "Stations"
    },
    {
      "name": "Instruments"
    },
    {
      "name": "Sensors"
    },
    {
      "name": "Variables"
    },
    {
      "name": "Phenomena"
    },
    {
      "name": "Offerings"
    },
    {
      "name": "Units"
    }
  ]
}