diff --git a/reference/callback.json b/reference/callback.json index b539bd3ef7a53ecbd844cba23f7f3dbff17bb75c..ac368c6e78db3f15dda56bb3d881bb9544a609af 100644 --- a/reference/callback.json +++ b/reference/callback.json @@ -15,7 +15,7 @@ }, "servers": [ { - "url": "http://localhost:3000" + "url": "{callbackURL}" } ], "paths": { diff --git a/reference/sender.json b/reference/sender.json index 7dfbf91fa9c3b7858884f718f8ebdffab24d3229..983d1e153df86fc926d5c873f716e36be50f2a15 100644 --- a/reference/sender.json +++ b/reference/sender.json @@ -15,7 +15,12 @@ }, "servers": [ { - "url": "http://localhost:3000" + "url": "https://xfall-sender-api.production.fiep-poc.de", + "description": "Produktionsumgebung der API." + }, + { + "description": "Testumgebung der API.", + "url": "https://xfall-sender-api.sandbox.fiep-poc.de" } ], "paths": { @@ -104,6 +109,17 @@ }, "tags": [ "Application Transfer" + ], + "security": [ + { + "Production API Key": [ + "{source-id}:application:apply", + "{source-id}:source:manage" + ] + }, + { + "Sandbox API Key": [] + } ] } }, @@ -213,6 +229,17 @@ }, "tags": [ "Application Transfer" + ], + "security": [ + { + "Production API Key": [ + "{source-id}:application:apply", + "{source-id}:source:manage" + ] + }, + { + "Sandbox API Key": [] + } ] } }, @@ -275,7 +302,20 @@ }, "operationId": "get-application-status", "description": "Ruft den aktuellen Status der Übermittlung sowie einer Übersicht der bisherigen Übertragungshistorie ab.", - "parameters": [] + "tags": [ + "status" + ], + "security": [ + { + "Production API Key": [ + "{source-id}:status:read", + "{source-id}:source:manage" + ] + }, + { + "Sandbox API Key": [] + } + ] } }, "/{source-id}/{application-id}/status/{status-nr}": { @@ -304,7 +344,48 @@ "in": "path", "required": true } - ] + ], + "get": { + "summary": "Get Status Entry", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "../models/status.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../models/error.json" + } + } + } + } + }, + "operationId": "get-application-status-entry", + "description": "Ruft einen spezifischen Statuswechsel aus der Historie des Status ab.", + "tags": [ + "status" + ], + "security": [ + { + "Production API Key": [ + "{source-id}:status:read", + "{source-id}:source:manage" + ] + }, + { + "Sandbox API Key": [] + } + ] + } }, "/{source-id}/{destination-id}/{application-id}/upload-status": { "parameters": [ @@ -335,9 +416,6 @@ ], "get": { "summary": "Get Application Upload Status", - "tags": [ - "Transfer related Information" - ], "responses": { "200": { "description": "OK", @@ -416,7 +494,21 @@ } }, "operationId": "get-application-upload-status", - "description": "Abfrage des Übermittlungsstatus. Listet alle Unterresourcen (data und docs) mit Übermittlungsstatus auf." + "description": "Abfrage des Übermittlungsstatus. Listet alle Unterresourcen (data und docs) mit Übermittlungsstatus auf.", + "tags": [ + "Transfer related Information" + ], + "security": [ + { + "Production API Key": [ + "{source-id}:application:apply", + "{source-id}:source:manage" + ] + }, + { + "Sandbox API Key": [] + } + ] } }, "/{source-id}/{destination-id}": { @@ -478,9 +570,6 @@ } } }, - "tags": [ - "Application Transfer" - ], "requestBody": { "content": { "application/json": { @@ -491,7 +580,21 @@ }, "description": "Metadaten des Antrags" }, - "description": "Übertragung initiieren" + "description": "Übertragung initiieren", + "tags": [ + "Application Transfer" + ], + "security": [ + { + "Production API Key": [ + "{source-id}:application:apply", + "{source-id}:source:manage" + ] + }, + { + "Sandbox API Key": [] + } + ] }, "get": { "summary": "Get Destination", @@ -521,6 +624,17 @@ "description": "Ruft die Information über eine Destination ab", "tags": [ "Transfer related Information" + ], + "security": [ + { + "Production API Key": [ + "{source-id}:destination-info:read", + "{source-id}:source:manage" + ] + }, + { + "Sandbox API Key": [] + } ] } }, @@ -598,9 +712,6 @@ }, "description": "Übertragung abschließen, Antrag absenden", "parameters": [], - "tags": [ - "Application Transfer" - ], "requestBody": { "content": { "application/json": { @@ -611,7 +722,21 @@ } }, "description": "" - } + }, + "tags": [ + "Application Transfer" + ], + "security": [ + { + "Production API Key": [ + "{source-id}:application:apply", + "{source-id}:source:manage" + ] + }, + { + "Sandbox API Key": [] + } + ] } } }, @@ -622,5 +747,31 @@ { "name": "Transfer related Infos" } - ] + ], + "components": { + "securitySchemes": { + "Production API Key": { + "type": "oauth2", + "flows": { + "clientCredentials": { + "tokenUrl": "beispieltokenURL.de", + "scopes": { + "{source-id}:application:apply": "Dieser Zugriffsbereich erlaubt es Anträge anzulegen, diesen zu aktualisieren und abzusenden.", + "{source-id}:status:read": "Dieser Zufriffsbereich erlaubt es auf Statusmitteilungen zu einem übersendeten Antrag abzurufen.", + "{source-id}:destination-info:read": "Dieser Zufriffsbereich erlaubt es Informationen von existierenden Destinationsabzurufen", + "{source-id}:source:manage": "Dieser Zufriffsbereich erlaubt es alle Endpunkte einer " + }, + "refreshUrl": "beispielrefreshURL.de" + } + }, + "description": "Dieses Authentifizierungsmethode wird genutzt, um den Zugriff auf die Produktiv API zu autorisieren. " + }, + "Sandbox API Key": { + "name": "API Key", + "type": "apiKey", + "in": "header", + "description": "Der API wird als Authentifizierungsmittel für die Sandbox API benutzt." + } + } + } } \ No newline at end of file diff --git a/reference/subscriber.json b/reference/subscriber.json index dcaac05a19b8c8b4e72203aa99ed11bb514aecd6..c6413c5dd09a294ddc3271190f645b4f189ec4b8 100644 --- a/reference/subscriber.json +++ b/reference/subscriber.json @@ -15,7 +15,12 @@ }, "servers": [ { - "url": "http://localhost:3000" + "url": "https://xfall-sender-api.production.fiep-poc.de", + "description": "Produktionsumgebung der API." + }, + { + "url": "https://xfall-sender-api.sandbox.fiep-poc.de", + "description": "Testumgebung der API." } ], "paths": { @@ -56,9 +61,6 @@ ], "get": { "summary": "Get Application Document", - "tags": [ - "Application Retrieval" - ], "responses": { "200": { "description": "OK", @@ -76,7 +78,22 @@ } }, "operationId": "get-application-document", - "description": "Ruf ein Dokument (Formular oder Anlage) der Application ab." + "description": "Ruf ein Dokument (Formular oder Anlage) der Application ab.", + "tags": [ + "Application Retrieval" + ], + "security": [ + { + "Production API Key": [ + "{subscriber-id}:manage", + "{subscriber-id}:application:receive", + "{subscriber-id}:destination:{destination-id}:application:receive" + ] + }, + { + "Sandbox API Key": [] + } + ] } }, "/{subscriber-id}/destinations/{destination-id}/applications/{application-id}/data": { @@ -108,9 +125,6 @@ ], "get": { "summary": "Get Application Data", - "tags": [ - "Application Retrieval" - ], "responses": { "200": { "description": "OK", @@ -146,7 +160,22 @@ } }, "operationId": "get-application-data", - "description": "Ruft die Fachdaten der Application ab.\n\nBeispiele:\n#### JSON\n```json\n{\n \"F99000001\": \"Eins\",\n \"G99000001\": {\n \"F99000002\": \"Zwei\",\n \"F99000003\": \"Drei\"\n }\n}\n```\n\n#### XML\n```xml\n<S99000001>\n <F99000001>Eins</F99000001>\n <G99000001>\n <F99000002>Zwei</F99000002>\n <F99000003>Drei</F99000003>\n </G99000001>\n</S99000001>\n```" + "description": "Ruft die Fachdaten der Application ab.\n\nBeispiele:\n#### JSON\n```json\n{\n \"F99000001\": \"Eins\",\n \"G99000001\": {\n \"F99000002\": \"Zwei\",\n \"F99000003\": \"Drei\"\n }\n}\n```\n\n#### XML\n```xml\n<S99000001>\n <F99000001>Eins</F99000001>\n <G99000001>\n <F99000002>Zwei</F99000002>\n <F99000003>Drei</F99000003>\n </G99000001>\n</S99000001>\n```", + "tags": [ + "Application Retrieval" + ], + "security": [ + { + "Production API Key": [ + "{subscriber-id}:manage", + "{subscriber-id}:application:receive", + "{subscriber-id}:destination:{destination-id}:application:receive" + ] + }, + { + "Sandbox API Key": [] + } + ] } }, "/{subscriber-id}/destinations/{destination-id}/applications/{application-id}": { @@ -178,9 +207,6 @@ ], "get": { "summary": "Get Application Metadata", - "tags": [ - "Application Retrieval" - ], "responses": { "200": { "description": "OK", @@ -303,7 +329,22 @@ } }, "operationId": "get-application", - "description": "Ruft eine wartende Application ab." + "description": "Ruft eine wartende Application ab.", + "tags": [ + "Application Retrieval" + ], + "security": [ + { + "Production API Key": [ + "{subscriber-id}:manage", + "{subscriber-id}:application:receive", + "{subscriber-id}:destination:{destination-id}:application:receive" + ] + }, + { + "Sandbox API Key": [] + } + ] }, "post": { "summary": "Acknowledge Application", @@ -326,9 +367,6 @@ "description": "Expectation Failed - Status passt nicht" } }, - "tags": [ - "Application Retrieval" - ], "description": "Bestätigt die Abholung der Application. Über den Parameter `final-delivery` im Body wird gesteuert, wie der Folgestatus aussieht:\n\n| final-delivery | status |\n| -------------- | ----------- |\n| `false` | \"forwarded\" |\n| `true` | \"delivered\" |\n\nDer Parameter `final-delivery` zeigt an, ob der Antrag noch weitergesendet wird (`false`) oder das finale Ziel erreicht hat (`true`).\n\nSofern der Wert `false` übergeben wurde, muss zu einem späteren Zeitpunkt, wenn der Antrag final zugestellt wurde, ein weiterer Aufruf mit dem Wert `true` erfolgen.", "requestBody": { "content": { @@ -345,7 +383,22 @@ } }, "description": "Details der Quittung" - } + }, + "tags": [ + "Application Retrieval" + ], + "security": [ + { + "Production API Key": [ + "{subscriber-id}:manage", + "{subscriber-id}:application:receive", + "{subscriber-id}:destination:{destination-id}:application:receive" + ] + }, + { + "Sandbox API Key": [] + } + ] } }, "/{subscriber-id}/destinations/{destination-id}/applications": { @@ -369,9 +422,6 @@ ], "get": { "summary": "List Applications", - "tags": [ - "Application Retrieval" - ], "operationId": "list-applications", "responses": { "200": { @@ -502,7 +552,22 @@ } } }, - "description": "Ruft die Liste der wartenden Applications ab." + "description": "Ruft die Liste der wartenden Applications ab.", + "tags": [ + "Application Retrieval" + ], + "security": [ + { + "Production API Key": [ + "{subscriber-id}:manage", + "{subscriber-id}:application:receive", + "{subscriber-id}:destination:{destination-id}:application:receive" + ] + }, + { + "Sandbox API Key": [] + } + ] } }, "/{subscriber-id}/destinations/{destination-id}": { @@ -526,9 +591,6 @@ ], "get": { "summary": "Get Destination", - "tags": [ - "Destination Management" - ], "responses": { "200": { "description": "OK", @@ -589,7 +651,23 @@ } }, "operationId": "get-destination", - "description": "Übertragungsziel abfragen" + "description": "Übertragungsziel abfragen", + "tags": [ + "Destination Management" + ], + "security": [ + { + "Production API Key": [ + "{subscriber-id}:destination:read", + "{subscriber-id}:destination:manage", + "{subscriber-id}:manage", + "{subscriber-id}:destination:{destination-id}:read" + ] + }, + { + "Sandbox API Key": [] + } + ] }, "put": { "summary": "Update Destination", @@ -609,9 +687,6 @@ } } }, - "tags": [ - "Destination Management" - ], "description": "Übertragungsziel aktualisieren", "requestBody": { "content": { @@ -649,7 +724,23 @@ } } } - } + }, + "tags": [ + "Destination Management" + ], + "security": [ + { + "Production API Key": [ + "{subscriber-id}:manage", + "{subscriber-id}:destination:update", + "{subscriber-id}:destination:manage", + "{subscriber-id}:destination:{destination-id}:update" + ] + }, + { + "Sandbox API Key": [] + } + ] }, "delete": { "summary": "Delete Destination", @@ -669,10 +760,23 @@ } } }, + "description": "Übertragungsziel löschen", "tags": [ "Destination Management" ], - "description": "Übertragungsziel löschen" + "security": [ + { + "Production API Key": [ + "{subscriber-id}:manage", + "{subscriber-id}:destination:manage", + "{subscriber-id}:destination:delete", + "{subscriber-id}:destination:{destination-id}:delete" + ] + }, + { + "Sandbox API Key": [] + } + ] } }, "/{subscriber-id}/destinations": { @@ -688,9 +792,6 @@ ], "get": { "summary": "List Destinations", - "tags": [ - "Destination Management" - ], "responses": { "200": { "description": "OK", @@ -737,7 +838,22 @@ } }, "operationId": "list-destinations", - "description": "Ruft die Liste aller Destinations dieses Accounts auf." + "description": "Ruft die Liste aller Destinations dieses Accounts auf.", + "tags": [ + "Destination Management" + ], + "security": [ + { + "Production API Key": [ + "{subscriber-id}:destination:read", + "{subscriber-id}:manage", + "{subscriber-id}:destination:manage" + ] + }, + { + "Sandbox API Key": [] + } + ] }, "post": { "summary": "Create Destination", @@ -810,6 +926,15 @@ }, "tags": [ "Destination Management" + ], + "security": [ + { + "Production API Key": [ + "{subscriber-id}:manage", + "{subscriber-id}:destination:manage", + "{subscriber-id}:destination:create" + ] + } ] } } @@ -821,5 +946,38 @@ { "name": "Application Retrieval" } - ] + ], + "components": { + "securitySchemes": { + "Production API Key": { + "type": "oauth2", + "flows": { + "clientCredentials": { + "tokenUrl": "", + "refreshUrl": "", + "scopes": { + "{subscriber-id}:destination:read": "Dieser Zugriffsbereich erlaubt bei allen Destination-Informationen ein lesender Zugriff.", + "{subscriber-id}:destination:create": "Der Zugriffsbereich erlaubt Destinations neu anzulegen und zu verändern.", + "{subscriber-id}:destination:update": "Dieser Zugriffsbereich erlaubt es, bestehende Destinations zu verändern.", + "{subscriber-id}:destination:manage": "Dieser Zugriffsbereich alle Destination Endpunkte eines Subscriber genutzt werden.", + "{subscriber-id}:destination:{destination-id}:read": "Mit diesem Zugriffsbereich wird ein lesender Zugriff auf eine spezifische Destination ermöglicht.", + "{subscriber-id}:destination:{destination-id}:update": "Mit diesem Zugriffsbereich wird ein schreibende Zugriff auf eine spezifische Destination ermöglicht.", + "{subscriber-id}:application:receive": "Dieser Zugriffsbereich erlaubt es, Anträge für allen Destinations abzuholen.", + "{subscriber-id}:destination:{destination-id}:application:receive": "Dieser Zugriffsbereich erlaubt es, Anträge einer spezifischen Destination abzuholen.", + "{subscriber-id}:manage": "Dieser Zugriffsbereich die vollständige Nutzung aller Endpunkte eines Subscribers.", + "{subscriber-id}:destination:delete": "Dieser Zugriffsbereich erlaubt die Löschung von Destinations eines Accounts.", + "{subscriber-id}:destination:{destination-id}:delete": "Dieser Zugriffsbereich erlaubt es, eine spezifische Destination zu löschen." + } + } + }, + "description": "Dieses Authentifizierungsmethode wird genutzt, um den Zugriff auf die Produktiv API zu autorisieren. " + }, + "Sandbox API Key": { + "name": "API Key", + "type": "apiKey", + "in": "header", + "description": "Der API wird als Authentifizierungsmittel für die Sandbox API benutzt." + } + } + } } \ No newline at end of file