put https://senaps.eratos.com/api/sensor/v2/streams/
Create a new stream or, if a stream with the posted 'id' already exists, update it.
The below examples demonstrate the format for each supported stream type.
Scalar Stream Example
{
"id": "my-new-scalar-stream",
"resulttype": "scalarvalue",
"organisationid": "my-org",
"groupids": [ "my-group" ],
"locationid": "my-location",
"samplePeriod": "PT1H",
"reportingPeriod": "P1D",
"streamMetadata": {
"type": ".ScalarStreamMetaData",
"observedProperty": "http://registry.it.csiro.au/def/environment/property/air_temperature",
"unitOfMeasure": "http://registry.it.csiro.au/def/qudt/1.1/qudt-unit/DegreeCelsius",
"interpolationType": "http://www.opengis.net/def/waterml/2.0/interpolationType/Continuous"
},
"usermetadata": {}
}
Geolocation Stream Example
{
"id": "my-new-geolocation-stream",
"resulttype": "geolocationvalue",
"organisationid": "my-org",
"groupids": [ "my-group" ],
"locationid": "my-location",
"samplePeriod": "PT1H",
"reportingPeriod": "P1D",
"streamMetadata": {
"type": ".GeoLocationStreamMetaData",
"interpolationType": "http://www.opengis.net/def/waterml/2.0/interpolationType/Continuous"
},
"usermetadata": {}
}
Image Stream Example
{
"id": "my-new-image-stream",
"resulttype": "imagevalue",
"organisationid": "my-org",
"groupids": [ "my-group" ],
"locationid": "my-location",
"samplePeriod": "PT1H",
"reportingPeriod": "P1D",
"streamMetadata": {
"type": ".ImageStreamMetaData"
},
"usermetadata": {}
}
Document Stream Example
{
"id": "my-new-document-stream",
"resulttype": "documentvalue",
"organisationid": "my-org",
"groupids": [ "my-group" ],
"locationid": "my-location",
"samplePeriod": "PT1H",
"reportingPeriod": "P1D",
"streamMetadata": {
"type": ".DocumentStreamMetaData",
"mimetype": "application/json"
},
"usermetadata": {}
}
Vector Stream Example
Two varieties of vector stream are supported. The simplest format requires just a "length" property in the metadata, specifying how wide the vector is:
{
"id": "my-new-vector-stream",
"resulttype": "vectorvalue",
"organisationid": "my-org",
"groupids": [ "my-group" ],
"locationid": "my-location",
"samplePeriod": "PT1H",
"reportingPeriod": "P1D",
"streamMetadata": {
"type": ".VectorStreamMetaData",
"length": 10
},
"usermetadata": {}
}
An alternative representation, the "regularly binned" vector stream, is also supported. This is useful, for example, for describing spectrometry data streams:
{
"id": "my-new-regularly-binned-vector-stream",
"resulttype": "vectorvalue",
"organisationid": "my-org",
"groupids": [ "my-group" ],
"locationid": "my-location",
"samplePeriod": "PT1H",
"reportingPeriod": "P1D",
"streamMetadata": {
"type": ".RegularlyBinnedVectorStreamMetaData",
"start": "4000",
"end": "7000",
"step": "30",
"observedProperty": "http://registry.it.csiro.au/def/environment/property/absorption_total",
"amplitudeUnit": "http://registry.it.csiro.au/def/qudt/1.1/qudt-unit/Percent",
"lengthUnit": "http://registry.it.csiro.au/def/qudt/1.1/qudt-unit/Angstrom"
},
"usermetadata": {}
}
Note that in the above case, the length
property is derived from the start
, end
and step
properties. In all other cases, the length
property must be explicitly provided.