REST API: Assign Project to agentpool

I can't figure out what the body of this is suppose to look like, I've tried getting the body from the projects API and posting that, I've tried creating a body like so:

 "<project>
<id='<projectid>' />
</project>"
 
Tried sending id or name as plain text, that comes back as unsupported format.
 
Please help.
 
0
1 comment

Hi Umang,

If you make a get resquest to the same URL, you will get something like this:

<projects count="1">
<project id="Project_ID" name="Project_Name" parentProjectId="_Root" href="/app/rest/projects/id:Project_ID" webUrl="http://teamcity/project.html?projectId=Project_ID"/>
</projects>

You can take this project ID as a reference of what data to post, you can omit href, webUrl and even name, so something like this should work:
<project id="project_id" />
0

Please sign in to leave a comment.