How to find the latest backup via REST API?
Hello,
I manage to trigger a backup on TeamCity 8.1.2 through the REST API.
I now need to find the name of the latest backup through the REST API in order to copy it out of the server.
So far I didn't find a way to do that.
Is this possible? How?
Thanks.
Please sign in to leave a comment.
Hi Amos,
There is no special REST API request. The full backup name is returned by REST API request which triggers backup. So you can save and then use it.
Also you can find the latest created file in the <TeamCity Data Directory>/backup folder.
That's not correct.
Here is the output I get from triggering the backup:
And here is the response body:
Can you please show me a transcript of an API call like you describe?
Thanks.
You should perform POST request. Here is the example of request:
The answer is:
Thanks. This one worked.
I also had to fix the "filename" parameter to "fileName" (with a capital "N").