Documentation
Introduction
SHARKdata is a web service with a REST API to be used for accessing marine environmental monitoring data from the seas surrounding Sweden. SHARKdata also have a web site for documentation and administration where it is possible to access some parts of the data directly.
SHARKdata is build on the concept of datasets. A dataset is a collection of data with a unique identifier and connected metadata that describes the dataset. Is should be possible to assign a version stamp to a dataset. Metadata can, for example, be used by data catalogues like ECDS.
Requests via the REST API are made by URL:s, for example https://sharkdata.smhi.se/datasets/table.txt to get a text table containing all available datasets.
The response format will vary depending on client needs. Text and JSON formats are always available. Text files can always be opened in standard text editors or spreadsheet programs. JSON is easy to use if the client software is written in JavaScript or Python, but parsers are available for other languages as well. Other formats like KML, XML, WFS, etc. will be developed in cooperation with clients when needed.
SHARKdata is based on modules and new modules will be developed over time. The module Resources contains administrative data. It can contain files for header translations, screening of data, taxonomic information, etc.
SHARKdata is currently under development and only a limited number of datasets and response formats are available for test.
Example URLs:
There is no full API description yet, but these examples can be a start. Click on the links below to test the API.
Datasets:
- Available datasets as a text table:
https://sharkdata.smhi.se/datasets/table.txt - Available datasets as a list of JSON objects:
https://sharkdata.smhi.se/datasets/list.json - Available datasets as a JSON object with header and rows:
https://sharkdata.smhi.se/datasets/table.json - Metadata for a dataset in text:
https://sharkdata.smhi.se/datasets/SHARK_Bacterioplankton_ABU_2006_UMSC_Bactabund/metadata.txt - Metadata for a dataset in JSON:
https://sharkdata.smhi.se/datasets/SHARK_Bacterioplankton_ABU_2006_UMSC_Bactabund/metadata.json - Data from a dataset in text:
https://sharkdata.smhi.se/datasets/SHARK_Bacterioplankton_ABU_2006_UMSC_Bactabund/data.txt - Data from a dataset as a JSON object with header and rows:
https://sharkdata.smhi.se/datasets/SHARK_Bacterioplankton_ABU_2006_UMSC_Bactabund/data.json
Resources:
- Available resources as a text table:
https://sharkdata.smhi.se/resources/table.txt - Available resources as a JSON object with header and rows:
https://sharkdata.smhi.se/resources/table.json
Export formats:
- Available export formats as a text table:
https://sharkdata.smhi.se/exportformats/table.txt - Available export formats as a JSON object with header and rows:
https://sharkdata.smhi.se/exportformats/table.json - Available export formats as a list of JSON objects:
https://sharkdata.smhi.se/exportformats/list.json - Log for an export format in text:
https://sharkdata.smhi.se/exportformats/DwCA_SMHI_Greyseal-NAT_version_2022-04-07/log.txt - Download an export format:
https://sharkdata.smhi.se/exportformats/DwCA_SMHI_Greyseal-NAT_version_2022-04-07/download
For developers
SHARKdata is written in Python 3 and based on the Django web framework. All code developed in the project is open source and published under the MIT license. The code repository can be found here: https://github.com/sharkdata/sharkdata. Please contact us by email to shark@smhi.se if you are developing a client application and want to be notified when we are planning changes to the API.