EnvironmentApi

All URIs are relative to *https://ci.appveyor.com/api*

Method HTTP request Description
addEnvironment POST /environments Add environment
deleteEnvironment DELETE /environments/{deploymentEnvironmentId} Delete environment
getEnvironmentDeployments GET /environments/{deploymentEnvironmentId}/deployments Get environment deployments
getEnvironmentSettings GET /environments/{deploymentEnvironmentId}/settings Get environment settings
getEnvironments GET /environments Get environments
updateEnvironment PUT /environments Update environment

addEnvironment

DeploymentEnvironmentWithSettings addEnvironment(body)

Add environment

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.EnvironmentApi;

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");

EnvironmentApi apiInstance = new EnvironmentApi();
DeploymentEnvironmentAddition body = new DeploymentEnvironmentAddition(); // DeploymentEnvironmentAddition | 
try {
    DeploymentEnvironmentWithSettings result = apiInstance.addEnvironment(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EnvironmentApi#addEnvironment");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body DeploymentEnvironmentAddition

Authorization

apiToken

HTTP request headers

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

deleteEnvironment

deleteEnvironment(deploymentEnvironmentId)

Delete environment

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.EnvironmentApi;

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");

EnvironmentApi apiInstance = new EnvironmentApi();
Integer deploymentEnvironmentId = 56; // Integer | Deployment Environment ID (`deploymentEnvironmentId` property of `DeploymentEnvironment`) 
try {
    apiInstance.deleteEnvironment(deploymentEnvironmentId);
} catch (ApiException e) {
    System.err.println("Exception when calling EnvironmentApi#deleteEnvironment");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
deploymentEnvironmentId Integer Deployment Environment ID (`deploymentEnvironmentId` property of `DeploymentEnvironment`)

Return type

null (empty response body)

Authorization

apiToken

HTTP request headers

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

getEnvironmentDeployments

DeploymentEnvironmentDeploymentsResults getEnvironmentDeployments(deploymentEnvironmentId)

Get environment deployments

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.EnvironmentApi;

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");

EnvironmentApi apiInstance = new EnvironmentApi();
Integer deploymentEnvironmentId = 56; // Integer | Deployment Environment ID (`deploymentEnvironmentId` property of `DeploymentEnvironment`) 
try {
    DeploymentEnvironmentDeploymentsResults result = apiInstance.getEnvironmentDeployments(deploymentEnvironmentId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EnvironmentApi#getEnvironmentDeployments");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
deploymentEnvironmentId Integer Deployment Environment ID (`deploymentEnvironmentId` property of `DeploymentEnvironment`)

Authorization

apiToken

HTTP request headers

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

getEnvironmentSettings

DeploymentEnvironmentSettingsResults getEnvironmentSettings(deploymentEnvironmentId)

Get environment settings

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.EnvironmentApi;

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");

EnvironmentApi apiInstance = new EnvironmentApi();
Integer deploymentEnvironmentId = 56; // Integer | Deployment Environment ID (`deploymentEnvironmentId` property of `DeploymentEnvironment`) 
try {
    DeploymentEnvironmentSettingsResults result = apiInstance.getEnvironmentSettings(deploymentEnvironmentId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EnvironmentApi#getEnvironmentSettings");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
deploymentEnvironmentId Integer Deployment Environment ID (`deploymentEnvironmentId` property of `DeploymentEnvironment`)

Authorization

apiToken

HTTP request headers

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

getEnvironments

List<DeploymentEnvironmentLookupModel> getEnvironments()

Get environments

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.EnvironmentApi;

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");

EnvironmentApi apiInstance = new EnvironmentApi();
try {
    List<DeploymentEnvironmentLookupModel> result = apiInstance.getEnvironments();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EnvironmentApi#getEnvironments");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Authorization

apiToken

HTTP request headers

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

updateEnvironment

DeploymentEnvironmentWithSettings updateEnvironment(body)

Update environment

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.EnvironmentApi;

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");

EnvironmentApi apiInstance = new EnvironmentApi();
DeploymentEnvironmentWithSettings body = new DeploymentEnvironmentWithSettings(); // DeploymentEnvironmentWithSettings | 
try {
    DeploymentEnvironmentWithSettings result = apiInstance.updateEnvironment(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EnvironmentApi#updateEnvironment");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body DeploymentEnvironmentWithSettings

Authorization

apiToken

HTTP request headers

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