Skip to content

REST API Dokumentation

Johannes Quack edited this page Jan 21, 2020 · 5 revisions

Links zur API-Dokumentation

Die REST API Dokumentation ist unter:
SwaggerUI

Und das json dazu unter:
Json

verfügbar.


⚠⚠ Die untenstehende Dokumentation enthält den Stand vom 17.01.2020 und spiegelt nicht zwingend den aktuellen Stand wieder

Nachrichtensystem API v1

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

OpenAPI 3 Dokumentation des Nachrichtensystems

Base URLs:

Nachricht

Nachricht API

getAllNachrichten

Code samples

URL obj = new URL("https://api.fae.archi-lab.io/ausnahmesituation/nachrichten");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /ausnahmesituation/nachrichten

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK default response Inline

Response Schema

This operation does not require authentication

Alle Nachrichten einer Ausnahmesituationen abfragen

Code samples

URL obj = new URL("https://api.fae.archi-lab.io/ausnahmesituation/{ausnahmesituationId}/nachrichten");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /ausnahmesituation/{ausnahmesituationId}/nachrichten

Parameters

Name In Type Required Description
ausnahmesituationId path string true none

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK default response Inline

Response Schema

This operation does not require authentication

Nachricht für eine Ausnahmesituation erstellen

Code samples

URL obj = new URL("https://api.fae.archi-lab.io/ausnahmesituation/{ausnahmesituationId}/nachrichten");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /ausnahmesituation/{ausnahmesituationId}/nachrichten

Body parameter

{
  "nachrichtId": "string",
  "text": "string",
  "ausnahmesituation": {
    "aunamesituationId": "string",
    "positionssenderId": "string",
    "text": "string",
    "nachrichten": [
      null
    ]
  },
  "antwort": {
    "antwortId": "string",
    "typ": "string"
  }
}

Parameters

Name In Type Required Description
ausnahmesituationId path string true none
body body Nachricht false none

Example responses

200 Response

{
  "nachrichtId": "string",
  "text": "string",
  "ausnahmesituation": {
    "aunamesituationId": "string",
    "positionssenderId": "string",
    "text": "string",
    "nachrichten": [
      null
    ]
  },
  "antwort": {
    "antwortId": "string",
    "typ": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK default response Nachricht
This operation does not require authentication

ausnahmesituation

Ausnahmesituation API

getAllAusnahmesituationen

Code samples

URL obj = new URL("https://api.fae.archi-lab.io/ausnahmesituation");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET /ausnahmesituation

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK default response Inline

Response Schema

This operation does not require authentication

Ausnahmesituation erstellen

Code samples

URL obj = new URL("https://api.fae.archi-lab.io/ausnahmesituation");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /ausnahmesituation

Body parameter

{
  "aunamesituationId": "string",
  "positionssenderId": "string",
  "text": "string",
  "nachrichten": [
    {
      "nachrichtId": "string",
      "text": "string",
      "ausnahmesituation": null,
      "antwort": {
        "antwortId": "string",
        "typ": "string"
      }
    }
  ]
}

Parameters

Name In Type Required Description
body body Ausnahmesituation false none

Example responses

200 Response

{
  "aunamesituationId": "string",
  "positionssenderId": "string",
  "text": "string",
  "nachrichten": [
    {
      "nachrichtId": "string",
      "text": "string",
      "ausnahmesituation": null,
      "antwort": {
        "antwortId": "string",
        "typ": "string"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK default response Ausnahmesituation
This operation does not require authentication

Löschen einer Ausnahmesituationen

Code samples

URL obj = new URL("https://api.fae.archi-lab.io/ausnahmesituation/{ausnahmesituationId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE /ausnahmesituation/{ausnahmesituationId}

Parameters

Name In Type Required Description
ausnahmesituationId path string true none

Responses

Status Meaning Description Schema
200 OK default response None
This operation does not require authentication

Antwort

Antwort API

Antwort für eine Nachricht erstellen

Code samples

URL obj = new URL("https://api.fae.archi-lab.io/nachricht/{nachrichtId}/antwort");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST /nachricht/{nachrichtId}/antwort

Body parameter

{
  "antwortId": "string",
  "typ": "string"
}

Parameters

Name In Type Required Description
nachrichtId path string true none
body body Antwort false none

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK default response Antwort
This operation does not require authentication

Schemas

Antwort

{
  "antwortId": "string",
  "typ": "string"
}

Properties

Name Type Required Restrictions Description
antwortId string false none none
typ string false none none

AntwortTyp

{
  "typ": "string"
}

Properties

Name Type Required Restrictions Description
typ string false none none

Ausnahmesituation

{
  "aunamesituationId": "string",
  "positionssenderId": "string",
  "text": "string",
  "nachrichten": [
    {
      "nachrichtId": "string",
      "text": "string",
      "ausnahmesituation": null,
      "antwort": {
        "antwortId": "string",
        "typ": "string"
      }
    }
  ]
}

Properties

Name Type Required Restrictions Description
aunamesituationId string false none none
positionssenderId string false none none
text string false none none
nachrichten [Nachricht] false none none

Nachricht

{
  "nachrichtId": "string",
  "text": "string",
  "ausnahmesituation": {
    "aunamesituationId": "string",
    "positionssenderId": "string",
    "text": "string",
    "nachrichten": [
      null
    ]
  },
  "antwort": {
    "antwortId": "string",
    "typ": "string"
  }
}

Properties

Name Type Required Restrictions Description
nachrichtId string false none none
text string false none none
ausnahmesituation Ausnahmesituation false none none
antwort Antwort false none none

NachrichtText

{
  "text": "string"
}

Properties

Name Type Required Restrictions Description
text string false none none

Positionssender

{
  "positionssenderId": "string"
}

Properties

Name Type Required Restrictions Description
positionssenderId string true none none
Clone this wiki locally