Frage

I am trying to use the TeamCity REST API of JetBrains as shown in http://confluence.jetbrains.com/display/TCD8/REST+API

I was specifically looking for a way to "Move" projects between project hierarchies. Obviously you can use the web user interface to Move a project however I need to automate this.

The REST API only talks about adding build steps, agents and so on. Is there a specific API to move a job? I tried using the Chrome Developer tools to see what happens when you move the project in a web UI but could not detect anything.

War es hilfreich?

Lösung

The application.wadl has methods to do most of these although the confluence page itself does not necessarily document every single feature.

To achieve this project move between different hierarchies, you had to do a PUT request to

http://$host/guestAuth/app/rest/projects/id:$project_to_edit/parentProject

with a JSON snippet (or an XML) of the form

{"id" : $new_parent_id}
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top