Question
Is it possible to get all server health report items using the REST API?
GET /app/rest/health endpoint doesn't return all items.
Answer
GET /app/rest/health?locator=global:true will return only global health items. For example, a new TeamCity version is available, deprecated Java is used, etc.
To get health items related to projects, a projects locator is required. For example, GET /app/rest/health?locator=global:true,project:(archived:false) will return all global health items and all health items related to unarchived projects.
It is also possible to add buildType:(<build configuration locator>) and vcsRoot:(<VCS root locator>) to the request to get related health items.
For most scenarios, GET /app/rest/health?locator=global:true,project:(archived:false) should suffice, as VCS roots and build configurations usually exist inside the projects.
Comments
0 comments
Please sign in to leave a comment.