{ "info": { "_postman_id": "ti-status-api-collection", "name": "TI-Status API", "description": "Collection für die TI-Status-API der gematik\n\nEndpunkte:\n- GET /lageapi/v2/tilage - Aktuelle TI-Lage Meldungen\n\nVerwendung:\n1. Importiere diese Collection in Postman\n2. Teste die API-Endpunkte\n3. Überprüfe die JSON-Antworten", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "TI-Lage API", "item": [ { "name": "GET Aktuelle TI-Lage Meldungen", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json", "type": "text" }, { "key": "User-Agent", "value": "TI-Status-Checker/1.0", "type": "text" } ], "url": { "raw": "https://ti-lage.prod.ccs.gematik.solutions/lageapi/v2/tilage", "protocol": "https", "host": [ "ti-lage", "prod", "ccs", "gematik", "solutions" ], "path": [ "lageapi", "v2", "tilage" ] }, "description": "Holt alle aktuellen TI-Lage Meldungen von der gematik API" }, "response": [ { "name": "Erfolgreiche Antwort", "originalRequest": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "url": { "raw": "https://ti-lage.prod.ccs.gematik.solutions/lageapi/v2/tilage", "protocol": "https", "host": [ "ti-lage", "prod", "ccs", "gematik", "solutions" ], "path": [ "lageapi", "v2", "tilage" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Type", "value": "application/json" } ], "cookie": [], "body": "{\n \"meldungen\": [\n {\n \"zeitpunkt\": \"2024-01-15T10:30:00Z\",\n \"titel\": \"Beispiel Meldung\",\n \"beschreibung\": \"Dies ist eine Beispiel-Beschreibung für eine TI-Lage Meldung.\",\n \"link\": \"https://fachportal.gematik.de/ti-status\",\n \"kategorie\": \"wartung\",\n \"prioritaet\": \"normal\"\n }\n ],\n \"letzteAktualisierung\": \"2024-01-15T10:30:00Z\",\n \"anzahlMeldungen\": 1\n}" } ] }, { "name": "GET API Status (Health Check)", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "url": { "raw": "https://ti-lage.prod.ccs.gematik.solutions/lageapi/v2/health", "protocol": "https", "host": [ "ti-lage", "prod", "ccs", "gematik", "solutions" ], "path": [ "lageapi", "v2", "health" ] }, "description": "Prüft den Status der API (falls verfügbar)" }, "response": [] } ], "description": "Hauptendpunkte der TI-Status-API" }, { "name": "Tests & Beispiele", "item": [ { "name": "Test mit verschiedenen Headers", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json", "type": "text" }, { "key": "Cache-Control", "value": "no-cache", "type": "text" }, { "key": "X-Requested-With", "value": "XMLHttpRequest", "type": "text" } ], "url": { "raw": "https://ti-lage.prod.ccs.gematik.solutions/lageapi/v2/tilage", "protocol": "https", "host": [ "ti-lage", "prod", "ccs", "gematik", "solutions" ], "path": [ "lageapi", "v2", "tilage" ] }, "description": "Test mit zusätzlichen Headers für bessere Kompatibilität" }, "response": [] } ], "description": "Zusätzliche Tests und Beispiele für die API" } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "// Pre-request Script für TI-Status API", "console.log('TI-Status API Request gestartet');", "console.log('URL:', pm.request.url.toString());", "console.log('Method:', pm.request.method);" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "// Test Script für TI-Status API", "pm.test('Status Code ist 200', function () {", " pm.response.to.have.status(200);", "});", "", "pm.test('Response ist JSON', function () {", " pm.response.to.be.json;", "});", "", "pm.test('Response hat meldungen Array', function () {", " const jsonData = pm.response.json();", " pm.expect(jsonData).to.have.property('meldungen');", " pm.expect(jsonData.meldungen).to.be.an('array');", "});", "", "pm.test('Meldungen haben korrekte Struktur', function () {", " const jsonData = pm.response.json();", " if (jsonData.meldungen && jsonData.meldungen.length > 0) {", " const meldung = jsonData.meldungen[0];", " pm.expect(meldung).to.have.property('zeitpunkt');", " pm.expect(meldung).to.have.property('titel');", " pm.expect(meldung).to.have.property('beschreibung');", " }", "});", "", "// Log Response für Debugging", "console.log('Response Status:', pm.response.status);", "console.log('Response Time:', pm.response.responseTime + 'ms');", "console.log('Response Size:', pm.response.size().body + ' bytes');" ] } } ], "variable": [ { "key": "base_url", "value": "https://ti-lage.prod.ccs.gematik.solutions", "type": "string" }, { "key": "api_version", "value": "v2", "type": "string" } ] }