Icon

You are viewing the documentation of TeamCity 10.x and 2017.x, which is not the most recently released version of TeamCity.
View this page in the latest documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.

 

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: related to https://youtrack.jetbrains.com/issue/TW-48197

...

TeamCity REST can be configured to allow cross-origin requests using the rest.
If you want to cors.origins internal property.

To allow requests from a page loaded from a specific domain, add :

  • Add the page address (including the protocol and port

...

  • , do not use wildcards)  to the comma-separated internal property rest.cors.origins

...

  • e.g. 

    rest.cors.origins=http://myinternalwebpage.org.com:8080,https://myinternalwebpage.org.com

To enable support for preflight OPTIONS request, add ":

  1. Add the rest.cors.optionsRequest.allowUnauthorized=true

...

  1.  internal property

...

  1. .
  2. Restart the

...

  1. TeamCity server.
  2. Use the '/app/rest/latest

...

  1. ' URL for the requests

...

  1. (warning) Do not

...

  1. use '/app/rest

...

  1. ', do not use the 'httpAuth' prefix.

If that does not help, enable debug logging and look for related messages. If there are none, capture the browser traffic and messages to investigate the case.

...

List of Build Configurations: GET http://teamcity:8111/app/rest/buildTypes
List of Build Configurations of a project: GET http://teamcity:8111/app/rest/projects/<projectLocator>buildTypes 

Get projects with sub-projects/ Build Configurations data and their order as configured by the specified user on the Overview pageGET  http://teamcity:8111/app/rest/projects?locator=selectedByUser:current&fields=count,project(id,parentProjectId,projects(count,project(id),$locator(selectedByUser:current)),buildTypes(count,buildType(id),$locator(selectedByUser:current)))

...