CALLAPI
This legacy function allows the user to call Spark service API through Coherent Assistant.
This is an outdated custom function which we have replaced with SPARK_XCALL. This is available through the add-in for backward compatibility.
Syntax
CS.SPARK_CALLAPI(xcall_block)
xcall_blockRequired. Range address of the XCall block in upstream service. E.g.$A$1:$B$4. You can also use a named range for convenience.
UDFCall Block
Create an UDFCall block in the Excel workbook (upstream service) to make an API call. The UDFCall block can be anywhere in your workbook but must be on the same sheet as your Spark_UdfCallAPI function.
This table needs to include
CALLTYPE:SparkServiceFOLDERNAME: name of the folder containing downstream service.SERVICENAME: name of downstream service.REQUESTBODY: payload for calling downstream service. Must be in JSON format. You can copy theREQUESTBODYfrom downstream service API tester. If this is your first time using the SparkService we encourage to leave content of "request_meta" empty. Spark will use the latest version and the default Service Type to execute this service.
XCall block example

REQUESTBODYexample (v3 format)
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.
Response from Spark (example):
Last updated
