Documentation
Welcome to Eka API docs! You're here to learn how to build web services quickly and efficiently, reduce integration time and increase API adoption.
Service: request
This service works as a http client and can call to any types of http calls.
Input Parameters:
Name | Type | Description |
---|---|---|
url: | String | Provides the HTTP url of service |
method: | String | Provides the HTTP method of the calling service |
payload: | String | Provides the request payload. |
uri_parameters: | Document | Provides the Query parameter |
auth: | Document | |
basic: | String | Provides basic authentication token |
awsSignature: | String | Provides AWS authentication token |
formData: | Document | Provides form data for the request |
respHandling: | ||
content-type: | ||
enableStreaming: | ||
binaryData: | Document | Provides content in the form of binary |
bytes: | byte array | Provides content in byte array. |
inputStream: | Object | Provides content in the input stream. |
Output Parameter:
respHeaders: | Document | Header of the response |
respPayload: | String | Payload of the response |
error: | String | Error message |
bytes: | byte array | response contents in bytes |
inputStream: | Object | response contents as input stream |
statusCode: | String | status code of the request |
Service: commitTransaction
This service will commit the transactions upto current step
Input Parameter:
Name | Type | Description |
---|---|---|
txConn: | Object | transaction object obtained when startCommit service. |
Service: rollbackTransaction
This service will rollback the uncommitted transaction.
Input Parameter:
Name | Type | Description |
---|---|---|
txConn: | Object | transaction object obtained when startCommit service |
Service: startTransaction
This service will start the transaction for a particular connection.
Input Parameter:
Name | Type | Description |
---|---|---|
jdbcConnection: | String | Provide the name of jdbcConnection |
Output Parameter:
Name | Type | Description |
---|---|---|
txConn: | Object | Return txConnection object |
Service: addDoc
This service will add a document/List of documents into a Document List.
Input Parameter:
Name | Type | Description |
---|---|---|
docList: | Document Array | Tracking field in which all input objects to be added and this object will receive in output |
addDoc: | Document | Provides single document object to add |
addDocList: | Document Array | Provides array object documents to add |
Output Parameter:
Name | Type | Description |
---|---|---|
docList: | Document Array | Output Array |
Service: deleteDocFromList
This service will add a document from a Document List.
Input Parameter:
Name | Type | Description |
---|---|---|
docList: | Document Array | The list from which the item to be remove |
deleteDoc: | Document | deleting object |
Service: listSize
This service will return an input document list size.
Input Parameter:
Name | Type | Description |
---|---|---|
size: | Document Array | Object whose size to evaluate |
Service: bytesToFile
This service will write bytes into a file on the server location and return a size in bytes of the produced file.
Input Parameter:
Name | Type | Description |
---|---|---|
filePathWithName: | String | path & file name of file on server machine |
bytes: | byte array | content of the files |
append: | boolean | append content in the file |
Output Parameter:
Name | Type | Description |
---|---|---|
size: | integer | size of the file in bytes |
Service: fileToBytes
This service will read the file on server location and return into bytes.
Input Parameter:
Name | Type | Description |
---|---|---|
filePathWithName: | Sting | path & file name of file on server machine |
Output Parameter:
Name | Type | Description |
---|---|---|
bytes: | byte array | content of the files |
Service: flushAndCloseBW
This service will flush & close a file stream connection.
Input Parameter:
Name | Type | Description |
---|---|---|
bufferedWriter: | object | Buffered writer object of the file |
Service: getBufferedReader
This service will return a buffered reader for a file on server location.
Input Parameter:
Name | Type | Description |
---|---|---|
filePathWithName: | String | path & file name of file on server machine |
Output Parameter:
Name | Type | Description |
---|---|---|
bufferedReader: | Object | Buffered Reader object of the file on server machine. |
Service: getBufferedWriter
This service will return a buffered writer for a file on server location.
Input Parameter:
Name | Type | Description |
---|---|---|
filePathWithName: | String | path & file name of file on server machine |
Output Parameter:
Name | Type | Description |
---|---|---|
bufferedWriter: | Object | Buffered Writer object of the file on server machine. |
Service: listFiles
This service will return a list of files and directory in a directory on server location.
Input Parameter:
Name | Type | Description |
---|---|---|
dirPath: | String | path of folder on server machine |
Output Parameter:
Name | Type | Description |
---|---|---|
list: | String Array | List of files and folders. |
Service: readLines
This service will return a specific number of lines from a file on server location.
Input Parameter:
Name | Type | Description |
---|---|---|
bufferedReader: | Object | Buffered Reader object of the file on server machine |
number: | integer | number of lines to be read |
Output Parameter:
Name | Type | Description |
---|---|---|
lines: | String Array | read lines from the file |
Service: stringToFile
This service will write string into a file on server location.
Input Parameter:
Name | Type | Description |
---|---|---|
filePathWithName: | String | path & file name of file on server machine |
string: | String | file content in the form of text |
append: | boolean | append content in the file |
Output Parameter:
Name | Type | Description |
---|---|---|
size: | integer | size of the file in bytes |
Service: verifyPath
This service will check whether a path exists or not on the server.
Input Parameter:
Name | Type | Description |
---|---|---|
absolutePath: | String | path of file or folder on server machine |
Output Parameter:
Name | Type | Description |
---|---|---|
exists: | boolean | Return status of file if it exists |
Service: writeLines
This service will write specific lines in a buffered writer.
Input Parameter:
Name | Type | Description |
---|---|---|
bufferedWriter: | Object | Buffered Writer object of the file on server |
lines: | String Array | number of lines write in the file |
Service: fromJson
This service will convert json string to the object.
Input Parameter:
Name | Type | Description |
---|---|---|
jsonString: | String | Json in string |
Output Parameter:
Name | Type | Description |
---|---|---|
output: | Document | Json Object |
Service: fromJsonList
This service will convert json string to the object. If you have multiple json objects which are in separate lines so it will convert json to object and return an array of objects.
Input Parameter:
Name | Type | Description |
---|---|---|
lines: | String Array | Json in lines as array |
Output Parameter:
Name | Type | Description |
---|---|---|
root: | Document Array | Array Json object |
Service: toJson
This service will convert the object to json in the form of string.
Input Parameter:
Name | Type | Description |
---|---|---|
root: | Document | Json Object |
Output Parameter:
Name | Type | Description |
---|---|---|
jsonString: | String | Json in String format |
Service: toJsonSchema
Input Parameter:
Name | Type | Description |
---|---|---|
*payload: | ||
isArray: |
Output Parameter:
Name | Type | Description |
---|---|---|
jsonSchema: | ||
@multiPart: | ||
error: |
Service: trim
This service trimmed the string and returned it.
Input Parameter:
Name | Type | Description |
---|---|---|
trim: | document | send string data in as key-value document |
Output Parameter:
Name | Type | Description |
---|---|---|
trim: | document | return same trimmed object |
Service: debugLog
This service will print input data on the server log file.
Input Parameter:
Name | Type | Description |
---|---|---|
log: | String | Provide any string to debug. |
msg: | String | Provide any string to debug. |
Service: endpoints
This service will return the list of services whose endpoints will be matched with keywords.
Input Parameter:
Name | Type | Description |
---|---|---|
keywork: | String | Search parameter for endpoints. |
Output Parameter:
Name | Type | Description |
---|---|---|
endpoints: | String Array | Array of endpoints with package name |
Service: exitRepeat
This service will exit the cursor from repeat.
Input Parameter:
Name | Type | Description |
---|---|---|
msg: | String | Search parameter for endpoints. |
Service: sleep
This service will causes the currently executing thread to sleep for the specified number of milliseconds.
Input Parameter:
Name | Type | Description |
---|---|---|
milli: | integer | sleep time in milliseconds. |
Service: throwException
This service will throw an exception forcefully.
How to use it?Input Parameter:
Name | Type | Description |
---|---|---|
error: | String | Message for exception. |
Service: getLastErrorDump
This service will internally catch the exception and return in the form of a JSON object.
Output Parameter:
Name | Type | Description |
---|---|---|
lastErrorDump: | Document | Error Stack Trace. |
Service: returnFile
This service will return binary content as response.
How to use it?Input Parameter:
Name | Type | Description |
---|---|---|
fileData: | byte array | file content as byte array |
fileName: | String | file location on server machine |
inputStream: | object | InputStream of file |
body: | String | file content as String |
Output Parameter:
Name | Type | Description |
---|---|---|
*multiPart: | object | internal object as file output. |
Service: getMultipart
This service will internally a multipart request and return the data.
How to use it?Input Parameter:
Name | Type | Description |
---|---|---|
fileData: | byte array | file content as byte array |
fileName: | String | file location on server machine |
inputStream: | object | InputStream of file |
body: | String | file content as String |
Output Parameter:
Name | Type | Description |
---|---|---|
*multiPart: | object | internal object as file output. |
Service: getCurrentDateTime
This Service will return the current date
* The current date comes based on the server's machine.
Input Parameter:
Name | Type | Description |
---|---|---|
format: | String | Java date format pattern |
Output Parameter:
Name | Type | Description |
---|---|---|
curDatetime: | String | Formatted date. |
Service: escapeSQL
Escapes special characters in a string for use in an SQL statement.
Input Parameter:
Name | Type | Description |
---|---|---|
input: | String | Data |
Output Parameter:
Name | Type | Description |
---|---|---|
output: | String | Data escapes special characters |
Service: fromXML
Convert XML data in string form to an object.
Input Parameter:
Name | Type | Description |
---|---|---|
XML: | String | XML |
Output Parameter:
Name | Type | Description |
---|---|---|
output: | Document | Object form of XML’s data |
Service: auditLogging
This is an internal service that will log the service execution into the database or any other logging platform like Splunk.
Input Parameter:
Name | Type | Description |
---|---|---|
auditLog: | Document | Request execution parameters |
correlationId: | String | correlationId |
sessionId: | String | sessionId |
dateTimeStmp: | String | request timestamp |
duration: | String | duration of execution |
error: | String | Error |
fqn: | String | service FQN |
request: | String | request |
response: | String | response |
nanoInstance: | String | execution start timestamp |
stopRecursiveLogging: | String | stopRecursiveLogging |
Service: findReferences
This service will find all places where the input service is associated.
Input Parameter:
Name | Type | Description |
---|---|---|
serviceFqn: | String | service FQN |
Output Parameter:
Name | Type | Description |
---|---|---|
list: | Document Array | All references list |
Service: validateFlowPath
This service will validate whether input service exists or not
Input Parameter:
Name | Type | Description |
---|---|---|
serviceFqn: | String | service FQN |
Output Parameter:
Name | Type | Description |
---|---|---|
list: | Document Array | All references list |
Service: execute
This service will execute a service programmatically.
Input Parameter:
Name | Type | Description |
---|---|---|
fqn: | String | service FQN |
Output Parameter:
Name | Type | Description |
---|---|---|
lastErrorDump: | Document | Error from the service |