All URIs are relative to *https://ci.appveyor.com/api*
Method | HTTP request | Description |
---|---|---|
cancelBuild | DELETE /builds/{accountName}/{projectSlug}/{buildVersion} | Cancel build |
getBuildArtifact | GET /buildjobs/{jobId}/artifacts/{artifactFileName} | Download build artifact |
getBuildArtifacts | GET /buildjobs/{jobId}/artifacts | Get build artifacts |
getBuildLog | GET /buildjobs/{jobId}/log | Download build log |
startBuild | POST /builds | Start build of branch most recent commit |
cancelBuild(accountName, projectSlug, buildVersion)
Cancel build
// Import classes: //import name.kevinlocke.appveyor.ApiClient; //import name.kevinlocke.appveyor.ApiException; //import name.kevinlocke.appveyor.Configuration; //import name.kevinlocke.appveyor.auth.*; //import name.kevinlocke.appveyor.api.BuildApi; ApiClient defaultClient = Configuration.getDefaultApiClient(); // Configure API key authorization: apiToken ApiKeyAuth apiToken = (ApiKeyAuth) defaultClient.getAuthentication("apiToken"); apiToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //apiToken.setApiKeyPrefix("Token"); BuildApi apiInstance = new BuildApi(); String accountName = "accountName_example"; // String | AppVeyor account name (`accountName` property of `UserAccount`) String projectSlug = "projectSlug_example"; // String | Project Slug String buildVersion = "buildVersion_example"; // String | Build Version (`version` property of `Build`) try { apiInstance.cancelBuild(accountName, projectSlug, buildVersion); } catch (ApiException e) { System.err.println("Exception when calling BuildApi#cancelBuild"); e.printStackTrace(); }
Name | Type | Description | Notes |
---|---|---|---|
accountName | String | AppVeyor account name (`accountName` property of `UserAccount`) | |
projectSlug | String | Project Slug | |
buildVersion | String | Build Version (`version` property of `Build`) |
File getBuildArtifact(jobId, artifactFileName)
Download build artifact
// Import classes: //import name.kevinlocke.appveyor.ApiException; //import name.kevinlocke.appveyor.api.BuildApi; BuildApi apiInstance = new BuildApi(); String jobId = "jobId_example"; // String | Build ID (`jobId` property of `BuildJob`) String artifactFileName = "artifactFileName_example"; // String | File name (or path) of a build artifact file. Corresponds to the `fileName` property of `ArtifactModel`. URL-encoding of slashes in parameter values is optional. try { File result = apiInstance.getBuildArtifact(jobId, artifactFileName); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling BuildApi#getBuildArtifact"); e.printStackTrace(); }
Name | Type | Description | Notes |
---|---|---|---|
jobId | String | Build ID (`jobId` property of `BuildJob`) | |
artifactFileName | String | File name (or path) of a build artifact file. Corresponds to the `fileName` property of `ArtifactModel`. URL-encoding of slashes in parameter values is optional. |
List<ArtifactModel> getBuildArtifacts(jobId)
Get build artifacts
// Import classes: //import name.kevinlocke.appveyor.ApiException; //import name.kevinlocke.appveyor.api.BuildApi; BuildApi apiInstance = new BuildApi(); String jobId = "jobId_example"; // String | Build ID (`jobId` property of `BuildJob`) try { List<ArtifactModel> result = apiInstance.getBuildArtifacts(jobId); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling BuildApi#getBuildArtifacts"); e.printStackTrace(); }
File getBuildLog(jobId)
Download build log
// Import classes: //import name.kevinlocke.appveyor.ApiException; //import name.kevinlocke.appveyor.api.BuildApi; BuildApi apiInstance = new BuildApi(); String jobId = "jobId_example"; // String | Build ID (`jobId` property of `BuildJob`) try { File result = apiInstance.getBuildLog(jobId); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling BuildApi#getBuildLog"); e.printStackTrace(); }
Build startBuild(body)
Start build of branch most recent commit
// Import classes: //import name.kevinlocke.appveyor.ApiClient; //import name.kevinlocke.appveyor.ApiException; //import name.kevinlocke.appveyor.Configuration; //import name.kevinlocke.appveyor.auth.*; //import name.kevinlocke.appveyor.api.BuildApi; ApiClient defaultClient = Configuration.getDefaultApiClient(); // Configure API key authorization: apiToken ApiKeyAuth apiToken = (ApiKeyAuth) defaultClient.getAuthentication("apiToken"); apiToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //apiToken.setApiKeyPrefix("Token"); BuildApi apiInstance = new BuildApi(); BuildStartRequest body = new BuildStartRequest(); // BuildStartRequest | try { Build result = apiInstance.startBuild(body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling BuildApi#startBuild"); e.printStackTrace(); }
Name | Type | Description | Notes |
---|---|---|---|
body | BuildStartRequest |