I'm trying to automate our collaboration with TeamCity and resently faced a problem. I can create projects, build templates, build configurations, set all required parameters using REST API. Also I can trigger builds, but all of them fail because they are linked with default agent pool. I need to use another build pool, so I tried to find some way to assign projects (or build configurations) to spesific agent pools, but I cannot see such functionality in REST API service description and TeamCity documentation. Search for solution on this site did not provide any results.
So I came here and I'm asking community to help me. Is there any way to automate assigning of projects to agent pools using some API?