{ "openapi": "3.0.0", "info": { "description": "This is the API for the Open Integration Hub Microservice \"Integration Layer Service\"\n[https://openintegrationhub.org](https://openintegrationhub.org)\n", "version": "0.0.1", "title": "Integration Layer Service", "termsOfService": "https://github.com/openintegrationhub/openintegrationhub/blob/master/LICENSE/", "contact": { "email": "syanev@wice.de" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "tags": [ { "name": "chunks", "description": "Chunks management", "externalDocs": { "description": "Find out more", "url": "https://openintegrationhub.org" } } ], "paths": { "/chunks/{ilaId}": { "get": { "x-swagger-router-controller": "chunk", "tags": ["chunks"], "summary": "Get chunk", "description": "Get a chunk by ilaId", "operationId": "", "parameters": [ { "name": "ilaId", "in": "path", "description": "ilaId of Integration Layer Adapter", "required": true, "schema": { "type": "string", "format": "string" } }, { "name": "key", "in": "query", "description": "Split key identifier", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/getChunkResponse" } } } }, "400": { "description": "Integration Layer Adapter ID required!" }, "404": { "description": "No chunks found!" }, "500": { "description": "Internal server error!" } } } }, "/chunks": { "post": { "x-swagger-router-controller": "chunk", "tags": ["chunks"], "summary": "Create chunk", "description": "Create a chunk object", "operationId": "", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/addChunkResponse" } } } }, "400": { "description": "Payload does not contain cid, input does not match schema or schema is invalid!" }, "401": { "description": "Service token not provided!" }, "404": { "description": "DomainId or schemaUri not found!" }, "405": { "description": "Either domainId with schemaUri or custom schema must be specified, but not both!" }, "500": { "description": "Internal server error!" } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/addChunk" } } }, "description": "", "required": true } } }, "/chunks/validate": { "post": { "x-swagger-router-controller": "chunk", "tags": ["chunks"], "summary": "Validate chunk", "description": "Validate chunk from SDF Adapter", "operationId": "", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/validateChunkResponse" } } } }, "400": { "description": "Payload does not contain cid, input does not match schema or schema is invalid!" }, "401": { "description": "Service token not provided!" }, "404": { "description": "DomainId or schemaUri not found!" }, "500": { "description": "Internal server error!" } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/addChunk" } } }, "description": "", "required": true } } }, "/chunks/split": { "post": { "x-swagger-router-controller": "chunk", "tags": ["chunks"], "summary": "Split chunk", "description": "Split a chunk object in smaller chunks", "operationId": "", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/splitChunkResponse" } } } }, "400": { "description": "Split schema is not defined or is invalid!" }, "500": { "description": "Internal server error!" } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/splitChunk" } } }, "description": "", "required": true } } } }, "externalDocs": { "description": "Find out more about the Integration Layer Service", "url": "https://github.com/openintegrationhub" }, "servers": [ { "url": "http://ils.openintegrationhub.com/" }, { "url": "http://localhost:3003/" } ], "components": { "schemas": { "getChunkResponse": { "type": "object", "properties": { "data": { "type": "object", "properties": { "_id": { "type": "string", "example": "5d400671657ee84fd82470e9" }, "ilaId": { "type": "string", "example": "123asd" }, "cid": { "type": "string", "example": "email" }, "payload": { "type": "object", "properties": { "firstName": { "type": "string", "example": "John" }, "lastName": { "type": "string", "example": "Doe" }, "email": { "type": "string", "example": "doe@mail.com" } } }, "def": { "type": "object", "properties": { "domainId": { "type": "string", "example": "5d3031a20cbe7c00115c7d8f" }, "schemaUri": { "type": "string", "example": "address" } } }, "meta": { "type": "object", "properties": {} }, "expireAt": { "type": "string", "example": "2019-07-30T09:59:41.056Z" }, "valid": { "type": "boolean", "example": true } } }, "meta": { "type": "object", "properties": { "total": { "type": "string", "example": 3 } } } } }, "addChunk": { "type": "object", "properties": { "ilaId": { "type": "string", "example": "123asd" }, "token": { "type": "string", "example": "WXYUFOmgDdoniZatfaMTa4Ov-An98v2-4668x5fXOoLZS" }, "cid": { "type": "string", "example": "email" }, "def": { "type": "object", "properties": { "domainId": { "type": "string", "example": "5d3031a20cbe7c00115c7d8f" }, "schemaUri": { "type": "string", "example": "address" } } }, "payload": { "type": "object", "properties": { "firstName": { "type": "string", "example": "John" }, "lastName": { "type": "string", "example": "Doe" }, "email": { "type": "string", "example": "doe@mail.com" } } } } }, "addChunkResponse": { "type": "object", "properties": { "data": { "type": "object", "properties": { "_id": { "type": "string", "example": "5d400671657ee84fd82470e9" }, "ilaId": { "type": "string", "example": "123asd" }, "cid": { "type": "string", "example": "email" }, "payload": { "type": "object", "properties": { "firstName": { "type": "string", "example": "John" }, "lastName": { "type": "string", "example": "Doe" }, "email": { "type": "string", "example": "doe@mail.com" } } }, "def": { "type": "object", "properties": { "domainId": { "type": "string", "example": "5d3031a20cbe7c00115c7d8f" }, "schemaUri": { "type": "string", "example": "address" } } }, "meta": { "type": "object", "properties": {} }, "expireAt": { "type": "string", "example": "2019-07-30T09:59:41.056Z" }, "valid": { "type": "boolean", "example": true } } }, "meta": { "type": "object", "properties": {} } } }, "splitChunk": { "type": "object", "properties": { "ilaId": { "type": "string", "example": "123asd" }, "payload": { "type": "object", "properties": { "firstName": { "type": "string", "example": "John" }, "lastName": { "type": "string", "example": "Doe" }, "email": { "type": "string", "example": "doe@mail.com" }, "name": { "type": "string", "example": "Company Ltd." }, "logo": { "type": "string", "example": "https://company.com/logo.png" } } }, "splitSchema": { "type": "array", "items": { "type": "object", "properties": { "meta": { "type": "object", "properties": { "splitKey": { "type": "string", "example": "001" }, "userId": { "type": "string", "example": "12345678" } } }, "payload": { "type": "object", "properties": { "firstName": { "type": "string" }, "lastName": { "type": "string" }, "email": { "type": "string" } } } } } } } }, "validateChunkResponse": { "type": "object", "properties": { "data": { "type": "object", "properties": { "valid": { "type": "boolen", "example": "true" } } }, "meta": { "type": "object", "properties": {} } } }, "splitChunkResponse": { "type": "object", "properties": { "data": { "type": "object", "properties": { "_id": { "type": "string", "example": "5d400671657ee84fd82470e9" }, "ilaId": { "type": "string", "example": "123asd" }, "cid": { "type": "string", "example": "email" }, "payload": { "type": "object", "properties": { "firstName": { "type": "string", "example": "John" }, "lastName": { "type": "string", "example": "Doe" }, "email": { "type": "string", "example": "doe@mail.com" } } }, "splitKey": { "type": "string", "example": "001" }, "meta": { "type": "object", "properties": { "splitKey": { "type": "string", "example": "001" }, "userId": { "type": "string", "example": "93628a8ed86c2d6378b370b7" } } }, "expireAt": { "type": "string", "example": "2019-07-30T09:59:41.056Z" }, "valid": { "type": "boolean", "example": true } } }, "meta": { "type": "object", "properties": {} } } } } } }