diff --git a/hydroserver/settings.py b/hydroserver/settings.py index 80b9888..bbf36e0 100644 --- a/hydroserver/settings.py +++ b/hydroserver/settings.py @@ -23,22 +23,28 @@ DEPLOYMENT_BACKEND = config('DEPLOYMENT_BACKEND', default='local') DISABLE_ACCOUNT_CREATION = config('DISABLE_ACCOUNT_CREATION', default=False, cast=bool) +# CORS Settings + +CORS_ORIGIN_ALLOW_ALL = True +CORS_URLS_REGEX = r'^/api/.*$' +CORS_ALLOW_HEADERS = list(default_headers) + +# Deployment Settings + if DEPLOYMENT_BACKEND == 'aws': hostname = socket.gethostname() local_ip = socket.gethostbyname(hostname) # This is necessary for AWS ELB Health Checks to pass. PROXY_BASE_URL = config('PROXY_BASE_URL') ALLOWED_HOSTS = config('ALLOWED_HOSTS', default=PROXY_BASE_URL).split(',') + [local_ip] - CSRF_TRUSTED_ORIGINS = [PROXY_BASE_URL] - CORS_ALLOW_HEADERS = list(default_headers) + ['Refresh_Authorization'] + CORS_ALLOW_HEADERS += ['Refresh_Authorization'] elif DEPLOYMENT_BACKEND == 'vm': PROXY_BASE_URL = config('PROXY_BASE_URL') ALLOWED_HOSTS = config('ALLOWED_HOSTS', default=PROXY_BASE_URL).split(',') - CSRF_TRUSTED_ORIGINS = [PROXY_BASE_URL] else: PROXY_BASE_URL = config('PROXY_BASE_URL', 'http://127.0.0.1:3030') ALLOWED_HOSTS = ['127.0.0.1', 'localhost'] - CSRF_TRUSTED_ORIGINS = [PROXY_BASE_URL] - CORS_ORIGIN_ALLOW_ALL = True # Warning: Do not use this setting in production. + +CSRF_TRUSTED_ORIGINS = [PROXY_BASE_URL] LOGIN_REDIRECT_URL = 'sites' LOGOUT_REDIRECT_URL = 'home' diff --git a/stapi/engine/components/datastreams.py b/stapi/engine/components/datastreams.py index 9fb5291..262393e 100644 --- a/stapi/engine/components/datastreams.py +++ b/stapi/engine/components/datastreams.py @@ -66,6 +66,8 @@ def get_datastreams( order_by=ordering ) + datastreams = datastreams.distinct() + if get_count: count = datastreams.count() else: diff --git a/stapi/engine/components/locations.py b/stapi/engine/components/locations.py index b7d589b..7e06868 100644 --- a/stapi/engine/components/locations.py +++ b/stapi/engine/components/locations.py @@ -63,6 +63,8 @@ def get_locations( order_by=ordering ) + things = things.distinct() + if get_count: count = things.count() else: diff --git a/stapi/engine/components/observations.py b/stapi/engine/components/observations.py index bd754b5..4265120 100644 --- a/stapi/engine/components/observations.py +++ b/stapi/engine/components/observations.py @@ -77,13 +77,13 @@ def get_observations( order_by=ordering ) + observations = observations.distinct() + if get_count: count = observations.count() else: count = None - observations = observations.distinct() - if datastream_ids: observations = self.apply_rank( component=ObservationSchema, diff --git a/stapi/engine/components/observed_properties.py b/stapi/engine/components/observed_properties.py index 0dd1e14..4939fcf 100644 --- a/stapi/engine/components/observed_properties.py +++ b/stapi/engine/components/observed_properties.py @@ -45,6 +45,8 @@ def get_observed_properties( order_by=ordering ) + observed_properties = observed_properties.distinct() + if get_count: count = observed_properties.count() else: diff --git a/stapi/engine/components/sensors.py b/stapi/engine/components/sensors.py index 43946f7..2e6596b 100644 --- a/stapi/engine/components/sensors.py +++ b/stapi/engine/components/sensors.py @@ -44,6 +44,8 @@ def get_sensors( order_by=ordering ) + sensors = sensors.distinct() + if get_count: count = sensors.count() else: diff --git a/stapi/engine/components/things.py b/stapi/engine/components/things.py index 9246ff9..c342f04 100644 --- a/stapi/engine/components/things.py +++ b/stapi/engine/components/things.py @@ -64,6 +64,8 @@ def get_things( order_by=ordering ) + things = things.distinct() + if get_count: count = things.count() else: diff --git a/tests/test_sensorthings_endpoints.py b/tests/test_sensorthings_endpoints.py index 800bd03..fa12f9e 100644 --- a/tests/test_sensorthings_endpoints.py +++ b/tests/test_sensorthings_endpoints.py @@ -2,6 +2,7 @@ import json from collections import Counter from django.test import Client +test = '{"value": [{"@iot.id": "3b7818af-eff7-4149-8517-e5cad9dc22e1", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')", "name": "Utah Water Research Lab", "description": "A test thing.", "properties": {"samplingFeatureType": "Site", "samplingFeatureCode": "UWRL", "siteType": "Other", "contactPeople": [{"firstName": "Alice", "lastName": "Johnson", "email": "alice@example.com", "organizationName": "Utah State University"}, {"firstName": "Bob", "lastName": "Smith", "email": "bob@example.com", "organizationName": null}], "lastUpdated": null}, "Locations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/Locations", "HistoricalLocations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/HistoricalLocations", "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/Datastreams"}, {"@iot.id": "76dadda5-224b-4e1f-8570-e385bd482b2d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')", "name": "Taggart Student Center", "description": "A test thing.", "properties": {"samplingFeatureType": "Site", "samplingFeatureCode": "TSC", "siteType": "Other", "contactPeople": [{"firstName": "Alice", "lastName": "Johnson", "email": "alice@example.com", "organizationName": "Utah State University"}], "lastUpdated": null}, "Locations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')/Locations", "HistoricalLocations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')/HistoricalLocations", "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')/Datastreams"}]}' @pytest.fixture @@ -17,23 +18,21 @@ def base_url(): ), ( # Test GET Datastreams of Thing as an anonymous user. 'Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')/Datastreams', 'get', 'anonymous', 5, 200, None, - '{"value": [{"@iot.id": "bf5542df-5500-45b4-aabc-4835534880ff", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": "2024-04-01T08:00:00Z/2024-04-03T08:00:00Z", "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": 3, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Observations"}, {"@iot.id": "c9ef4139-66c6-4eee-ab7e-a4c12111f498", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')", "name": "TSC Temperature - Empty", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Observations"}, {"@iot.id": "22074b3e-455a-4a4b-91c3-38e6cf85557d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Observations"}]}' - ), + '{"value": [{"@iot.id": "22074b3e-455a-4a4b-91c3-38e6cf85557d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Observations"}, {"@iot.id": "bf5542df-5500-45b4-aabc-4835534880ff", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": "2024-04-01T08:00:00Z/2024-04-03T08:00:00Z", "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": 3, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Observations"}, {"@iot.id": "c9ef4139-66c6-4eee-ab7e-a4c12111f498", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')", "name": "TSC Temperature - Empty", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Observations"}]}' ), ( # Test GET Locations of Thing as an anonymous user. 'Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/Locations', 'get', 'anonymous', 6, 200, None, '{"value": [{"@iot.id": "8a6f1578-060a-40d9-9064-f8c4af4da80d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'8a6f1578-060a-40d9-9064-f8c4af4da80d\')", "name": "Location for Utah Water Research Lab", "description": "A test location.", "encodingType": "application/geo+json", "location": {"type": "Feature", "geometry": {"type": "Point", "coordinates": [41.739742, -111.793766]}, "properties": {}}, "properties": {"state": "UT", "county": "Cache", "elevation_m": 1.0, "elevationDatum": "WGS84", "lastUpdated": null}, "Things@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'8a6f1578-060a-40d9-9064-f8c4af4da80d\')/Things", "HistoricalLocations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'8a6f1578-060a-40d9-9064-f8c4af4da80d\')/HistoricalLocations"}]}' ), ( # Test GET Things with count parameter. 'Things?$count=true', 'get', 'anonymous', 4, 200, None, - '{"@iot.count": 3, "value": [{"@iot.id": "3b7818af-eff7-4149-8517-e5cad9dc22e1", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')", "name": "Utah Water Research Lab", "description": "A test thing.", "properties": {"samplingFeatureType": "Site", "samplingFeatureCode": "UWRL", "siteType": "Other", "contactPeople": [{"firstName": "Alice", "lastName": "Johnson", "email": "alice@example.com", "organizationName": "Utah State University"}, {"firstName": "Bob", "lastName": "Smith", "email": "bob@example.com", "organizationName": null}], "lastUpdated": null}, "Locations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/Locations", "HistoricalLocations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/HistoricalLocations", "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/Datastreams"}, {"@iot.id": "76dadda5-224b-4e1f-8570-e385bd482b2d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')", "name": "Taggart Student Center", "description": "A test thing.", "properties": {"samplingFeatureType": "Site", "samplingFeatureCode": "TSC", "siteType": "Other", "contactPeople": [{"firstName": "Alice", "lastName": "Johnson", "email": "alice@example.com", "organizationName": "Utah State University"}], "lastUpdated": null}, "Locations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')/Locations", "HistoricalLocations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')/HistoricalLocations", "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')/Datastreams"}]}' - ), + '{"@iot.count": 2, "value": [{"@iot.id": "3b7818af-eff7-4149-8517-e5cad9dc22e1", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')", "name": "Utah Water Research Lab", "description": "A test thing.", "properties": {"samplingFeatureType": "Site", "samplingFeatureCode": "UWRL", "siteType": "Other", "contactPeople": [{"firstName": "Alice", "lastName": "Johnson", "email": "alice@example.com", "organizationName": "Utah State University"}, {"firstName": "Bob", "lastName": "Smith", "email": "bob@example.com", "organizationName": null}], "lastUpdated": null}, "Locations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/Locations", "HistoricalLocations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/HistoricalLocations", "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/Datastreams"}, {"@iot.id": "76dadda5-224b-4e1f-8570-e385bd482b2d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')", "name": "Taggart Student Center", "description": "A test thing.", "properties": {"samplingFeatureType": "Site", "samplingFeatureCode": "TSC", "siteType": "Other", "contactPeople": [{"firstName": "Alice", "lastName": "Johnson", "email": "alice@example.com", "organizationName": "Utah State University"}], "lastUpdated": null}, "Locations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')/Locations", "HistoricalLocations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')/HistoricalLocations", "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')/Datastreams"}]}' ), ( # Test GET Things with filter parameter. 'Things?$filter=name eq \'Utah Water Research Lab\'', 'get', 'anonymous', 3, 200, None, '{"value": [{"@iot.id": "3b7818af-eff7-4149-8517-e5cad9dc22e1", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')", "name": "Utah Water Research Lab", "description": "A test thing.", "properties": {"samplingFeatureType": "Site", "samplingFeatureCode": "UWRL", "siteType": "Other", "contactPeople": [{"firstName": "Alice", "lastName": "Johnson", "email": "alice@example.com", "organizationName": "Utah State University"}, {"firstName": "Bob", "lastName": "Smith", "email": "bob@example.com", "organizationName": null}], "lastUpdated": null}, "Locations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/Locations", "HistoricalLocations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/HistoricalLocations", "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/Datastreams"}]}' ), ( # Test GET Things with skip parameter. 'Things?$skip=1', 'get', 'anonymous', 3, 200, None, - '{"value": [{"@iot.id": "3b7818af-eff7-4149-8517-e5cad9dc22e1", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')", "name": "Utah Water Research Lab", "description": "A test thing.", "properties": {"samplingFeatureType": "Site", "samplingFeatureCode": "UWRL", "siteType": "Other", "contactPeople": [{"firstName": "Alice", "lastName": "Johnson", "email": "alice@example.com", "organizationName": "Utah State University"}, {"firstName": "Bob", "lastName": "Smith", "email": "bob@example.com", "organizationName": null}], "lastUpdated": null}, "Locations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/Locations", "HistoricalLocations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/HistoricalLocations", "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/Datastreams"}, {"@iot.id": "76dadda5-224b-4e1f-8570-e385bd482b2d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')", "name": "Taggart Student Center", "description": "A test thing.", "properties": {"samplingFeatureType": "Site", "samplingFeatureCode": "TSC", "siteType": "Other", "contactPeople": [{"firstName": "Alice", "lastName": "Johnson", "email": "alice@example.com", "organizationName": "Utah State University"}], "lastUpdated": null}, "Locations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')/Locations", "HistoricalLocations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')/HistoricalLocations", "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')/Datastreams"}]}' + '{"value": [{"@iot.id": "76dadda5-224b-4e1f-8570-e385bd482b2d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')", "name": "Taggart Student Center", "description": "A test thing.", "properties": {"samplingFeatureType": "Site", "samplingFeatureCode": "TSC", "siteType": "Other", "contactPeople": [{"firstName": "Alice", "lastName": "Johnson", "email": "alice@example.com", "organizationName": "Utah State University"}], "lastUpdated": null}, "Locations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')/Locations", "HistoricalLocations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')/HistoricalLocations", "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')/Datastreams"}]}' ), ( # Test GET Things with top parameter. 'Things?$top=1', 'get', 'anonymous', 3, 200, None, @@ -49,11 +48,10 @@ def base_url(): ), ( # Test GET Things of Location as an anonymous user. 'Locations(\'8a6f1578-060a-40d9-9064-f8c4af4da80d\')/Things', 'get', 'anonymous', 6, 200, None, - '{"value": [{"@iot.id": "3b7818af-eff7-4149-8517-e5cad9dc22e1", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')", "name": "Utah Water Research Lab", "description": "A test thing.", "properties": {"samplingFeatureType": "Site", "samplingFeatureCode": "UWRL", "siteType": "Other", "contactPeople": [{"firstName": "Alice", "lastName": "Johnson", "email": "alice@example.com", "organizationName": "Utah State University"}, {"firstName": "Bob", "lastName": "Smith", "email": "bob@example.com", "organizationName": null}], "lastUpdated": null}, "Locations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/Locations", "HistoricalLocations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/HistoricalLocations", "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/Datastreams"}]}' - ), + '{"value": [{"@iot.id": "3b7818af-eff7-4149-8517-e5cad9dc22e1", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')", "name": "Utah Water Research Lab", "description": "A test thing.", "properties": {"samplingFeatureType": "Site", "samplingFeatureCode": "UWRL", "siteType": "Other", "contactPeople": [{"firstName": "Alice", "lastName": "Johnson", "email": "alice@example.com", "organizationName": "Utah State University"}, {"firstName": "Bob", "lastName": "Smith", "email": "bob@example.com", "organizationName": null}], "lastUpdated": null}, "Locations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/Locations", "HistoricalLocations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/HistoricalLocations", "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'3b7818af-eff7-4149-8517-e5cad9dc22e1\')/Datastreams"}]}' ), ( # Test GET Locations with count parameter. 'Locations?$count=true', 'get', 'anonymous', 4, 200, None, - '{"@iot.count": 3, "value": [{"@iot.id": "8a6f1578-060a-40d9-9064-f8c4af4da80d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'8a6f1578-060a-40d9-9064-f8c4af4da80d\')", "name": "Location for Utah Water Research Lab", "description": "A test location.", "encodingType": "application/geo+json", "location": {"type": "Feature", "geometry": {"type": "Point", "coordinates": [41.739742, -111.793766]}, "properties": {}}, "properties": {"state": "UT", "county": "Cache", "elevation_m": 1.0, "elevationDatum": "WGS84", "lastUpdated": null}, "Things@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'8a6f1578-060a-40d9-9064-f8c4af4da80d\')/Things", "HistoricalLocations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'8a6f1578-060a-40d9-9064-f8c4af4da80d\')/HistoricalLocations"}, {"@iot.id": "5bba0397-096b-4d60-a3f0-c00f1e6e85da", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'5bba0397-096b-4d60-a3f0-c00f1e6e85da\')", "name": "Location for Taggart Student Center", "description": "A test location.", "encodingType": "application/geo+json", "location": {"type": "Feature", "geometry": {"type": "Point", "coordinates": [41.743042, -111.81325]}, "properties": {}}, "properties": {"state": "UT", "county": "Cache", "elevation_m": 1.0, "elevationDatum": "WGS84", "lastUpdated": null}, "Things@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'5bba0397-096b-4d60-a3f0-c00f1e6e85da\')/Things", "HistoricalLocations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'5bba0397-096b-4d60-a3f0-c00f1e6e85da\')/HistoricalLocations"}]}' + '{"@iot.count": 2, "value": [{"@iot.id": "8a6f1578-060a-40d9-9064-f8c4af4da80d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'8a6f1578-060a-40d9-9064-f8c4af4da80d\')", "name": "Location for Utah Water Research Lab", "description": "A test location.", "encodingType": "application/geo+json", "location": {"type": "Feature", "geometry": {"type": "Point", "coordinates": [41.739742, -111.793766]}, "properties": {}}, "properties": {"state": "UT", "county": "Cache", "elevation_m": 1.0, "elevationDatum": "WGS84", "lastUpdated": null}, "Things@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'8a6f1578-060a-40d9-9064-f8c4af4da80d\')/Things", "HistoricalLocations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'8a6f1578-060a-40d9-9064-f8c4af4da80d\')/HistoricalLocations"}, {"@iot.id": "5bba0397-096b-4d60-a3f0-c00f1e6e85da", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'5bba0397-096b-4d60-a3f0-c00f1e6e85da\')", "name": "Location for Taggart Student Center", "description": "A test location.", "encodingType": "application/geo+json", "location": {"type": "Feature", "geometry": {"type": "Point", "coordinates": [41.743042, -111.81325]}, "properties": {}}, "properties": {"state": "UT", "county": "Cache", "elevation_m": 1.0, "elevationDatum": "WGS84", "lastUpdated": null}, "Things@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'5bba0397-096b-4d60-a3f0-c00f1e6e85da\')/Things", "HistoricalLocations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'5bba0397-096b-4d60-a3f0-c00f1e6e85da\')/HistoricalLocations"}]}' ), ( # Test GET Locations with filter parameter. 'Locations?$filter=name eq \'Location for Utah Water Research Lab\'', 'get', 'anonymous', 3, 200, None, @@ -61,7 +59,7 @@ def base_url(): ), ( # Test GET Locations with skip parameter. 'Locations?$skip=1', 'get', 'anonymous', 3, 200, None, - '{"value": [{"@iot.id": "8a6f1578-060a-40d9-9064-f8c4af4da80d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'8a6f1578-060a-40d9-9064-f8c4af4da80d\')", "name": "Location for Utah Water Research Lab", "description": "A test location.", "encodingType": "application/geo+json", "location": {"type": "Feature", "geometry": {"type": "Point", "coordinates": [41.739742, -111.793766]}, "properties": {}}, "properties": {"state": "UT", "county": "Cache", "elevation_m": 1.0, "elevationDatum": "WGS84", "lastUpdated": null}, "Things@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'8a6f1578-060a-40d9-9064-f8c4af4da80d\')/Things", "HistoricalLocations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'8a6f1578-060a-40d9-9064-f8c4af4da80d\')/HistoricalLocations"}, {"@iot.id": "5bba0397-096b-4d60-a3f0-c00f1e6e85da", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'5bba0397-096b-4d60-a3f0-c00f1e6e85da\')", "name": "Location for Taggart Student Center", "description": "A test location.", "encodingType": "application/geo+json", "location": {"type": "Feature", "geometry": {"type": "Point", "coordinates": [41.743042, -111.81325]}, "properties": {}}, "properties": {"state": "UT", "county": "Cache", "elevation_m": 1.0, "elevationDatum": "WGS84", "lastUpdated": null}, "Things@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'5bba0397-096b-4d60-a3f0-c00f1e6e85da\')/Things", "HistoricalLocations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'5bba0397-096b-4d60-a3f0-c00f1e6e85da\')/HistoricalLocations"}]}' + '{"value": [{"@iot.id": "5bba0397-096b-4d60-a3f0-c00f1e6e85da", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'5bba0397-096b-4d60-a3f0-c00f1e6e85da\')", "name": "Location for Taggart Student Center", "description": "A test location.", "encodingType": "application/geo+json", "location": {"type": "Feature", "geometry": {"type": "Point", "coordinates": [41.743042, -111.81325]}, "properties": {}}, "properties": {"state": "UT", "county": "Cache", "elevation_m": 1.0, "elevationDatum": "WGS84", "lastUpdated": null}, "Things@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'5bba0397-096b-4d60-a3f0-c00f1e6e85da\')/Things", "HistoricalLocations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Locations(\'5bba0397-096b-4d60-a3f0-c00f1e6e85da\')/HistoricalLocations"}]}' ), ( # Test GET Locations with top parameter. 'Locations?$top=1', 'get', 'anonymous', 3, 200, None, @@ -77,75 +75,75 @@ def base_url(): ), ( # Test GET Sensors as anonymous user. 'Sensors', 'get', 'anonymous', 4, 200, None, - '{"value": [{"@iot.id": "c45c6050-dc52-4a37-a562-66816a6ef1b5", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'c45c6050-dc52-4a37-a562-66816a6ef1b5\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'c45c6050-dc52-4a37-a562-66816a6ef1b5\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "a9e79b5a-ae38-4314-abb0-604ee8d6049c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a9e79b5a-ae38-4314-abb0-604ee8d6049c\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a9e79b5a-ae38-4314-abb0-604ee8d6049c\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "5fbab69a-810b-4044-bfac-c40a05634c5c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'5fbab69a-810b-4044-bfac-c40a05634c5c\')", "name": "test_sensor_2", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'5fbab69a-810b-4044-bfac-c40a05634c5c\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "41ebe791-3868-4c09-9744-f6954d295edc", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'41ebe791-3868-4c09-9744-f6954d295edc\')", "name": "test_sensor_2", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'41ebe791-3868-4c09-9744-f6954d295edc\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "a8617070-146a-4e82-8b4d-9a6563de6265", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a8617070-146a-4e82-8b4d-9a6563de6265\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a8617070-146a-4e82-8b4d-9a6563de6265\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}]}' + '{"value": [{"@iot.id": "a8617070-146a-4e82-8b4d-9a6563de6265", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a8617070-146a-4e82-8b4d-9a6563de6265\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a8617070-146a-4e82-8b4d-9a6563de6265\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "c45c6050-dc52-4a37-a562-66816a6ef1b5", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'c45c6050-dc52-4a37-a562-66816a6ef1b5\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'c45c6050-dc52-4a37-a562-66816a6ef1b5\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "41ebe791-3868-4c09-9744-f6954d295edc", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'41ebe791-3868-4c09-9744-f6954d295edc\')", "name": "test_sensor_2", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'41ebe791-3868-4c09-9744-f6954d295edc\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "5fbab69a-810b-4044-bfac-c40a05634c5c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'5fbab69a-810b-4044-bfac-c40a05634c5c\')", "name": "test_sensor_2", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'5fbab69a-810b-4044-bfac-c40a05634c5c\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "a9e79b5a-ae38-4314-abb0-604ee8d6049c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a9e79b5a-ae38-4314-abb0-604ee8d6049c\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a9e79b5a-ae38-4314-abb0-604ee8d6049c\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}]}' ), ( # Test GET Sensors with count parameter. 'Sensors?$count=true', 'get', 'anonymous', 4, 200, None, - '{"@iot.count": 5, "value": [{"@iot.id": "c45c6050-dc52-4a37-a562-66816a6ef1b5", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'c45c6050-dc52-4a37-a562-66816a6ef1b5\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'c45c6050-dc52-4a37-a562-66816a6ef1b5\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "a9e79b5a-ae38-4314-abb0-604ee8d6049c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a9e79b5a-ae38-4314-abb0-604ee8d6049c\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a9e79b5a-ae38-4314-abb0-604ee8d6049c\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "5fbab69a-810b-4044-bfac-c40a05634c5c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'5fbab69a-810b-4044-bfac-c40a05634c5c\')", "name": "test_sensor_2", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'5fbab69a-810b-4044-bfac-c40a05634c5c\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "41ebe791-3868-4c09-9744-f6954d295edc", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'41ebe791-3868-4c09-9744-f6954d295edc\')", "name": "test_sensor_2", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'41ebe791-3868-4c09-9744-f6954d295edc\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "a8617070-146a-4e82-8b4d-9a6563de6265", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a8617070-146a-4e82-8b4d-9a6563de6265\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a8617070-146a-4e82-8b4d-9a6563de6265\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}]}' + '{"@iot.count": 5, "value": [{"@iot.id": "a8617070-146a-4e82-8b4d-9a6563de6265", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a8617070-146a-4e82-8b4d-9a6563de6265\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a8617070-146a-4e82-8b4d-9a6563de6265\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "c45c6050-dc52-4a37-a562-66816a6ef1b5", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'c45c6050-dc52-4a37-a562-66816a6ef1b5\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'c45c6050-dc52-4a37-a562-66816a6ef1b5\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "41ebe791-3868-4c09-9744-f6954d295edc", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'41ebe791-3868-4c09-9744-f6954d295edc\')", "name": "test_sensor_2", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'41ebe791-3868-4c09-9744-f6954d295edc\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "5fbab69a-810b-4044-bfac-c40a05634c5c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'5fbab69a-810b-4044-bfac-c40a05634c5c\')", "name": "test_sensor_2", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'5fbab69a-810b-4044-bfac-c40a05634c5c\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "a9e79b5a-ae38-4314-abb0-604ee8d6049c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a9e79b5a-ae38-4314-abb0-604ee8d6049c\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a9e79b5a-ae38-4314-abb0-604ee8d6049c\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}]}' ), ( # Test GET Sensors with filter parameter. 'Sensors?$filter=name eq \'test_sensor_2\'', 'get', 'anonymous', 3, 200, None, - '{"value": [{"@iot.id": "5fbab69a-810b-4044-bfac-c40a05634c5c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'5fbab69a-810b-4044-bfac-c40a05634c5c\')", "name": "test_sensor_2", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'5fbab69a-810b-4044-bfac-c40a05634c5c\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "41ebe791-3868-4c09-9744-f6954d295edc", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'41ebe791-3868-4c09-9744-f6954d295edc\')", "name": "test_sensor_2", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'41ebe791-3868-4c09-9744-f6954d295edc\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}]}' + '{"value": [{"@iot.id": "41ebe791-3868-4c09-9744-f6954d295edc", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'41ebe791-3868-4c09-9744-f6954d295edc\')", "name": "test_sensor_2", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'41ebe791-3868-4c09-9744-f6954d295edc\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "5fbab69a-810b-4044-bfac-c40a05634c5c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'5fbab69a-810b-4044-bfac-c40a05634c5c\')", "name": "test_sensor_2", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'5fbab69a-810b-4044-bfac-c40a05634c5c\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}]}' ), ( # Test GET Sensors with skip parameter. 'Sensors?$skip=1', 'get', 'anonymous', 3, 200, None, - '{"value": [{"@iot.id": "a9e79b5a-ae38-4314-abb0-604ee8d6049c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a9e79b5a-ae38-4314-abb0-604ee8d6049c\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a9e79b5a-ae38-4314-abb0-604ee8d6049c\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "5fbab69a-810b-4044-bfac-c40a05634c5c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'5fbab69a-810b-4044-bfac-c40a05634c5c\')", "name": "test_sensor_2", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'5fbab69a-810b-4044-bfac-c40a05634c5c\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "41ebe791-3868-4c09-9744-f6954d295edc", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'41ebe791-3868-4c09-9744-f6954d295edc\')", "name": "test_sensor_2", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'41ebe791-3868-4c09-9744-f6954d295edc\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "a8617070-146a-4e82-8b4d-9a6563de6265", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a8617070-146a-4e82-8b4d-9a6563de6265\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a8617070-146a-4e82-8b4d-9a6563de6265\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}]}' + '{"value": [{"@iot.id": "c45c6050-dc52-4a37-a562-66816a6ef1b5", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'c45c6050-dc52-4a37-a562-66816a6ef1b5\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'c45c6050-dc52-4a37-a562-66816a6ef1b5\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "41ebe791-3868-4c09-9744-f6954d295edc", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'41ebe791-3868-4c09-9744-f6954d295edc\')", "name": "test_sensor_2", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'41ebe791-3868-4c09-9744-f6954d295edc\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "5fbab69a-810b-4044-bfac-c40a05634c5c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'5fbab69a-810b-4044-bfac-c40a05634c5c\')", "name": "test_sensor_2", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'5fbab69a-810b-4044-bfac-c40a05634c5c\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "a9e79b5a-ae38-4314-abb0-604ee8d6049c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a9e79b5a-ae38-4314-abb0-604ee8d6049c\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a9e79b5a-ae38-4314-abb0-604ee8d6049c\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}]}' ), ( # Test GET Sensors with top parameter. 'Sensors?$top=1', 'get', 'anonymous', 3, 200, None, - '{"value": [{"@iot.id": "c45c6050-dc52-4a37-a562-66816a6ef1b5", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'c45c6050-dc52-4a37-a562-66816a6ef1b5\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'c45c6050-dc52-4a37-a562-66816a6ef1b5\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}], "@iot.nextLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors?$skip=1&$top=1"}' + '{"value": [{"@iot.id": "41ebe791-3868-4c09-9744-f6954d295edc", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'41ebe791-3868-4c09-9744-f6954d295edc\')", "name": "test_sensor_2", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'41ebe791-3868-4c09-9744-f6954d295edc\')/Datastreams", "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}], "@iot.nextLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors?$skip=1&$top=1"}' ), ( # Test GET Sensors with expand parameter. 'Sensors?$expand=Datastreams', 'get', 'anonymous', 10, 200, None, - '{"value": [{"@iot.id": "c45c6050-dc52-4a37-a562-66816a6ef1b5", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'c45c6050-dc52-4a37-a562-66816a6ef1b5\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams": [], "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "a9e79b5a-ae38-4314-abb0-604ee8d6049c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a9e79b5a-ae38-4314-abb0-604ee8d6049c\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams": [{"@iot.id": "22074b3e-455a-4a4b-91c3-38e6cf85557d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}}, {"@iot.id": "bf5542df-5500-45b4-aabc-4835534880ff", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": "2024-04-01T08:00:00Z/2024-04-03T08:00:00Z", "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": 3, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}}, {"@iot.id": "c9ef4139-66c6-4eee-ab7e-a4c12111f498", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')", "name": "TSC Temperature - Empty", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}}], "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "5fbab69a-810b-4044-bfac-c40a05634c5c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'5fbab69a-810b-4044-bfac-c40a05634c5c\')", "name": "test_sensor_2", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams": [], "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "41ebe791-3868-4c09-9744-f6954d295edc", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'41ebe791-3868-4c09-9744-f6954d295edc\')", "name": "test_sensor_2", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams": [], "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "a8617070-146a-4e82-8b4d-9a6563de6265", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a8617070-146a-4e82-8b4d-9a6563de6265\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams": [], "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}]}' + '{"value": [{"@iot.id": "a8617070-146a-4e82-8b4d-9a6563de6265", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a8617070-146a-4e82-8b4d-9a6563de6265\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams": [], "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "c45c6050-dc52-4a37-a562-66816a6ef1b5", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'c45c6050-dc52-4a37-a562-66816a6ef1b5\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams": [], "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "41ebe791-3868-4c09-9744-f6954d295edc", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'41ebe791-3868-4c09-9744-f6954d295edc\')", "name": "test_sensor_2", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams": [], "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "5fbab69a-810b-4044-bfac-c40a05634c5c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'5fbab69a-810b-4044-bfac-c40a05634c5c\')", "name": "test_sensor_2", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams": [], "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, {"@iot.id": "a9e79b5a-ae38-4314-abb0-604ee8d6049c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a9e79b5a-ae38-4314-abb0-604ee8d6049c\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "Datastreams": [{"@iot.id": "22074b3e-455a-4a4b-91c3-38e6cf85557d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}}, {"@iot.id": "bf5542df-5500-45b4-aabc-4835534880ff", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": "2024-04-01T08:00:00Z/2024-04-03T08:00:00Z", "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": 3, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}}, {"@iot.id": "c9ef4139-66c6-4eee-ab7e-a4c12111f498", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')", "name": "TSC Temperature - Empty", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}}], "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}]}' ), ( # Test GET ObservedProperties as anonymous user. 'ObservedProperties', 'get', 'anonymous', 4, 200, None, - '{"value": [{"@iot.id": "11e37e36-3d65-497a-b432-e238ec45195b", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'11e37e36-3d65-497a-b432-e238ec45195b\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'11e37e36-3d65-497a-b432-e238ec45195b\')/Datastreams"}, {"@iot.id": "cda18a59-3f2c-4c09-976f-3eadc34423bb", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')/Datastreams"}, {"@iot.id": "c1479bbc-3d7e-449c-ad3a-0a1c7742b460", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'c1479bbc-3d7e-449c-ad3a-0a1c7742b460\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'c1479bbc-3d7e-449c-ad3a-0a1c7742b460\')/Datastreams"}, {"@iot.id": "b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1\')/Datastreams"}, {"@iot.id": "2f89ca87-667f-4de9-b850-715db3cbf927", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'2f89ca87-667f-4de9-b850-715db3cbf927\')", "name": "Velocity", "definition": "http://www.example.com/velocity", "description": "A test property.", "properties": {"variableCode": "VELO", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'2f89ca87-667f-4de9-b850-715db3cbf927\')/Datastreams"}]}' + '{"value": [{"@iot.id": "c1479bbc-3d7e-449c-ad3a-0a1c7742b460", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'c1479bbc-3d7e-449c-ad3a-0a1c7742b460\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'c1479bbc-3d7e-449c-ad3a-0a1c7742b460\')/Datastreams"}, {"@iot.id": "2f89ca87-667f-4de9-b850-715db3cbf927", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'2f89ca87-667f-4de9-b850-715db3cbf927\')", "name": "Velocity", "definition": "http://www.example.com/velocity", "description": "A test property.", "properties": {"variableCode": "VELO", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'2f89ca87-667f-4de9-b850-715db3cbf927\')/Datastreams"}, {"@iot.id": "b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1\')/Datastreams"}, {"@iot.id": "cda18a59-3f2c-4c09-976f-3eadc34423bb", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')/Datastreams"}, {"@iot.id": "11e37e36-3d65-497a-b432-e238ec45195b", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'11e37e36-3d65-497a-b432-e238ec45195b\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'11e37e36-3d65-497a-b432-e238ec45195b\')/Datastreams"}]}' ), ( # Test GET ObservedProperties with count parameter. 'ObservedProperties?$count=true', 'get', 'anonymous', 4, 200, None, - '{"@iot.count": 5, "value": [{"@iot.id": "11e37e36-3d65-497a-b432-e238ec45195b", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'11e37e36-3d65-497a-b432-e238ec45195b\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'11e37e36-3d65-497a-b432-e238ec45195b\')/Datastreams"}, {"@iot.id": "cda18a59-3f2c-4c09-976f-3eadc34423bb", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')/Datastreams"}, {"@iot.id": "c1479bbc-3d7e-449c-ad3a-0a1c7742b460", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'c1479bbc-3d7e-449c-ad3a-0a1c7742b460\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'c1479bbc-3d7e-449c-ad3a-0a1c7742b460\')/Datastreams"}, {"@iot.id": "b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1\')/Datastreams"}, {"@iot.id": "2f89ca87-667f-4de9-b850-715db3cbf927", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'2f89ca87-667f-4de9-b850-715db3cbf927\')", "name": "Velocity", "definition": "http://www.example.com/velocity", "description": "A test property.", "properties": {"variableCode": "VELO", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'2f89ca87-667f-4de9-b850-715db3cbf927\')/Datastreams"}]}' + '{"@iot.count": 5, "value": [{"@iot.id": "c1479bbc-3d7e-449c-ad3a-0a1c7742b460", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'c1479bbc-3d7e-449c-ad3a-0a1c7742b460\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'c1479bbc-3d7e-449c-ad3a-0a1c7742b460\')/Datastreams"}, {"@iot.id": "2f89ca87-667f-4de9-b850-715db3cbf927", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'2f89ca87-667f-4de9-b850-715db3cbf927\')", "name": "Velocity", "definition": "http://www.example.com/velocity", "description": "A test property.", "properties": {"variableCode": "VELO", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'2f89ca87-667f-4de9-b850-715db3cbf927\')/Datastreams"}, {"@iot.id": "b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1\')/Datastreams"}, {"@iot.id": "cda18a59-3f2c-4c09-976f-3eadc34423bb", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')/Datastreams"}, {"@iot.id": "11e37e36-3d65-497a-b432-e238ec45195b", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'11e37e36-3d65-497a-b432-e238ec45195b\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'11e37e36-3d65-497a-b432-e238ec45195b\')/Datastreams"}]}' ), ( # Test GET ObservedProperties with filter parameter. 'ObservedProperties?$filter=name eq \'Temperature\'', 'get', 'anonymous', 3, 200, None, - '{"value": [{"@iot.id": "11e37e36-3d65-497a-b432-e238ec45195b", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'11e37e36-3d65-497a-b432-e238ec45195b\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'11e37e36-3d65-497a-b432-e238ec45195b\')/Datastreams"}, {"@iot.id": "cda18a59-3f2c-4c09-976f-3eadc34423bb", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')/Datastreams"}, {"@iot.id": "c1479bbc-3d7e-449c-ad3a-0a1c7742b460", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'c1479bbc-3d7e-449c-ad3a-0a1c7742b460\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'c1479bbc-3d7e-449c-ad3a-0a1c7742b460\')/Datastreams"}, {"@iot.id": "b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1\')/Datastreams"}]}' + '{"value": [{"@iot.id": "11e37e36-3d65-497a-b432-e238ec45195b", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'11e37e36-3d65-497a-b432-e238ec45195b\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'11e37e36-3d65-497a-b432-e238ec45195b\')/Datastreams"}, {"@iot.id": "b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1\')/Datastreams"}, {"@iot.id": "c1479bbc-3d7e-449c-ad3a-0a1c7742b460", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'c1479bbc-3d7e-449c-ad3a-0a1c7742b460\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'c1479bbc-3d7e-449c-ad3a-0a1c7742b460\')/Datastreams"}, {"@iot.id": "cda18a59-3f2c-4c09-976f-3eadc34423bb", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')/Datastreams"}]}' ), ( # Test GET ObservedProperties with skip parameter. 'ObservedProperties?$skip=1', 'get', 'anonymous', 3, 200, None, - '{"value": [{"@iot.id": "cda18a59-3f2c-4c09-976f-3eadc34423bb", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')/Datastreams"}, {"@iot.id": "c1479bbc-3d7e-449c-ad3a-0a1c7742b460", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'c1479bbc-3d7e-449c-ad3a-0a1c7742b460\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'c1479bbc-3d7e-449c-ad3a-0a1c7742b460\')/Datastreams"}, {"@iot.id": "b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1\')/Datastreams"}, {"@iot.id": "2f89ca87-667f-4de9-b850-715db3cbf927", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'2f89ca87-667f-4de9-b850-715db3cbf927\')", "name": "Velocity", "definition": "http://www.example.com/velocity", "description": "A test property.", "properties": {"variableCode": "VELO", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'2f89ca87-667f-4de9-b850-715db3cbf927\')/Datastreams"}]}' + '{"value": [{"@iot.id": "2f89ca87-667f-4de9-b850-715db3cbf927", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'2f89ca87-667f-4de9-b850-715db3cbf927\')", "name": "Velocity", "definition": "http://www.example.com/velocity", "description": "A test property.", "properties": {"variableCode": "VELO", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'2f89ca87-667f-4de9-b850-715db3cbf927\')/Datastreams"}, {"@iot.id": "b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1\')/Datastreams"}, {"@iot.id": "cda18a59-3f2c-4c09-976f-3eadc34423bb", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')/Datastreams"}, {"@iot.id": "11e37e36-3d65-497a-b432-e238ec45195b", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'11e37e36-3d65-497a-b432-e238ec45195b\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'11e37e36-3d65-497a-b432-e238ec45195b\')/Datastreams"}]}' ), ( # Test GET ObservedProperties with top parameter. 'ObservedProperties?$top=1', 'get', 'anonymous', 3, 200, None, - '{"value": [{"@iot.id": "11e37e36-3d65-497a-b432-e238ec45195b", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'11e37e36-3d65-497a-b432-e238ec45195b\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'11e37e36-3d65-497a-b432-e238ec45195b\')/Datastreams"}], "@iot.nextLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties?$skip=1&$top=1"}' + '{"value": [{"@iot.id": "c1479bbc-3d7e-449c-ad3a-0a1c7742b460", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'c1479bbc-3d7e-449c-ad3a-0a1c7742b460\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'c1479bbc-3d7e-449c-ad3a-0a1c7742b460\')/Datastreams"}], "@iot.nextLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties?$skip=1&$top=1"}' ), ( # Test GET ObservedProperties with expand parameter. 'ObservedProperties?$expand=Datastreams', 'get', 'anonymous', 10, 200, None, - '{"value": [{"@iot.id": "11e37e36-3d65-497a-b432-e238ec45195b", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'11e37e36-3d65-497a-b432-e238ec45195b\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams": []}, {"@iot.id": "cda18a59-3f2c-4c09-976f-3eadc34423bb", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams": [{"@iot.id": "22074b3e-455a-4a4b-91c3-38e6cf85557d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}}, {"@iot.id": "bf5542df-5500-45b4-aabc-4835534880ff", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": "2024-04-01T08:00:00Z/2024-04-03T08:00:00Z", "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": 3, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}}, {"@iot.id": "c9ef4139-66c6-4eee-ab7e-a4c12111f498", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')", "name": "TSC Temperature - Empty", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}}]}, {"@iot.id": "c1479bbc-3d7e-449c-ad3a-0a1c7742b460", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'c1479bbc-3d7e-449c-ad3a-0a1c7742b460\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams": []}, {"@iot.id": "b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams": []}, {"@iot.id": "2f89ca87-667f-4de9-b850-715db3cbf927", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'2f89ca87-667f-4de9-b850-715db3cbf927\')", "name": "Velocity", "definition": "http://www.example.com/velocity", "description": "A test property.", "properties": {"variableCode": "VELO", "variableType": "Variable", "lastUpdated": null}, "Datastreams": []}]}' + '{"value": [{"@iot.id": "c1479bbc-3d7e-449c-ad3a-0a1c7742b460", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'c1479bbc-3d7e-449c-ad3a-0a1c7742b460\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams": []}, {"@iot.id": "2f89ca87-667f-4de9-b850-715db3cbf927", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'2f89ca87-667f-4de9-b850-715db3cbf927\')", "name": "Velocity", "definition": "http://www.example.com/velocity", "description": "A test property.", "properties": {"variableCode": "VELO", "variableType": "Variable", "lastUpdated": null}, "Datastreams": []}, {"@iot.id": "b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'b6bfee6e-b8d6-46cd-972a-bdd56bd41bd1\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams": []}, {"@iot.id": "cda18a59-3f2c-4c09-976f-3eadc34423bb", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams": [{"@iot.id": "22074b3e-455a-4a4b-91c3-38e6cf85557d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}}, {"@iot.id": "bf5542df-5500-45b4-aabc-4835534880ff", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": "2024-04-01T08:00:00Z/2024-04-03T08:00:00Z", "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": 3, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}}, {"@iot.id": "c9ef4139-66c6-4eee-ab7e-a4c12111f498", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')", "name": "TSC Temperature - Empty", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}}]}, {"@iot.id": "11e37e36-3d65-497a-b432-e238ec45195b", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'11e37e36-3d65-497a-b432-e238ec45195b\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}, "Datastreams": []}]}' ), ( # Test GET Datastreams as anonymous user. 'Datastreams', 'get', 'anonymous', 4, 200, None, - '{"value": [{"@iot.id": "bf5542df-5500-45b4-aabc-4835534880ff", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": "2024-04-01T08:00:00Z/2024-04-03T08:00:00Z", "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": 3, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Observations"}, {"@iot.id": "c9ef4139-66c6-4eee-ab7e-a4c12111f498", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')", "name": "TSC Temperature - Empty", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Observations"}, {"@iot.id": "22074b3e-455a-4a4b-91c3-38e6cf85557d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Observations"}]}' + '{"value": [{"@iot.id": "22074b3e-455a-4a4b-91c3-38e6cf85557d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Observations"}, {"@iot.id": "bf5542df-5500-45b4-aabc-4835534880ff", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": "2024-04-01T08:00:00Z/2024-04-03T08:00:00Z", "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": 3, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Observations"}, {"@iot.id": "c9ef4139-66c6-4eee-ab7e-a4c12111f498", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')", "name": "TSC Temperature - Empty", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Observations"}]}' ), ( # Test GET Datastreams with count parameter. 'Datastreams?$count=true', 'get', 'anonymous', 4, 200, None, - '{"@iot.count": 3, "value": [{"@iot.id": "bf5542df-5500-45b4-aabc-4835534880ff", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": "2024-04-01T08:00:00Z/2024-04-03T08:00:00Z", "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": 3, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Observations"}, {"@iot.id": "c9ef4139-66c6-4eee-ab7e-a4c12111f498", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')", "name": "TSC Temperature - Empty", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Observations"}, {"@iot.id": "22074b3e-455a-4a4b-91c3-38e6cf85557d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Observations"}]}' + '{"@iot.count": 3, "value": [{"@iot.id": "22074b3e-455a-4a4b-91c3-38e6cf85557d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Observations"}, {"@iot.id": "bf5542df-5500-45b4-aabc-4835534880ff", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": "2024-04-01T08:00:00Z/2024-04-03T08:00:00Z", "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": 3, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Observations"}, {"@iot.id": "c9ef4139-66c6-4eee-ab7e-a4c12111f498", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')", "name": "TSC Temperature - Empty", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Observations"}]}' ), ( # Test GET Datastreams with filter parameter. 'Datastreams?$filter=name eq \'TSC Temperature\'', 'get', 'anonymous', 3, 200, None, - '{"value": [{"@iot.id": "bf5542df-5500-45b4-aabc-4835534880ff", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": "2024-04-01T08:00:00Z/2024-04-03T08:00:00Z", "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": 3, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Observations"}, {"@iot.id": "22074b3e-455a-4a4b-91c3-38e6cf85557d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Observations"}]}' + '{"value": [{"@iot.id": "22074b3e-455a-4a4b-91c3-38e6cf85557d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Observations"}, {"@iot.id": "bf5542df-5500-45b4-aabc-4835534880ff", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": "2024-04-01T08:00:00Z/2024-04-03T08:00:00Z", "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": 3, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Observations"}]}' ), ( # Test GET Datastreams with skip parameter. 'Datastreams?$skip=1', 'get', 'anonymous', 3, 200, None, - '{"value": [{"@iot.id": "c9ef4139-66c6-4eee-ab7e-a4c12111f498", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')", "name": "TSC Temperature - Empty", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Observations"}, {"@iot.id": "22074b3e-455a-4a4b-91c3-38e6cf85557d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Observations"}]}' + '{"value": [{"@iot.id": "bf5542df-5500-45b4-aabc-4835534880ff", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": "2024-04-01T08:00:00Z/2024-04-03T08:00:00Z", "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": 3, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Observations"}, {"@iot.id": "c9ef4139-66c6-4eee-ab7e-a4c12111f498", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')", "name": "TSC Temperature - Empty", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')/Observations"}]}' ), ( # Test GET Datastreams with top parameter. 'Datastreams?$top=1', 'get', 'anonymous', 3, 200, None, - '{"value": [{"@iot.id": "bf5542df-5500-45b4-aabc-4835534880ff", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": "2024-04-01T08:00:00Z/2024-04-03T08:00:00Z", "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": 3, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')/Observations"}], "@iot.nextLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams?$skip=1&$top=1"}' + '{"value": [{"@iot.id": "22074b3e-455a-4a4b-91c3-38e6cf85557d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Thing", "Sensor@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Sensor", "ObservedProperty@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/ObservedProperty", "Observations@iot.navigationLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')/Observations"}], "@iot.nextLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams?$skip=1&$top=1"}' ), ( # Test GET Datastreams with expand parameter. 'Datastreams?$expand=Sensor,Thing,ObservedProperty,Observations', 'get', 'anonymous', 12, 200, None, - '{"value": [{"@iot.id": "bf5542df-5500-45b4-aabc-4835534880ff", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": "2024-04-01T08:00:00Z/2024-04-03T08:00:00Z", "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": 3, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing": {"@iot.id": "76dadda5-224b-4e1f-8570-e385bd482b2d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')", "name": "Taggart Student Center", "description": "A test thing.", "properties": {"samplingFeatureType": "Site", "samplingFeatureCode": "TSC", "siteType": "Other", "contactPeople": [{"firstName": "Alice", "lastName": "Johnson", "email": "alice@example.com", "organizationName": "Utah State University"}], "lastUpdated": null}}, "Sensor": {"@iot.id": "a9e79b5a-ae38-4314-abb0-604ee8d6049c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a9e79b5a-ae38-4314-abb0-604ee8d6049c\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, "ObservedProperty": {"@iot.id": "cda18a59-3f2c-4c09-976f-3eadc34423bb", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}}, "Observations": [{"@iot.id": "d4e7aa38-0403-437d-958d-849b55cfa015", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Observations(\'d4e7aa38-0403-437d-958d-849b55cfa015\')", "phenomenonTime": "2024-04-01T08:00:00Z", "result": 17.0, "resultTime": null, "resultQuality": {"qualityCode": null, "resultQualifiers": []}}, {"@iot.id": "9dcc8283-6c4b-42db-9ca2-a5774daca342", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Observations(\'9dcc8283-6c4b-42db-9ca2-a5774daca342\')", "phenomenonTime": "2024-04-02T08:00:00Z", "result": 18.0, "resultTime": null, "resultQuality": {"qualityCode": null, "resultQualifiers": []}}, {"@iot.id": "85b8e827-aeb1-4415-9647-5ae20ee04ec1", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Observations(\'85b8e827-aeb1-4415-9647-5ae20ee04ec1\')", "phenomenonTime": "2024-04-03T08:00:00Z", "result": 0.0, "resultTime": null, "resultQuality": {"qualityCode": null, "resultQualifiers": [{"code": "ICE", "description": "Ice formed on the sensor."}, {"code": "PF", "description": "Power failure."}]}}]}, {"@iot.id": "c9ef4139-66c6-4eee-ab7e-a4c12111f498", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')", "name": "TSC Temperature - Empty", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing": {"@iot.id": "76dadda5-224b-4e1f-8570-e385bd482b2d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')", "name": "Taggart Student Center", "description": "A test thing.", "properties": {"samplingFeatureType": "Site", "samplingFeatureCode": "TSC", "siteType": "Other", "contactPeople": [{"firstName": "Alice", "lastName": "Johnson", "email": "alice@example.com", "organizationName": "Utah State University"}], "lastUpdated": null}}, "Sensor": {"@iot.id": "a9e79b5a-ae38-4314-abb0-604ee8d6049c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a9e79b5a-ae38-4314-abb0-604ee8d6049c\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, "ObservedProperty": {"@iot.id": "cda18a59-3f2c-4c09-976f-3eadc34423bb", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}}, "Observations": []}, {"@iot.id": "22074b3e-455a-4a4b-91c3-38e6cf85557d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing": {"@iot.id": "76dadda5-224b-4e1f-8570-e385bd482b2d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')", "name": "Taggart Student Center", "description": "A test thing.", "properties": {"samplingFeatureType": "Site", "samplingFeatureCode": "TSC", "siteType": "Other", "contactPeople": [{"firstName": "Alice", "lastName": "Johnson", "email": "alice@example.com", "organizationName": "Utah State University"}], "lastUpdated": null}}, "Sensor": {"@iot.id": "a9e79b5a-ae38-4314-abb0-604ee8d6049c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a9e79b5a-ae38-4314-abb0-604ee8d6049c\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, "ObservedProperty": {"@iot.id": "cda18a59-3f2c-4c09-976f-3eadc34423bb", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}}, "Observations": []}]}' + '{"value": [{"@iot.id": "22074b3e-455a-4a4b-91c3-38e6cf85557d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'22074b3e-455a-4a4b-91c3-38e6cf85557d\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing": {"@iot.id": "76dadda5-224b-4e1f-8570-e385bd482b2d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')", "name": "Taggart Student Center", "description": "A test thing.", "properties": {"samplingFeatureType": "Site", "samplingFeatureCode": "TSC", "siteType": "Other", "contactPeople": [{"firstName": "Alice", "lastName": "Johnson", "email": "alice@example.com", "organizationName": "Utah State University"}], "lastUpdated": null}}, "Sensor": {"@iot.id": "a9e79b5a-ae38-4314-abb0-604ee8d6049c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a9e79b5a-ae38-4314-abb0-604ee8d6049c\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, "ObservedProperty": {"@iot.id": "cda18a59-3f2c-4c09-976f-3eadc34423bb", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}}, "Observations": []}, {"@iot.id": "bf5542df-5500-45b4-aabc-4835534880ff", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'bf5542df-5500-45b4-aabc-4835534880ff\')", "name": "TSC Temperature", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": "2024-04-01T08:00:00Z/2024-04-03T08:00:00Z", "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": 3, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing": {"@iot.id": "76dadda5-224b-4e1f-8570-e385bd482b2d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')", "name": "Taggart Student Center", "description": "A test thing.", "properties": {"samplingFeatureType": "Site", "samplingFeatureCode": "TSC", "siteType": "Other", "contactPeople": [{"firstName": "Alice", "lastName": "Johnson", "email": "alice@example.com", "organizationName": "Utah State University"}], "lastUpdated": null}}, "Sensor": {"@iot.id": "a9e79b5a-ae38-4314-abb0-604ee8d6049c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a9e79b5a-ae38-4314-abb0-604ee8d6049c\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, "ObservedProperty": {"@iot.id": "cda18a59-3f2c-4c09-976f-3eadc34423bb", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}}, "Observations": [{"@iot.id": "d4e7aa38-0403-437d-958d-849b55cfa015", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Observations(\'d4e7aa38-0403-437d-958d-849b55cfa015\')", "phenomenonTime": "2024-04-01T08:00:00Z", "result": 17.0, "resultTime": null, "resultQuality": {"qualityCode": null, "resultQualifiers": []}}, {"@iot.id": "9dcc8283-6c4b-42db-9ca2-a5774daca342", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Observations(\'9dcc8283-6c4b-42db-9ca2-a5774daca342\')", "phenomenonTime": "2024-04-02T08:00:00Z", "result": 18.0, "resultTime": null, "resultQuality": {"qualityCode": null, "resultQualifiers": []}}, {"@iot.id": "85b8e827-aeb1-4415-9647-5ae20ee04ec1", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Observations(\'85b8e827-aeb1-4415-9647-5ae20ee04ec1\')", "phenomenonTime": "2024-04-03T08:00:00Z", "result": 0.0, "resultTime": null, "resultQuality": {"qualityCode": null, "resultQualifiers": [{"code": "ICE", "description": "Ice formed on the sensor."}, {"code": "PF", "description": "Power failure."}]}}]}, {"@iot.id": "c9ef4139-66c6-4eee-ab7e-a4c12111f498", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Datastreams(\'c9ef4139-66c6-4eee-ab7e-a4c12111f498\')", "name": "TSC Temperature - Empty", "description": "Temperature measured at the TSC.", "unitOfMeasurement": {"name": "Celsius", "symbol": "C", "definition": "http://www.example.com/celsius"}, "observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "phenomenonTime": null, "resultTime": null, "properties": {"resultType": "Time Series", "status": "Ongoing", "sampledMedium": "Air", "valueCount": null, "noDataValue": -9999.0, "processingLevelCode": "0", "intendedTimeSpacing": null, "intendedTimeSpacingUnitOfMeasurement": null, "aggregationStatistic": "Continuous", "timeAggregationInterval": 1.0, "timeAggregationIntervalUnitOfMeasurement": "minutes", "lastUpdated": null}, "Thing": {"@iot.id": "76dadda5-224b-4e1f-8570-e385bd482b2d", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Things(\'76dadda5-224b-4e1f-8570-e385bd482b2d\')", "name": "Taggart Student Center", "description": "A test thing.", "properties": {"samplingFeatureType": "Site", "samplingFeatureCode": "TSC", "siteType": "Other", "contactPeople": [{"firstName": "Alice", "lastName": "Johnson", "email": "alice@example.com", "organizationName": "Utah State University"}], "lastUpdated": null}}, "Sensor": {"@iot.id": "a9e79b5a-ae38-4314-abb0-604ee8d6049c", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/Sensors(\'a9e79b5a-ae38-4314-abb0-604ee8d6049c\')", "name": "Sensor", "description": "A test sensor.", "encodingType": "application/json", "properties": {}, "metadata": {"methodCode": "METHOD", "methodType": "Method", "methodLink": "http://www.example.com/method", "sensorModel": {"sensorModelName": "Sensor Model", "sensorModelURL": "http://www.example.com/model", "sensorManufacturer": "Sensor Manufacturer"}, "lastUpdated": null}}, "ObservedProperty": {"@iot.id": "cda18a59-3f2c-4c09-976f-3eadc34423bb", "@iot.selfLink": "http://127.0.0.1:3030/api/sensorthings/v1.1/ObservedProperties(\'cda18a59-3f2c-4c09-976f-3eadc34423bb\')", "name": "Temperature", "definition": "http://www.example.com/temperature", "description": "A test property.", "properties": {"variableCode": "TEMP", "variableType": "Variable", "lastUpdated": null}}, "Observations": []}]}' ), ( # Test GET Observations as anonymous user. 'Observations', 'get', 'anonymous', 4, 200, None,