Creating query fields via API

I was hoping to create something of a 'backup and restore' script to restore our entity setup as much as possible through a script. One of our fields is a query field, but apparently I can't specify 'summary' properties when I create/update a field. Is there possibly some other way to do that via the API?