{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"https://portbase-test-event-api.federated-infrastructure.net","description":"Generated server url"}],"tags":[{"name":"OrchestratorController","description":"Allows for receiving and retrieval of events."},{"name":"UserController","description":"Manages the users and API keys"},{"name":"DistributionRulesController","description":"Returns info regarding the distribution roles for this node."},{"name":"EventTypesController","description":"Returns info regarding the supported event types by this node."},{"name":"EventViewerController","description":"Allows for receiving and retrieval of message history."},{"name":"EventsController","description":"Allows for creation, distribution and retrieval of events. See the /event-types endpoint for all supported event types by this node."}],"paths":{"/api/webhooks":{"get":{"tags":["webhook-controller"],"operationId":"getWebhooks","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}}}}}},"post":{"tags":["webhook-controller"],"operationId":"registerWebhook","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Webhook"}}}}}}},"/api/users":{"get":{"tags":["UserController"],"operationId":"getUsers","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/JsonNode"}}}}}},"post":{"tags":["UserController"],"operationId":"newUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/api/users/{username}":{"post":{"tags":["UserController"],"operationId":"changeUser","parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/api/users/{username}/password":{"post":{"tags":["UserController"],"operationId":"changePassword","parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string"}},{"name":"password","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/sparql":{"post":{"tags":["sparql-controller"],"summary":"Allows for executing SPARQL against the local GraphDB instance (see: application.properties -> graphdb.sparql.url)","operationId":"sparql","requestBody":{"content":{"text/plain":{"schema":{"type":"string"},"examples":{"SPARQL SELECT":{"description":"SPARQL SELECT","value":"select * where { ?s ?p ?o . } limit 100"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/sparql-results+json":{"schema":{"type":"string"}}}}}}},"/api/message":{"get":{"tags":["OrchestratorController"],"summary":"Return the event data in compacted JSONLD format.","operationId":"getAll","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":1}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":25}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JsonNode"}}}}}}},"post":{"tags":["OrchestratorController"],"summary":"Receive a new event or a full event request from the orchestrator and store it in the database.","operationId":"postMessage","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncomingOrchestratorMessage"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/api/events":{"get":{"tags":["EventsController"],"summary":"Return the event data in compacted JSONLD format.","operationId":"getEvents","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":1}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":25}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}}}},"post":{"tags":["EventsController"],"summary":"Create a new event and distribute to peers according to the distribution rules. The Event-Type header specifies the Event type e.g: federated.events.load-event.v1. See the /event-types endpoint for all supported event types by this node. Event-Destinations header specifies the node names to send the even to. Node names can be separated with a semi-colon (;). An example: O=Cargobase,L=Dusseldorf,C=DE","operationId":"postEvent","parameters":[{"name":"Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Event-Destinations","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/api/events/validate":{"post":{"tags":["EventsController"],"summary":"Validate an event without distribution, returns the generated RDF if no validation errors occur. The Event-Type header specifies the type of event e.g: federated.events.load-event.v1. See the /event-types endpoint for all supported event types by this node.","operationId":"validateEvent","parameters":[{"name":"Event-Type","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/api/event-types":{"get":{"tags":["EventTypesController"],"operationId":"getEventTypes","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventType"}}}}}}},"post":{"tags":["EventTypesController"],"operationId":"newEventType","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventType"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/api/event-types/{type}/shacl":{"get":{"tags":["EventTypesController"],"operationId":"getShacl","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/turtle":{"schema":{"type":"string"}}}}}},"post":{"tags":["EventTypesController"],"operationId":"updateShacl","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/api/event-types/{type}/schemadefinition":{"get":{"tags":["EventTypesController"],"operationId":"getSchemaDefinition","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}}}},"post":{"tags":["EventTypesController"],"operationId":"updateSchemaDefinition","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/api/event-types/{type}/rml":{"get":{"tags":["EventTypesController"],"operationId":"getRml","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/turtle":{"schema":{"type":"string"}}}}}},"post":{"tags":["EventTypesController"],"operationId":"updateRml","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/api/event-types/{type}/minialRml":{"post":{"tags":["EventTypesController"],"operationId":"updateMinimalRml","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/api/event-types/{type}/eventlifetime/{eventlifetime}":{"post":{"tags":["EventTypesController"],"operationId":"updateEventLifeTime","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}},{"name":"eventlifetime","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK"}}}},"/api/distribution-rules":{"get":{"tags":["DistributionRulesController"],"operationId":"getDistributionRoles","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/EventDistributionRuleEntity"}}}}}}},"post":{"tags":["DistributionRulesController"],"operationId":"postDistributionRule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventDistributionRuleDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventDistributionRuleDTO"}}}}}}},"/api/apikeys":{"get":{"tags":["UserController"],"operationId":"getAPIKeys","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/JsonNode"}}}}}},"post":{"tags":["UserController"],"operationId":"newAPIKey","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKey"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/api/apikeys/{key}":{"post":{"tags":["UserController"],"operationId":"changeAPIKey","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKey"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/api/apikeys/random":{"post":{"tags":["UserController"],"operationId":"newRandomAPIKey","parameters":[{"name":"roles","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/JsonNode"}}}}}}},"/api/message/{id}":{"get":{"tags":["OrchestratorController"],"summary":"Return the event data in compacted JSONLD format.","operationId":"getMessageById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonNode"}}}}}}},"/api/eventviewer/{inorOutorFailed}":{"get":{"tags":["EventViewerController"],"summary":"Return the event data in compacted JSONLD format.","operationId":"getInOrOut","parameters":[{"name":"inorOutorFailed","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":1}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":25}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JsonNode"}}}}}}}},"/api/events/{id}":{"get":{"tags":["EventsController"],"summary":"Return the event data in compacted JSONLD format.","operationId":"getEventById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/api/events/fullevent/{id}":{"get":{"tags":["EventsController"],"summary":"Return the event data in compacted JSONLD format.","operationId":"requestFullEventById","parameters":[{"name":"Event-Destinations","in":"header","required":false,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/api/event-types/{type}/minimalRml":{"get":{"tags":["EventTypesController"],"operationId":"getMinimalRml","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/turtle":{"schema":{"type":"string"}}}}}}},"/api/webhooks/{client_id}":{"delete":{"tags":["webhook-controller"],"operationId":"unregisterWebhook","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/users/{username}/":{"delete":{"tags":["UserController"],"operationId":"disableUser","parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/event-types/{eventType}":{"delete":{"tags":["EventTypesController"],"operationId":"deleteEventType","parameters":[{"name":"eventType","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/distribution-rules/{id}":{"delete":{"tags":["DistributionRulesController"],"operationId":"deleteDistributionRule","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK"}}}},"/api/apikeys/{key}/":{"delete":{"tags":["UserController"],"operationId":"disableAPIKey","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}}},"components":{"schemas":{"Webhook":{"required":["callbackURL","clientId","eventType"],"type":"object","properties":{"clientId":{"type":"string"},"eventType":{"type":"string"},"callbackURL":{"type":"string","format":"url"},"apiKey":{"type":"string"},"tokenURL":{"type":"string","format":"url"},"refreshURL":{"type":"string","format":"url"},"aud":{"type":"string"}}},"User":{"required":["isEnabled","password","roles","username"],"type":"object","properties":{"username":{"type":"string"},"password":{"type":"string"},"roles":{"type":"string"},"isEnabled":{"type":"boolean"}}},"IncomingOrchestratorMessage":{"required":["message","messageId","messageType","origin","recordedTime"],"type":"object","properties":{"recordedTime":{"type":"integer","format":"int64"},"messageId":{"type":"string","format":"uuid"},"messageType":{"type":"string","enum":["event","fullevent"]},"message":{"type":"string"},"origin":{"type":"string"},"eventType":{"type":"string"}}},"EventType":{"required":["eventType","rml"],"type":"object","properties":{"eventType":{"type":"string"},"rml":{"type":"string"},"shacl":{"type":"string"},"schemaDefinition":{"type":"string"},"minimalRml":{"type":"string"},"minimize":{"type":"boolean"},"eventLifeTime":{"type":"integer","format":"int64"}}},"EventDistributionRuleDTO":{"required":["destinations","ruleType"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"ruleType":{"type":"string"},"destinations":{"type":"string"}}},"APIKey":{"required":["apiKey","isEnabled","roles"],"type":"object","properties":{"apiKey":{"type":"string"},"roles":{"type":"string"},"isEnabled":{"type":"boolean"}}},"JsonNode":{"type":"object"},"EventDistributionRuleEntity":{"required":["destinations","ruleType"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"ruleType":{"type":"string","enum":["STATIC","BROADCAST","SPARQL"]},"destinations":{"type":"string"}}}}}}