diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1eee9121b71493ece606a8b7f055536ce09f3fa3..a1e8a9cd3f03949fcd0cf0f307ef7f324438899f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,10 +42,7 @@ docs: - zypper --non-interactive install python3-pip - pip install --upgrade pip - pip install --no-cache-dir -r requirements.txt - - pip install sphinx - - pip install sphinxcontrib.napoleon - - pip install sphinxcontrib.restbuilder - - pip install sphinxcontrib.websupport + - pip install --no-cache-dir -r requirements_for_documentation.txt - chmod +x ./CI/create_documentation.sh - ./CI/create_documentation.sh artifacts: diff --git a/docs/conf.py b/docs/conf.py index dc70d79ef66fce7c43adca5d5879cbc6582b4914..b734db2176e839c68154aa3671d4d8699d8d5ddf 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,6 +14,7 @@ # import os import sys +from recommonmark.parser import CommonMarkParser sys.path.insert(0, os.path.abspath('../')) #settings.configure() @@ -50,11 +51,18 @@ extensions = [ 'sphinx.ext.viewcode', 'sphinxcontrib.napoleon', 'sphinxcontrib.restbuilder', + 'sphinxcontrib.sqlalchemyviz', + 'recommonmark', + 'sphinx_markdown_tables', ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] +source_parsers = { + '.md': CommonMarkParser, +} + # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # diff --git a/docs/index.rst b/docs/index.rst index 21834b13020a2335f2ebe122e429f7dfa2f00dcf..faa33f26984f15f28d81422bc4a3a255b5d74964 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,10 +10,12 @@ Welcome to toar_db's documentation! :maxdepth: 5 oldDB + toardb_fastapi newDB global_data_sources + Indices and tables ================== diff --git a/docs/toardb_fastapi.md b/docs/toardb_fastapi.md new file mode 120000 index 0000000000000000000000000000000000000000..0fe74b8a9adc603294f0750c5a56552d23220f77 --- /dev/null +++ b/docs/toardb_fastapi.md @@ -0,0 +1 @@ +../toardb_fastapi.md \ No newline at end of file diff --git a/requirements_for_documentation.txt b/requirements_for_documentation.txt new file mode 100644 index 0000000000000000000000000000000000000000..871b4dcaf2d89725b0a137f56751003738220520 --- /dev/null +++ b/requirements_for_documentation.txt @@ -0,0 +1,19 @@ +< alabaster==0.7.12 +< commonmark==0.9.1 +< docutils==0.16 +< Jinja2==2.11.2 +< Markdown==3.2.2 +< MarkupSafe==1.1.1 +< pockets==0.9.1 +< recommonmark==0.6.0 +< sphinx-markdown-tables==0.0.15 +< sphinxcontrib-applehelp==1.0.2 +< sphinxcontrib-devhelp==1.0.2 +< sphinxcontrib-htmlhelp==1.0.3 +< sphinxcontrib-jsmath==1.0.1 +< sphinxcontrib-napoleon==0.7 +< sphinxcontrib-qthelp==1.0.3 +< sphinxcontrib-restbuilder==0.2 +< sphinxcontrib-serializinghtml==1.1.4 +< sphinxcontrib-sqlalchemyviz==0.5 +< sphinxcontrib-websupport==1.2.2 diff --git a/toardb/contacts/models_person.py b/toardb/contacts/models_person.py index b46fc3aafe3db128e19ececb8ba5d8c321cf6c9a..9d3c27adb95370d91c272911b438ea2c394968a5 100644 --- a/toardb/contacts/models_person.py +++ b/toardb/contacts/models_person.py @@ -3,7 +3,7 @@ class Person (Base) =================== """ -from sqlalchemy import Boolean, Column, Integer, String, Sequence +from sqlalchemy import Boolean, Column, Integer, String, Sequence, UniqueConstraint from toardb.base import Base PERSONS_ID_SEQ = Sequence('persons_id_seq') # define sequence explicitly diff --git a/toardb/timeseries/models_programme.py b/toardb/timeseries/models_programme.py index 8bdbcaa3f77acba7627bdf847a84a14c8c2ee9ed..cb5b40084b3f7d08c62c1e8ef9de55c7fe9a802b 100644 --- a/toardb/timeseries/models_programme.py +++ b/toardb/timeseries/models_programme.py @@ -24,6 +24,7 @@ class TimeseriesProgramme(Base): +-------------+------------------------+-----------+----------+---------------------------------------------------+ | description | text | | not null | | +-------------+------------------------+-----------+----------+---------------------------------------------------+ + Indexes: "timeseries_programmes_pkey" PRIMARY KEY, btree (id) """ diff --git a/toardb_fastapi.md b/toardb_fastapi.md new file mode 100644 index 0000000000000000000000000000000000000000..3c973368bc8a72030873b28199d456f6b211c80a --- /dev/null +++ b/toardb_fastapi.md @@ -0,0 +1,866 @@ +# FastAPI +## Version: 0.1.0 + +### /variables/ + +#### GET +##### Summary: + +Get Variables + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ---- | +| skip | query | | No | integer | +| limit | query | | No | integer | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +#### POST +##### Summary: + +Create Variable + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +### /variables/{name} + +#### GET +##### Summary: + +Get Variable + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ---- | +| name | path | | Yes | string | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +### /variables/id/{variable_id} + +#### GET +##### Summary: + +Get Variable + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ---- | +| variable_id | path | | Yes | integer | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +### /contacts/persons/ + +#### GET +##### Summary: + +Get All Persons + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ---- | +| skip | query | | No | integer | +| limit | query | | No | integer | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +#### POST +##### Summary: + +Create Person + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +### /contacts/persons/id/{person_id} + +#### GET +##### Summary: + +Get Person + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ---- | +| person_id | path | | Yes | integer | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +### /contacts/persons/{name} + +#### GET +##### Summary: + +Get Person + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ---- | +| name | path | | Yes | string | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +### /contacts/organisations/ + +#### GET +##### Summary: + +Get All Organisations + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ---- | +| skip | query | | No | integer | +| limit | query | | No | integer | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +#### POST +##### Summary: + +Create Organisation + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +### /contacts/organisations/id/{organisation_id} + +#### GET +##### Summary: + +Get Organisation + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ---- | +| organisation_id | path | | Yes | integer | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +### /contacts/organisations/{name} + +#### GET +##### Summary: + +Get Organisation + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ---- | +| name | path | | Yes | string | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +### /contacts/ + +#### GET +##### Summary: + +Get All Contacts + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ---- | +| skip | query | | No | integer | +| limit | query | | No | integer | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +### /stationmeta_core/ + +#### GET +##### Summary: + +Get All Stationmeta Core + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ---- | +| skip | query | | No | integer | +| limit | query | | No | integer | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +### /stationmeta/ + +#### GET +##### Summary: + +Get All Stationmeta + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ---- | +| skip | query | | No | integer | +| limit | query | | No | integer | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +#### POST +##### Summary: + +Create Stationmeta Core + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +### /stationmeta_core/{station_code} + +#### GET +##### Summary: + +Get Stationmeta Core + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ---- | +| station_code | path | | Yes | string | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +### /stationmeta/{station_code} + +#### GET +##### Summary: + +Get Stationmeta + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ---- | +| station_code | path | | Yes | string | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +### /timeseries/ + +#### GET +##### Summary: + +Get All Timeseries + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ---- | +| skip | query | | No | integer | +| limit | query | | No | integer | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +#### POST +##### Summary: + +Create Timeseries + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +### /timeseries/{timeseries_id} + +#### GET +##### Summary: + +Get Timeseries + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ---- | +| timeseries_id | path | | Yes | integer | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +### /data/ + +#### GET +##### Summary: + +Get All Data + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ---- | +| skip | query | | No | integer | +| limit | query | | No | integer | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +#### POST +##### Summary: + +Create Data + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +### /data/{timeseries_id} + +#### GET +##### Summary: + +Get Data + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ---- | +| timeseries_id | path | | Yes | integer | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Successful Response | +| 422 | Validation Error | + +### Models + + +#### Body_create_data_data__post + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| file | binary | | Yes | + +#### Body_create_organisation_contacts_organisations__post + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| organisation | [OrganisationCreate](#organisationcreate) | | Yes | + +#### Body_create_person_contacts_persons__post + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| person | [PersonCreate](#personcreate) | | Yes | + +#### Body_create_stationmeta_core_stationmeta__post + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| stationmeta | [StationmetaCreate](#stationmetacreate) | | Yes | + +#### Body_create_timeseries_timeseries__post + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| timeseries | [TimeseriesCreate](#timeseriescreate) | | Yes | + +#### Contact + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| person | [Person](#person) | | Yes | +| organisation | [Organisation](#organisation) | | Yes | + +#### Coordinates + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| lat | number | | No | +| lng | number | | No | +| alt | number | | Yes | + +#### Data + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| datetime | dateTime | | Yes | +| value | number | | Yes | +| flags | string | | Yes | +| timeseries_id | integer | | Yes | + +#### DataCreate + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| datetime | dateTime | | Yes | +| value | number | | Yes | +| flags | string | | Yes | +| timeseries_id | integer | | Yes | + +#### HTTPValidationError + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| detail | [ [ValidationError](#validationerror) ] | | No | + +#### Organisation + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | Yes | +| name | string | | Yes | +| longname | string | | Yes | +| kind | string | | Yes | +| city | string | | Yes | +| postcode | string | | Yes | +| street_address | string | | Yes | +| country | string | | Yes | +| homepage | string | | Yes | + +#### OrganisationCreate + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | No | +| name | string | | Yes | +| longname | string | | Yes | +| kind | string | | Yes | +| city | string | | Yes | +| postcode | string | | Yes | +| street_address | string | | Yes | +| country | string | | Yes | +| homepage | string | | Yes | + +#### Person + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | Yes | +| name | string | | Yes | +| email | string | | Yes | +| phone | string | | Yes | +| isprivate | boolean | | Yes | + +#### PersonCreate + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | No | +| name | string | | Yes | +| email | string | | Yes | +| phone | string | | Yes | +| isprivate | boolean | | Yes | + +#### Stationmeta + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | Yes | +| codes | [ string ] | | No | +| name | string | | Yes | +| coordinates | [Coordinates](#coordinates) | | Yes | +| country | string | | Yes | +| state | string | | Yes | +| coordinate_validation_status | string | | Yes | +| coordinate_validation_date | dateTime | | Yes | +| type_of_environment | string | | Yes | +| type_of_area | string | | Yes | +| timezone | string | | Yes | +| additional_metadata | string (json-string) | | No | +| coordinate_validator_id | integer | | Yes | +| roles | [ [StationmetaRole](#stationmetarole) ] | | No | +| annotations | [ [StationmetaAnnotation](#stationmetaannotation) ] | | No | +| aux_images | [ [StationmetaAuxImage](#stationmetaauximage) ] | | No | +| aux_docs | [ [StationmetaAuxDoc](#stationmetaauxdoc) ] | | No | +| aux_urls | [ [StationmetaAuxUrl](#stationmetaauxurl) ] | | No | +| globalmeta | [StationmetaGlobal](#stationmetaglobal) | | No | +| globalservice | [StationmetaGlobalService](#stationmetaglobalservice) | | No | + +#### StationmetaAnnotation + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | Yes | +| kind | integer | | Yes | +| text | string | | Yes | +| date_added | dateTime | | Yes | +| approved | boolean | | Yes | +| contributor_id | integer | | Yes | + +#### StationmetaAuxDoc + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | Yes | +| resource_description | string | | Yes | +| date_added | dateTime | | Yes | +| resource | string | | Yes | +| station_id | integer | | Yes | + +#### StationmetaAuxImage + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | Yes | +| resource_description | string | | Yes | +| date_added | dateTime | | Yes | +| resource | string | | Yes | +| image_height | integer | | Yes | +| image_width | integer | | Yes | +| station_id | integer | | Yes | + +#### StationmetaAuxUrl + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | Yes | +| resource_description | string | | Yes | +| date_added | dateTime | | Yes | +| resource | string | | Yes | +| station_id | integer | | Yes | + +#### StationmetaCore + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | Yes | +| codes | [ string ] | | No | +| name | string | | Yes | +| coordinates | [Coordinates](#coordinates) | | Yes | +| country | string | | Yes | +| state | string | | Yes | +| coordinate_validation_status | string | | Yes | +| coordinate_validation_date | dateTime | | Yes | +| type_of_environment | string | | Yes | +| type_of_area | string | | Yes | +| timezone | string | | Yes | +| additional_metadata | string (json-string) | | No | +| coordinate_validator_id | integer | | Yes | + +#### StationmetaCreate + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | No | +| codes | [ string ] | | No | +| name | string | | Yes | +| coordinates | [Coordinates](#coordinates) | | Yes | +| country | string | | Yes | +| state | string | | Yes | +| coordinate_validation_status | string | | Yes | +| coordinate_validation_date | dateTime | | Yes | +| type_of_environment | string | | Yes | +| type_of_area | string | | Yes | +| timezone | string | | Yes | +| additional_metadata | string (json-string) | | No | +| coordinate_validator_id | integer | | Yes | +| roles | [ [StationmetaRoleBase](#stationmetarolebase) ] | | No | +| annotations | [ [StationmetaAnnotation](#stationmetaannotation) ] | | No | +| aux_images | [ [StationmetaAuxImage](#stationmetaauximage) ] | | No | +| aux_docs | [ [StationmetaAuxDoc](#stationmetaauxdoc) ] | | No | +| aux_urls | [ [StationmetaAuxUrl](#stationmetaauxurl) ] | | No | +| globalmeta | [StationmetaGlobalNestedCreate](#stationmetaglobalnestedcreate) | | No | +| globalservice | [StationmetaGlobalService](#stationmetaglobalservice) | | No | + +#### StationmetaGlobal + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | Yes | +| population_density_year2010 | number | | Yes | +| max_population_density_25km_year2010 | number | | Yes | +| climatic_zone | string | | Yes | +| nightlight_1km_year2013 | number | | Yes | +| nightlight_5km_year2013 | number | | Yes | +| max_nightlight_25km_year2013 | number | | Yes | +| wheat_production_year2000 | number | | Yes | +| rice_production_year2000 | number | | Yes | +| edgar_htap_v2_nox_emissions_year2010 | number | | Yes | +| omi_no2_column_years2011to2015 | number | | Yes | +| htap_region_tier1 | string | | Yes | +| etopo_alt | number | | Yes | +| etopo_min_alt_5km | number | | Yes | +| etopo_relative_alt | number | | Yes | +| dominant_landcover_year2012 | string | | Yes | +| toar1_category | string | | Yes | +| station_id | integer | | Yes | + +#### StationmetaGlobalNestedCreate + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | No | +| population_density_year2010 | number | | No | +| max_population_density_25km_year2010 | number | | No | +| climatic_zone | string | | No | +| nightlight_1km_year2013 | number | | No | +| nightlight_5km_year2013 | number | | No | +| max_nightlight_25km_year2013 | number | | No | +| wheat_production_year2000 | number | | No | +| rice_production_year2000 | number | | No | +| edgar_htap_v2_nox_emissions_year2010 | number | | No | +| omi_no2_column_years2011to2015 | number | | No | +| htap_region_tier1 | integer | | No | +| etopo_alt | number | | No | +| etopo_min_alt_5km | number | | No | +| etopo_relative_alt | number | | No | +| dominant_landcover_year2012 | integer | | No | +| toar1_category | integer | | No | + +#### StationmetaGlobalService + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | Yes | +| variable_name | string | | Yes | +| result_type | integer | | Yes | +| result_nvalues | integer | | Yes | +| service_valid_year | integer | | Yes | +| service_url | string | | Yes | + +#### StationmetaRole + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | Yes | +| role | string | | Yes | +| status | string | | Yes | +| contact_id | integer | | Yes | + +#### StationmetaRoleBase + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | No | +| role | string | | Yes | +| status | string | | Yes | +| contact_id | integer | | Yes | + +#### Timeseries + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | Yes | +| label | string | | Yes | +| order | integer | | Yes | +| access_rights | string | | Yes | +| sampling_frequency | string | | Yes | +| aggregation | string | | Yes | +| source | string | | Yes | +| data_start_date | dateTime | | Yes | +| data_end_date | dateTime | | Yes | +| measurement_method | string | | Yes | +| sampling_height | number | | Yes | +| date_added | dateTime | | Yes | +| date_modified | dateTime | | Yes | +| additional_metadata | string (json-string) | | No | +| roles | [ [TimeseriesRole](#timeseriesrole) ] | | No | +| annotations | [ [TimeseriesAnnotation](#timeseriesannotation) ] | | No | +| variable | [Variable](#variable) | | Yes | +| station | | | No | +| programme | [TimeseriesProgramme](#timeseriesprogramme) | | Yes | + +#### TimeseriesAnnotation + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | Yes | +| kind | integer | | Yes | +| text | string | | Yes | +| date_added | dateTime | | Yes | +| approved | boolean | | Yes | +| contributor_id | integer | | Yes | +| timeseries_id | integer | | Yes | + +#### TimeseriesCreate + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | No | +| label | string | | Yes | +| order | integer | | Yes | +| access_rights | string | | Yes | +| sampling_frequency | string | | Yes | +| aggregation | string | | Yes | +| source | string | | Yes | +| data_start_date | dateTime | | Yes | +| data_end_date | dateTime | | Yes | +| measurement_method | string | | Yes | +| sampling_height | number | | Yes | +| date_added | dateTime | | Yes | +| date_modified | dateTime | | Yes | +| additional_metadata | string (json-string) | | No | +| station_id | integer | | Yes | +| variable_id | integer | | Yes | +| programme_id | integer | | Yes | +| roles | [ [TimeseriesRoleCreate](#timeseriesrolecreate) ] | | No | +| annotations | [ [TimeseriesAnnotation](#timeseriesannotation) ] | | No | + +#### TimeseriesProgramme + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | Yes | +| name | string | | Yes | +| longname | string | | Yes | +| homepage | string | | Yes | +| description | string | | Yes | + +#### TimeseriesRole + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | Yes | +| role | string | | Yes | +| status | string | | Yes | +| contact | | | No | + +#### TimeseriesRoleCreate + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | No | +| role | string | | Yes | +| status | string | | Yes | +| contact | | | No | + +#### ValidationError + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| loc | [ string ] | | Yes | +| msg | string | | Yes | +| type | string | | Yes | + +#### Variable + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| name | string | | Yes | +| longname | string | | Yes | +| displayname | string | | Yes | +| cf_standardname | string | | Yes | +| units | string | | Yes | +| chemical_formula | string | | Yes | +| id | integer | | Yes | + +#### VariableCreate + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| name | string | | Yes | +| longname | string | | Yes | +| displayname | string | | Yes | +| cf_standardname | string | | Yes | +| units | string | | Yes | +| chemical_formula | string | | Yes |