A ready to go sample project illustrating how to use the Dashbuilder's DataSet API
Instructions on how to configure a project as well as how to use the API can be found here.
The Data Set API tests are also a good source of knowledge about the proper API usage.