HTTP API > Batch SQL > Prepared statements with parameters

HTTP API > Batch SQL > Prepared statements with parameters,

no parameters statement for SQL batch for REST API?, need guide please

Are you getting any particular error? Can you post what you’re trying to do? Thanks.

Hi,
here is my sample code, I assume that the “post command query” with applying json parameters from the sql is also working from “post command batch”.

I have a similar issue. I get a 500 error with the following code. I tried it with ‘:id’ and :id without the single quotes. I’m using Gremlin as the language.

server.post('', {
                transaction: true,
                operations:
                    [
                        {
                            type: 'cmd',
                            language: 'gremlin',
                            command: `g.V().has('Identity', 'id', ':id')`,
                            parameters: {
                                id: my.id
                            }
                        }
                    ]
            })
            .then(function (response) {
                return response
            })