Commit 53aba5c1 authored by Alexander Lercher's avatar Alexander Lercher

Added documentation for use-case partners

Authentication and business interface
parent 5aca5b34
......@@ -24,4 +24,7 @@ The scripts *build.py* and *deploy.py* are used to create Docker images and depl
![Input handling image](documentation/images/input-handling.png)
## API Authentication
![Authentication diagram](documentation/images/authentication.png)
\ No newline at end of file
![Authentication diagram](documentation/images/authentication.png)
## Authentication and Business Interface
[See here](documentation/external_access.md)
\ No newline at end of file
# SMART RESTful API Gateway
https://articonf1.itec.aau.at:30401/api/ui/
The API Gateway serves as an interface to external applications. Here, users are authenticated and blockchain transactions are added.
## Authentication
```POST https://articonf1.itec.aau.at:30401/api/tokens``` with body:
```
{
"password": "password",
"username": "regular@articonf1.itec.aau.at"
}
```
returns the JWT token for authentication, e.g.
```
{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
}
```
This token is used for authentication as _regular user_ on all microservices currently supporting authentication. Therefore the authentication header "```Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...```" has to be added to the request.
## Blockchain transactions
```POST https://articonf1.itec.aau.at:30401/api/trace``` with body:
```
{
"ApplicationType": "use-case identifier as string",
"key": "value",
...
}
```
adds a blockchain transaction entry for ApplicationType with all the keys and values. These will be converted and stored in our own format for creating multilayers and communities.
# Business Logic Microservice
https://articonf1.itec.aau.at:30420/api/ui
This microservice contains use-case specific informations, like schemas and contexts.
## Schema information
```GET https://articonf1.itec.aau.at:30420/api/use-cases/{use-case}/schema``` returns all schema mappings for the use-case identifier. The mapping is used to flatten nested input from the blockchain.
## Context information
```GET https://articonf1.itec.aau.at:30420/api/use-cases/{use-case}/layers``` returns all layers from the schema used for clustering interally.
# Role Stage Discovery Microservice
https://articonf1.itec.aau.at:30103/api/ui
This microservice contains the communities based on clusters and similarities between communities.
The endpoints are currently refactored, I will describe them once we are finished and processed data is available.
\ 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