How to create a data explorer query with the APIs?

I think the correct way is the following:

-F 'query[name]=test1234'
-F 'query[sql]=SELECT * FROM topics'