If optional Boolean parameter passthrough
is enabled while invoking the invokeOperation API SDK will not parse the response from the backend. To use this functionality, you must enable the passthrough
flag in the Kony Fabric application.
Syntax
integrationClient.invokeOperation(operationName, headers, params, successCallback, failureCallback, options)
Parameters
Name | Type |
---|---|
operationName | string |
headers | Dictionary |
params | Dictionary |
successCallback | function |
failureCallback | function |
options | Dictionary |
Sample code
// Sample code to fetch the integration service details with passthrough var serviceName = "integration_service_name";
// Get an instance of SDK var client = kony.sdk.getCurrentInstance(); var integrationSvc = client.getIntegrationService(serviceName); var operationName = "operation_name"; var params = { "custom-input-key1": "custom-input-value1" }; var headers = { "custom-header-key1": "custom-header-value1" }; //If there are no headers,pass null // options is an optional parameter that helps in configuring the network layer. integrationSvc.invokeOperation(operationName, headers, params, function(response) { kony.print("Integration Service Response is: " + JSON.stringify(response)); }, function(error) { kony.print("Integration Service Failure: " + JSON.stringify(error)); }, { "passthrough": true });
// Sample code to get the endpoint URL var serviceName = "integration_service_name"; // Get an instance of SDK var client = kony.sdk.getCurrentInstance(); var integrationSvc = client.getIntegrationService(serviceName); var url = integrationSvc.getUrl();
Note: The integrationClient is the IntegrationService object.
Error Code | Error Message |
---|---|
100 | UnhandledMFcode |
101 | Invalid User Credentials. |
102 | Invalid App Credentials. |
103 | Invalid User/App Credentials. |
104 | Session/Token got invalidated in the backend.Please login. |
105 | Invalid provider in appServices. |
106 | Claims Token is Unavialable |
1000 | An unknown error has occurred |
1011 | An error occurred while making the request. Please check device connectivity, server url and request parameters |
1013 | Invalid JSONn response was returned |
1014 | Request to server has timed out |
Copyright © 2019 Kony, Inc. All rights reserved. |