CALLAPI
This legacy function allows the user to call Spark service API through Coherent Assistant.
This function is deprecated and replaced with SPARK_XCALL.
The functions CALLAPI and GETOUTPUT functions work together.
Syntax: CS.SPARK_CALLAPI(xcall_block)
Call Spark service APIs. Retrieve the output using GETOUTPUT.
xcall_block *
Range address of the Xcall block in upstream service. You can also use a named range for convenience.
Example: $A$1:$B$4
xcall_block block
Create a xcall_block block in the Excel workbook (upstream service) to make an API call. The xcall_block block can be anywhere in your workbook but must be on the same sheet as the CS.SPARK_CALLAPI function. The 4 row x 2 column table must include this information:
CALLTYPE
SparkService
SparkService
FOLDERNAME
Name of the folder containing downstream service.
myfolder
SERVICENAME
Name of downstream service.
myservice
REQUESTBODY
Payload for calling downstream service. Must be in JSON format. You can copy the from the downstream service API Tester.
Output
The function will return a JSON formatted string with two parts.
The first,
metadata, contains information about the call to the downstream service such asstatus,error_code, andresponse_time.The second,
data, contains the response body of the downstream service.
Sample response
Last updated
