All URIs are relative to *https://ci.appveyor.com/api*
Method | HTTP request | Description |
---|---|---|
cancelDeployment | DELETE /deployments/stop | Cancel deployment |
getDeployment | GET /deployments/{deploymentId} | Get deployment |
startDeployment | POST /deployments | Start deployment |
cancelDeployment(body)
Cancel deployment
// 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.DeploymentApi; 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"); DeploymentApi apiInstance = new DeploymentApi(); DeploymentCancellation body = new DeploymentCancellation(); // DeploymentCancellation | try { apiInstance.cancelDeployment(body); } catch (ApiException e) { System.err.println("Exception when calling DeploymentApi#cancelDeployment"); e.printStackTrace(); }
Name | Type | Description | Notes |
---|---|---|---|
body | DeploymentCancellation |
ProjectDeployment getDeployment(deploymentId)
Get deployment
// 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.DeploymentApi; 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"); DeploymentApi apiInstance = new DeploymentApi(); Integer deploymentId = 56; // Integer | Deployment ID (`deploymentId` property of `Deployment`) try { ProjectDeployment result = apiInstance.getDeployment(deploymentId); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DeploymentApi#getDeployment"); e.printStackTrace(); }
Name | Type | Description | Notes |
---|---|---|---|
deploymentId | Integer | Deployment ID (`deploymentId` property of `Deployment`) |
Deployment startDeployment(body)
Start deployment
// 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.DeploymentApi; 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"); DeploymentApi apiInstance = new DeploymentApi(); DeploymentStartRequest body = new DeploymentStartRequest(); // DeploymentStartRequest | try { Deployment result = apiInstance.startDeployment(body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DeploymentApi#startDeployment"); e.printStackTrace(); }
Name | Type | Description | Notes |
---|---|---|---|
body | DeploymentStartRequest |