Admin Service Cover
Code Insight 6.14.2 SP2
The AdminServiceCover is the entry point for Code Insight Core Server administrative public APIs. It supports various operations related to managing users, teams, projects, and policies. To use these APIs, the AdminServiceCover needs to be instantiated by passing in the Code Insight Core Server IP address. An example is shown below.
Constructor
AdminServiceCover(String Code InsightCoreServerIpAddress)
Sample Code
import com.Code Insight.script.AdminServiceCover;
// Enter core server IP address
String coreServerIpAddress = System.getProperty("core.server.url");
AdminServiceCover adminSrv = new AdminServiceCover(coreServerIpAddress);
if (adminSrv != null) {
try {
// Print all team names
adminSrv.getTeamNames().each {
team ->
println("Team: " + team);
}
} catch (Exception e) {
e.printStackTrace();
}
} else {
println("Unable to connect to Code Insight Core server: " + coreServerIpAddress);
}