web API

Certified Senior Developer

Hi

I have created a webAPI to start a proces. input parameter is ID. If i pass the ID in the body field of test input window as "ID":"50". Its working fine. But when i test through postman, it throws 500- internal server error. Am i doing any mistake in web API?

Below is the code

a!startProcess(
processModel: cons!CONSTANTNAME,
processParameters: a!fromJson(
http!request.body
),
onSuccess: a!httpResponse(
statusCode: 200,
headers: {
a!httpHeader(name: "Content-Type", value: "application/json")
},
body: a!toJson(
fv!processInfo
)
),
onError: a!httpResponse(
statusCode: 500,
headers: {
a!httpHeader(name: "Content-Type", value: "application/json")
},
body: a!toJson(
{
error: "There was an error starting the process"
}
)
)
)

Please help.

  Discussion posts and replies are publicly visible