Node.js query example using Axios

axios({ url: ‘https://api.monday.com/v2’, headers: {
Authorization: 'Bearer ’ + process.env.mondayToken
},
method: ‘get’,
data: {
query:  `query { boards(ids: ID_HERE) { description } }`
}
}).then((result) => {
console.log(result.data.data.boards[0])

})
.catch(function (error) {
console.log(error)
});
})
}

log returns { description: ‘post to [monday.com](http://monday.com/)’ }

Hey Kevin! Does this work for you? It looks like you’re using a GET request, when it should be a POST. All requests to our v2 endpoint should be POSTs, even if you’re receiving data (this is where the query parameter comes in).

Do let me know if you have questions :100:

1 Like

It did actually work, which was a leap forward for me, log did return description mentioned above. I did create a question around Mutation in another post I’ll mention you in. Thank u @dipro-monday.com

1 Like