Questions tagged [teamcity-rest-api]

11 questions
2
votes
4 answers

REST API Posting two request simultaneously with different properties fails with 403 status code due to CSRF check

I'm sending two post requests using the REST API: http://localhost:8111/app/rest/buildQueue but my second request fails with 403 Forbidden: Responding with 403 status code due to failed CSRF check: no "Origin" header is present and no…
2
votes
1 answer

Search for build number on TeamCity via REST API

We give our builds unique build numbers, that include a timestamp and a git commit. Given one of these build numbers (and no other information), I want to find the build configuration that built it. If I type the build number into the "Search" box…
Todd Owen
  • 15,650
  • 7
  • 54
  • 52
1
vote
1 answer

Update Teamcity parameter using powershell

I want to update the parameter value in the Teamcity build template. I tried the following URL: [PUT] http://xxx.xxx.x.xxx:8080/app/rest/buildTypes/{BuildTypeName}/parameters/{ParameterName}/{ParameterValue} By trying this I'm facing the following…
Chandramouli
  • 544
  • 6
  • 18
1
vote
0 answers

Team City 9.1 Rest API: How to run build with custom config setting (settings from VCS / not current ones) through Rest API

I am trying to run a personal build on a specified change through Rest API. If I ran the build though "Run Custom Build" dialog in UI, there is an option to specify which changes to include and which project config settings to use but I couldn't…
Yulia K
  • 11
  • 1
1
vote
1 answer

Trigger TeamCity build on a specific BitBucket repo branch

I'm trying to trigger a TeamCity build using the REST API on a specific branch in a repository. However, it is always fetching the code from the master branch (which is the default one). Not sure where I am doing it wrong. Is there anything else I…
Sri
  • 573
  • 2
  • 6
  • 20
1
vote
1 answer

Add build artifact to TeamCity asynchronously

I have a build config which simply runs a powershell script and below is what this script does Call first rest API method which starts a long running job Call second rest API method which checks status of the job (periodically, until status is…
Mehmet Ataş
  • 11,081
  • 6
  • 51
  • 78
1
vote
3 answers

How to get builds by specifying multiple tags by TeamCity REST API?

I have some builds. Each build has two tags. Tags show module name and version. So tags loogs like one-module and 1.2.3 or two-module and 4.5.6. I can do…
Sharikov Vladislav
  • 7,049
  • 9
  • 50
  • 87
0
votes
1 answer

401 client error with Python Requests delete() method

I am using Requests module with REST API. Attempted to delete TeamCity build configuration and caught into 401 client error. curl works, see below. curl -u admin:password -X DELETE url But not through Requests delete() method, see…
CarolL
  • 59
  • 2
  • 8
0
votes
2 answers

How to properly trigger build from the REST API in teamcity with a specific vcs number?

I am working on a C# tool to trigger build with the REST API of TeamCity. I want to trigger build with specific vcs number, so here's what I'm doing: POST => teamcity-server/httpAuth/app/rest/buildQueue HEADER => basicAuthCredentials BODY =>…
MathieuAuclair
  • 1,229
  • 11
  • 41
0
votes
1 answer

Create user from teamcity rest API

rest api stated this command as to create user curl -uadmin:admin -X POST 172.31.68.145:8111/app/rest/users but it gives user list any suggestion how to create user?
Ahsan Naseem
  • 1,046
  • 1
  • 19
  • 38
0
votes
1 answer

Teamcity REST API: get an artifact path

I have some problem: Have a build with n steps. Last step is a custom c# notifier, that sends emails about build state. Now I need to receive artifacts and attach them to my email. The problem is that at last step we don't have already zipped…
ArgorAvest
  • 151
  • 1
  • 1
  • 11