Skip to content

Backend Struktur

fr3ddykrueger edited this page Jul 16, 2020 · 3 revisions

Verwendete Tools:

Funktion Tools & Frameworks
Container Docker
Docker-OS python:3.7
Backend-Server Flask
Datenbank MongoDB
Schema (Flask-) Marshmallow
allow cross domain requests CORS

MongoDB

Field Type Limit
user_ID String 15
project_name String 255
project JSON /

User can not have projects with duplicate project_name!


Routing

please scroll horizontal

Methode Beschreibung Route Respond Body Respond 200 Respond 400 Request Body
GET mini-Test /projects/test
  {'Res': 'Test was successful!'}
JSON
GET mini-Test /projects/testfilldb
  {'Res': 'DBTest was successful!'}
JSON
GET mini-Test /projects/testdb
  {
  "_id": "2020-06-19T13:26:10.041093+02:00", 
  "_links": {
    "owner": "/projects/user/tuse2", 
    "self": "/projects/user/tuse2/project/testproject2"
  }, 
  "project_data": {
    ...
  }, 
  "project_name": "testproject2", 
  "timestamp": "19.06.2020, 13:26:10", 
  "user_ID": "tuse2"
}
JSON
GET mini-Test /projects/all
  {
  "items": [
    {
      "_id": "2020-06-19T04:31:19.068782+02:00", 
      "_links": {
        "owner": "/projects/user/testuser1", 
        "self": "/projects/user/testuser1/project/testproject1"
      }, 
      "project_data": {
        ...
      }, 
      "project_name": "testproject1", 
      "timestamp": "19.06.2020, 04:31:19", 
      "user_ID": "testuser1"
    }, 
    {
      "_id": "2020-06-19T04:31:19.129774+02:00", 
      "_links": {
        "owner": "/projects/user/testuser2", 
        "self": "/projects/user/testuser2/project/testproject1"
      }, 
      "project_data": {
        ...
      }, 
      "project_name": "testproject1", 
      "timestamp": "19.06.2020, 04:31:19", 
      "user_ID": "testuser2"
    }, 
    ...
  ],
  "items_count": "4"
}
JSON (can be empty list)
GET Suchen nach Usern mit User ID /projects/user//allprojects
  {
  "_links": {
    "projects": "/projects/user/testuser4/allprojects", 
    "self": "/projects/user/testuser4"
  }, 
  "amount_of_projects": 2, 
  "items": [
    {
      "_links": {
        "owner": "/projects/user/testuser4", 
        "self": "/projects/user/testuser4/project/testproject2"
      }, 
      "project_data": {
        ...
      }, 
      "project_name": "testproject2", 
      "timestamp": "19.06.2020, 04:31:19", 
      "user_ID": "testuser4"
    }, 
    {
      "_links": {
        "owner": "/projects/user/testuser4", 
        "self": "/projects/user/testuser4/project/testproject1"
      }, 
      "project_data": {
        ...
      }, 
      "project_name": "testproject1", 
      "timestamp": "19.06.2020, 04:31:19", 
      "user_ID": "testuser4"
    }
  ], 
  "user_ID": "testuser4"
}
JSON (can be empty list)

Gruppenmitglieder:

  • Chantal Butenberg
  • Niklas Kramer
  • Frederic Alscher
  • Maluna Menke
  • Malte Mittrowann
  • Luca Pomer
  • Simon Thormeyer
Clone this wiki locally