DeploymentApi

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

cancelDeployment(body)

Cancel deployment

Example

// 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();
}

Parameters

Name Type Description Notes
body DeploymentCancellation

Return type

null (empty response body)

Authorization

apiToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/xml

getDeployment

ProjectDeployment getDeployment(deploymentId)

Get deployment

Example

// 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();
}

Parameters

Name Type Description Notes
deploymentId Integer Deployment ID (`deploymentId` property of `Deployment`)

Return type

ProjectDeployment

Authorization

apiToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/xml

startDeployment

Deployment startDeployment(body)

Start deployment

Example

// 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();
}

Parameters

Name Type Description Notes
body DeploymentStartRequest

Return type

Deployment

Authorization

apiToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/xml