Commit bb3878f0 authored by lbarbot's avatar lbarbot
Browse files

content(update): Pages 'implementation'

parent e527bc9a
Pipeline #166322 passed with stage
in 4 minutes and 38 seconds
---
title: About the technical stuff
title: Technical aspects
---
## Data model
It's complicated.
The data model of the SSH Open Marketplace was designed to be generic and flexible enough to support a variety of sources. A first version of the data model was presented in the [“System Specification of the SSH Open Marketplace”](https://doi.org/10.5281/zenodo.3547648). Some adjustments were made while ingesting the first sources, and version 1.4 of the SSH Open Marketplace is currently being implemented.
## Data ingestion workflow 
The SSH Open Marketplace provides a REST API at the backend where data can not only be read but also inserted or updated. This approach allows technology-agnostic ingestion. Currently, the main ingestion is built up by the Semantic Web Company (SWC). Based upon their product [PoolParty UnifiedViews](https://www.poolparty.biz/agile-data-integration) a dedicated ingestion pipeline for every source is created. This includes the gathering of the data at the source (e.g. via an API or a Git repository), the mapping of the data to the SSH Open Marketplace data model including transformation of parts of the data (e.g. connecting terms from the source to a vocabulary like TaDiRAH) and the integration of the processed data into the SSH Open Marketplace via the API.
![](/assets/images/data_ingestion_workflow.png "Data ingestion workflow")
*Illustration: Overview on the different parts of the ingestion workflow*
## Information about the development of the website
The development of the SSH Open Marketplace is managed via GitLab. If you want to know more, pay a visit to our GitLab instance: <https://gitlab.gwdg.de/sshoc> 
## API documentation
The SSH Open Marketplace also includes an Application Programming Interface (API), which is opened for anyone to use. Some of the functionalities are closed, but most are opened, such as searching and retrieving detailed information on all items of the Marketplace.
You can inspect the API Swagger documentation here: <https://marketplace-api.sshopencloud.eu/swagger-ui/index.html?url=/v3/api-docs>
The endpoint of the SSH Open Marketplace API is: <https://marketplace-api.sshopencloud.eu/api/>
The API responses are in JSON and follow the data model that we have created for the Marketplace (see “Data model” section above).
For example, you can request a description of all the “tools and services” that the SSH Open Marketplace provides with this URL <https://marketplace-api.sshopencloud.eu/api/tools-services> and following pages <https://marketplace-api.sshopencloud.eu/api/tools-services?page=2>. 
The API also includes some endpoints that are only accessible to logged in users. To use them, you need to ask for a JWT (JSON Web Token) to the authentication endpoint and then use the Token to connect to the other endpoint, by passing the Token as a Bearer Authentication. 
Example:
curl -i --request POST 'https://sshoc-marketplace-api.acdh-dev.oeaw.ac.at/api/auth/sign-in' --header 'Content-Type: application/json' --data-raw '{"username": "SomeUserName","password": "xxxxxxxx"}'
Will response with a Token has such:
Authorization: Bearer xxxyyyyzzzhfdsklmgdflkngfdngdfklngfdfgdf,gfdngfndkljgn
And this is then use in the following requests to prove you are authenticated, for example:
curl -X DELETE 'https://sshoc-marketplace-api.acdh-dev.oeaw.ac.at/api/datasets/3752' --header 'Authorization: Bearer xxxyyyyzzzhfdsklmgdflkngfdngdfklngfdfgdf,gfdngfndkljgn'
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment