Hello,
I am using POSTMAN to send requests to MySQL stored procedures. The ones with simple input parameters work fine, but inputting a JSON array is giving me trouble. I’m running DF 2.1 on a Bitnami instance on AWS. My call looks like …/api/v2/vendb3/_proc/sampleproc . I’m running under an admin role. I am receiving the following error:
“Failed to call database stored procedure.\nArray to string conversion”
The DF and Apache logs do not shed any light on the root cause of this error.
The body of my request (running RAW as Content-Type=application/json) looks like the following:
{
“params”: [
{
“name”: “PList_of_Persons”,
“param_type”: “IN”,
“type”: “String”,
“value”: [
{“PersonsID”: 38},
{“PersonsID”: 37}
]
},
{
“name”: “PSQLResult”,
“param_type”: “OUT”,
“type”: “String”
}
]
}
The problem appears related to the value of the PList_of_Persons input array, which I cast to JSON within the called SPROC. Unfortunately, I never get to the SPROC, which executes correctly when executed within the MySQL Workbench by the way. Can anyone help me with the syntax for inputting a JSON parameter value here? I have tried various ways of quoting the “string” value, without success. Thanks in advance for your help.