How to create a data explorer query with the APIs?

You should be able to make a POST request with the same payload values as PUT.
Did you try?