Matt Handy Thanks for posting your question in Microsoft Q&A. Yes, you can pass the part of the body to the binding and refer JSON payloads section which describes more about limitations, performance etc. I shared a sample code/request for V4 in this discussion thread and you can try the following code for V3 (modified from repo: https://github.com/Azure/azure-functions-sql-extension/tree/975630631c435c3c78660a96476e0f90b98b69cf/samples/samples-js/GetProducts) index.js
module.exports = async function (context, req, products) {
context.log('JavaScript HTTP trigger function processed a request.');
context.log(JSON.stringify(products));
return {
status: 200,
body: products
};
}
function.json
{
"bindings": [
{
"authLevel": "function",
"type": "httpTrigger",
"direction": "in",
"name": "req",
"methods": [
"get",
"post"
]
},
{
"type": "http",
"direction": "out",
"name": "res"
},
{
"name": "products",
"type": "sql",
"direction": "in",
"commandText": "select * from Products where Cost = @Cost",
"commandType": "Text",
"parameters": "@Cost={cost}",
"connectionStringSetting": "SqlConnectionString"
}
]
}
Sample request/response:
I hope this helps and let me know if any questions.
If you found the answer to your question helpful, please take a moment to mark it as Yes for others to benefit from your experience. Or simply add a comment tagging me and would be happy to answer your questions.