Need assistance on request methods POST,GET

:point_right: 1. Need assistance in adding POST,GET method in serverless custom app

:bulb: 2. Trying to use GET and POST method in my code for integration but getting a error like
:heavy_multiplication_x: The mandatory key(s), display_name,type, missing for the ‘getTickets’ field.
:heavy_multiplication_x: Invalid type, undefined, found in the ‘getTickets’ field.
:heavy_multiplication_x: Invalid key(s), schema, found in the ‘getTickets’ field

used the code snippet
{

“getTickets”: {
“schema”: {
“method”: “GET”,
“host”: “iparam. brillio498.freshservice.com”,
“path”: “/api/v2/search/tickets”,
“query”: {
“query”: “"<%= context.query %>"”
},
“headers”: {
“Authorization”: “Basic <%= iparam.vn9XiZRGUUiE2RRLvoP%>”,
“Content-Type”: “application/json”
}
}
}
}
and the invoke template

const queryString = updated_at:<'2023-04-25' AND (status:2 OR status:3) AND cf_checkbox_field:null

$request.invokeTemplate(“getTickets”, {
context: {
query: queryString
}
});


please need guidance for this issue

can anyone help on this please?

Hi @Harshvitha_M,

I suspect that the app contains the schema of the request in the iparams.json file, inferring from the error message saying field. Can you check if it’s added in the config/requests.json or config/iparams.json file? It should be defined in the config/requests.json file.

Hi @Raviraj,
it is in the config/requests.json file only.

@Harshvitha_M I’m unable to reproduce the same with the same code in the requests.json file.

I have used the same code in the requests.json and ran the app. The app is running without throwing the mentioned errors in the FDK version - 9.1.0 (beta)

Could you confirm your FDK version? If there are any updates available with the “fdk version” command, could you update the FDK and check again?

Hey @Harshvitha_M,
I noticed that the requests.json file has the iparam values embedded in them, can you replace them as <%= iparam.domain %> and <%= iparam.apikey %> assuming the iparams.json is accepting domain and apikey as iparams.