Please consider editing your post and mark it as obsolete instead. Do you want to delete post?
Export a single project via rest api?
Permanently deleted user
Created
Hi,
I'm trying make some cleanup of old project in our TC. Before removing projects I want to export it. Is there some possibility how to do that via rest api?
the answer depends on what you are expecting to get out of it. Exporting a project exports its configuration. For that, while the "export" itself is not available "as is", there are two possibilities: -Pull the "projects/id:<project_id>" endpoint, request all the fields you are interested in with the ?fields=<fields> parameter and save that. -Locate the project folder in the data directory and simply back that up, without using the REST API.
Hi Vladimir,
the answer depends on what you are expecting to get out of it. Exporting a project exports its configuration. For that, while the "export" itself is not available "as is", there are two possibilities:
-Pull the "projects/id:<project_id>" endpoint, request all the fields you are interested in with the ?fields=<fields> parameter and save that.
-Locate the project folder in the data directory and simply back that up, without using the REST API.
With this in mind, if on top of saving the configuration you also want to save build history, test data, etc, for that you need to create a backup, which can be done in many ways, including the rest api: https://confluence.jetbrains.com/display/TCD18/TeamCity+Data+Backup or https://confluence.jetbrains.com/display/TCD18/REST+API#RESTAPI-DataBackup