Calling Stored Procedure in script with Params


#1

I’m calling a stored procedure and passing some parameters in the script with the following statement (below). I get a “No response received” when I call the API and the stored procedure is not executed.
I believe the issue is in the platform.api.post section and the way I pass in the “body” variable. Any tips on getting this to work?

Thanks

    var body = {
        "params": [{
            "name": "DOB",
            "param_type": "",
            "value": "10/01/2015",
            "type": "date"
        }, {
            "name": "Name",
            "param_type": "",
            "value": "Jenni",
            "type": ""
        }, {
            "name": "IsVariable",
            "param_type": "",
            "value": "1",
            "type": ""
        }, {
            "name": "Gender",
            "param_type": "",
            "value": "F",
            "type": ""
        }, {
            "name": "Email",
            "param_type": "",
            "value": "john.doe@gmail.com",
            "type": ""
        }, {
            "name": "Phone",
            "param_type": "",
            "value": "80056533532",
            "type": ""
        }]
    };
    platform.api.post("mysql/_proc/bitnami_dreamfactory.usp_dp_something", body, options);

#2

Hi, I guess you don’t need the bitnami_dreamfactory in URI, just the name of proc directly:

mysql/_proc/usp_dp_something

and the params don’t need to put param_type and type, just name and value.


#3

It worked as-is in the API Docs. The only difference here is the “body” variable I’m assigning the params to. However, I’ve tried making your modifications and it still didn’t work.

Any other ideas?


#4

Resolved. It was a permission issue. Script was okay. Thanks.