// For example for URL: {__APP_URL__}/api/device/10001?q=hello
// The API route pages/api/device/[device_id].js has the following code:
export default function handler(req, res) {
res.status(200).json(req.query) // {"q":"hello","device_id":"10001"}
}