All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.circleci.client.v2.api.DefaultApi Maven / Gradle / Ivy

There is a newer version: 2.0.138
Show newest version
package com.circleci.client.v2.api;

import com.circleci.client.v2.ApiException;
import com.circleci.client.v2.ApiClient;
import com.circleci.client.v2.ApiResponse;
import com.circleci.client.v2.Configuration;
import com.circleci.client.v2.Pair;

import javax.ws.rs.core.GenericType;

import com.circleci.client.v2.model.ArtifactListResponse;
import com.circleci.client.v2.model.CheckoutKey;
import com.circleci.client.v2.model.CheckoutKeyInput;
import com.circleci.client.v2.model.CheckoutKeyListResponse;
import com.circleci.client.v2.model.Collaboration;
import com.circleci.client.v2.model.EnvironmentVariableListResponse;
import com.circleci.client.v2.model.EnvironmentVariablePair;
import com.circleci.client.v2.model.EnvironmentVariablePair1;
import com.circleci.client.v2.model.JobDetails;
import com.circleci.client.v2.model.MessageResponse;
import com.circleci.client.v2.model.Pipeline;
import com.circleci.client.v2.model.PipelineConfig;
import com.circleci.client.v2.model.PipelineLight;
import com.circleci.client.v2.model.PipelineListResponse;
import com.circleci.client.v2.model.Project;
import com.circleci.client.v2.model.RerunWorkflowParameters;
import com.circleci.client.v2.model.TestsResponse;
import com.circleci.client.v2.model.TriggerPipelineParameters;
import java.util.UUID;
import com.circleci.client.v2.model.User;
import com.circleci.client.v2.model.Workflow;
import com.circleci.client.v2.model.WorkflowJobListResponse;
import com.circleci.client.v2.model.WorkflowListResponse;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


public class DefaultApi {
  private ApiClient apiClient;

  public DefaultApi() {
    this(Configuration.getDefaultApiClient());
  }

  public DefaultApi(ApiClient apiClient) {
    this.apiClient = apiClient;
  }

  public ApiClient getApiClient() {
    return apiClient;
  }

  public void setApiClient(ApiClient apiClient) {
    this.apiClient = apiClient;
  }

  /**
   * Cancel job
   * Cancel job with a given job number.
   * @param jobNumber The number of the job. (required)
   * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required)
   * @return MessageResponse
   * @throws ApiException if fails to make API call
   * @http.response.details
     
Status Code Description Response Headers
202 -
*/ public MessageResponse cancelJob(Object jobNumber, String projectSlug) throws ApiException { return cancelJobWithHttpInfo(jobNumber, projectSlug).getData(); } /** * Cancel job * Cancel job with a given job number. * @param jobNumber The number of the job. (required) * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @return ApiResponse<MessageResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
202 -
*/ public ApiResponse cancelJobWithHttpInfo(Object jobNumber, String projectSlug) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'jobNumber' is set if (jobNumber == null) { throw new ApiException(400, "Missing the required parameter 'jobNumber' when calling cancelJob"); } // verify the required parameter 'projectSlug' is set if (projectSlug == null) { throw new ApiException(400, "Missing the required parameter 'projectSlug' when calling cancelJob"); } // create path and map variables String localVarPath = "/project/{project-slug}/job/{job-number}/cancel" .replaceAll("\\{" + "job-number" + "\\}", apiClient.escapeString(jobNumber.toString())) .replaceAll("\\{" + "project-slug" + "\\}", apiClient.escapeString(projectSlug.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Cancel a workflow * Cancels a running workflow. * @param id The unique ID of the workflow. (required) * @return MessageResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
202 A confirmation message. -
*/ public MessageResponse cancelWorkflow(UUID id) throws ApiException { return cancelWorkflowWithHttpInfo(id).getData(); } /** * Cancel a workflow * Cancels a running workflow. * @param id The unique ID of the workflow. (required) * @return ApiResponse<MessageResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
202 A confirmation message. -
*/ public ApiResponse cancelWorkflowWithHttpInfo(UUID id) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'id' is set if (id == null) { throw new ApiException(400, "Missing the required parameter 'id' when calling cancelWorkflow"); } // create path and map variables String localVarPath = "/workflow/{id}/cancel" .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Create a new checkout key * Creates a new checkout key. This API request is only usable with a user API token. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @param checkoutKeyInput (optional) * @return CheckoutKey * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
201 The checkout key. -
*/ public CheckoutKey createCheckoutKey(String projectSlug, CheckoutKeyInput checkoutKeyInput) throws ApiException { return createCheckoutKeyWithHttpInfo(projectSlug, checkoutKeyInput).getData(); } /** * Create a new checkout key * Creates a new checkout key. This API request is only usable with a user API token. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @param checkoutKeyInput (optional) * @return ApiResponse<CheckoutKey> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
201 The checkout key. -
*/ public ApiResponse createCheckoutKeyWithHttpInfo(String projectSlug, CheckoutKeyInput checkoutKeyInput) throws ApiException { Object localVarPostBody = checkoutKeyInput; // verify the required parameter 'projectSlug' is set if (projectSlug == null) { throw new ApiException(400, "Missing the required parameter 'projectSlug' when calling createCheckoutKey"); } // create path and map variables String localVarPath = "/project/{project-slug}/checkout-key" .replaceAll("\\{" + "project-slug" + "\\}", apiClient.escapeString(projectSlug.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Create an environment variable * Creates a new environment variable. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @param environmentVariablePair1 (optional) * @return EnvironmentVariablePair * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
201 The environment variable. -
*/ public EnvironmentVariablePair createEnvVar(String projectSlug, EnvironmentVariablePair1 environmentVariablePair1) throws ApiException { return createEnvVarWithHttpInfo(projectSlug, environmentVariablePair1).getData(); } /** * Create an environment variable * Creates a new environment variable. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @param environmentVariablePair1 (optional) * @return ApiResponse<EnvironmentVariablePair> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
201 The environment variable. -
*/ public ApiResponse createEnvVarWithHttpInfo(String projectSlug, EnvironmentVariablePair1 environmentVariablePair1) throws ApiException { Object localVarPostBody = environmentVariablePair1; // verify the required parameter 'projectSlug' is set if (projectSlug == null) { throw new ApiException(400, "Missing the required parameter 'projectSlug' when calling createEnvVar"); } // create path and map variables String localVarPath = "/project/{project-slug}/envvar" .replaceAll("\\{" + "project-slug" + "\\}", apiClient.escapeString(projectSlug.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Delete a checkout key * Deletes the checkout key. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @param fingerprint An SSH key fingerprint. (required) * @return MessageResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A confirmation message. -
*/ public MessageResponse deleteCheckoutKey(String projectSlug, String fingerprint) throws ApiException { return deleteCheckoutKeyWithHttpInfo(projectSlug, fingerprint).getData(); } /** * Delete a checkout key * Deletes the checkout key. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @param fingerprint An SSH key fingerprint. (required) * @return ApiResponse<MessageResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A confirmation message. -
*/ public ApiResponse deleteCheckoutKeyWithHttpInfo(String projectSlug, String fingerprint) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'projectSlug' is set if (projectSlug == null) { throw new ApiException(400, "Missing the required parameter 'projectSlug' when calling deleteCheckoutKey"); } // verify the required parameter 'fingerprint' is set if (fingerprint == null) { throw new ApiException(400, "Missing the required parameter 'fingerprint' when calling deleteCheckoutKey"); } // create path and map variables String localVarPath = "/project/{project-slug}/checkout-key/{fingerprint}" .replaceAll("\\{" + "project-slug" + "\\}", apiClient.escapeString(projectSlug.toString())) .replaceAll("\\{" + "fingerprint" + "\\}", apiClient.escapeString(fingerprint.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Delete an environment variable * Deletes the environment variable named :name. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @param name The name of the environment variable. (required) * @return MessageResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A confirmation message. -
*/ public MessageResponse deleteEnvVar(String projectSlug, String name) throws ApiException { return deleteEnvVarWithHttpInfo(projectSlug, name).getData(); } /** * Delete an environment variable * Deletes the environment variable named :name. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @param name The name of the environment variable. (required) * @return ApiResponse<MessageResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A confirmation message. -
*/ public ApiResponse deleteEnvVarWithHttpInfo(String projectSlug, String name) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'projectSlug' is set if (projectSlug == null) { throw new ApiException(400, "Missing the required parameter 'projectSlug' when calling deleteEnvVar"); } // verify the required parameter 'name' is set if (name == null) { throw new ApiException(400, "Missing the required parameter 'name' when calling deleteEnvVar"); } // create path and map variables String localVarPath = "/project/{project-slug}/envvar/{name}" .replaceAll("\\{" + "project-slug" + "\\}", apiClient.escapeString(projectSlug.toString())) .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Get a checkout key * Returns an individual checkout key. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @param fingerprint An SSH key fingerprint. (required) * @return CheckoutKey * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 The checkout key. -
*/ public CheckoutKey getCheckoutKey(String projectSlug, String fingerprint) throws ApiException { return getCheckoutKeyWithHttpInfo(projectSlug, fingerprint).getData(); } /** * Get a checkout key * Returns an individual checkout key. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @param fingerprint An SSH key fingerprint. (required) * @return ApiResponse<CheckoutKey> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 The checkout key. -
*/ public ApiResponse getCheckoutKeyWithHttpInfo(String projectSlug, String fingerprint) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'projectSlug' is set if (projectSlug == null) { throw new ApiException(400, "Missing the required parameter 'projectSlug' when calling getCheckoutKey"); } // verify the required parameter 'fingerprint' is set if (fingerprint == null) { throw new ApiException(400, "Missing the required parameter 'fingerprint' when calling getCheckoutKey"); } // create path and map variables String localVarPath = "/project/{project-slug}/checkout-key/{fingerprint}" .replaceAll("\\{" + "project-slug" + "\\}", apiClient.escapeString(projectSlug.toString())) .replaceAll("\\{" + "fingerprint" + "\\}", apiClient.escapeString(fingerprint.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Collaborations * Provides the set of organizations of which a user is a member or a collaborator. The set of organizations that a user can collaborate on is composed of: * Organizations that the current user belongs to across VCS types (e.g. BitBucket, GitHub) * The parent organization of repository that the user can collaborate on, but is not necessarily a member of * The organization of the current user's account * @return List<Collaboration> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Collaborations -
*/ public List getCollaborations() throws ApiException { return getCollaborationsWithHttpInfo().getData(); } /** * Collaborations * Provides the set of organizations of which a user is a member or a collaborator. The set of organizations that a user can collaborate on is composed of: * Organizations that the current user belongs to across VCS types (e.g. BitBucket, GitHub) * The parent organization of repository that the user can collaborate on, but is not necessarily a member of * The organization of the current user's account * @return ApiResponse<List<Collaboration>> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Collaborations -
*/ public ApiResponse> getCollaborationsWithHttpInfo() throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/me/collaborations"; // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType> localVarReturnType = new GenericType>() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * User Information * Provides information about the user that is currently signed in. * @return User * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 User login information. -
*/ public User getCurrentUser() throws ApiException { return getCurrentUserWithHttpInfo().getData(); } /** * User Information * Provides information about the user that is currently signed in. * @return ApiResponse<User> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 User login information. -
*/ public ApiResponse getCurrentUserWithHttpInfo() throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/me"; // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Get a masked environment variable * Returns the masked value of environment variable :name. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @param name The name of the environment variable. (required) * @return EnvironmentVariablePair * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 The environment variable. -
*/ public EnvironmentVariablePair getEnvVar(String projectSlug, String name) throws ApiException { return getEnvVarWithHttpInfo(projectSlug, name).getData(); } /** * Get a masked environment variable * Returns the masked value of environment variable :name. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @param name The name of the environment variable. (required) * @return ApiResponse<EnvironmentVariablePair> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 The environment variable. -
*/ public ApiResponse getEnvVarWithHttpInfo(String projectSlug, String name) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'projectSlug' is set if (projectSlug == null) { throw new ApiException(400, "Missing the required parameter 'projectSlug' when calling getEnvVar"); } // verify the required parameter 'name' is set if (name == null) { throw new ApiException(400, "Missing the required parameter 'name' when calling getEnvVar"); } // create path and map variables String localVarPath = "/project/{project-slug}/envvar/{name}" .replaceAll("\\{" + "project-slug" + "\\}", apiClient.escapeString(projectSlug.toString())) .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Get a job's artifacts * Returns a job's artifacts. * @param jobNumber The number of the job. (required) * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @return ArtifactListResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A paginated list of the job's artifacts. -
*/ public ArtifactListResponse getJobArtifacts(Object jobNumber, String projectSlug) throws ApiException { return getJobArtifactsWithHttpInfo(jobNumber, projectSlug).getData(); } /** * Get a job's artifacts * Returns a job's artifacts. * @param jobNumber The number of the job. (required) * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @return ApiResponse<ArtifactListResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A paginated list of the job's artifacts. -
*/ public ApiResponse getJobArtifactsWithHttpInfo(Object jobNumber, String projectSlug) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'jobNumber' is set if (jobNumber == null) { throw new ApiException(400, "Missing the required parameter 'jobNumber' when calling getJobArtifacts"); } // verify the required parameter 'projectSlug' is set if (projectSlug == null) { throw new ApiException(400, "Missing the required parameter 'projectSlug' when calling getJobArtifacts"); } // create path and map variables String localVarPath = "/project/{project-slug}/{job-number}/artifacts" .replaceAll("\\{" + "job-number" + "\\}", apiClient.escapeString(jobNumber.toString())) .replaceAll("\\{" + "project-slug" + "\\}", apiClient.escapeString(projectSlug.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Get job details * Returns job details. * @param jobNumber The number of the job. (required) * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @return JobDetails * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Job details. -
*/ public JobDetails getJobDetails(Object jobNumber, String projectSlug) throws ApiException { return getJobDetailsWithHttpInfo(jobNumber, projectSlug).getData(); } /** * Get job details * Returns job details. * @param jobNumber The number of the job. (required) * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @return ApiResponse<JobDetails> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Job details. -
*/ public ApiResponse getJobDetailsWithHttpInfo(Object jobNumber, String projectSlug) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'jobNumber' is set if (jobNumber == null) { throw new ApiException(400, "Missing the required parameter 'jobNumber' when calling getJobDetails"); } // verify the required parameter 'projectSlug' is set if (projectSlug == null) { throw new ApiException(400, "Missing the required parameter 'projectSlug' when calling getJobDetails"); } // create path and map variables String localVarPath = "/project/{project-slug}/job/{job-number}" .replaceAll("\\{" + "job-number" + "\\}", apiClient.escapeString(jobNumber.toString())) .replaceAll("\\{" + "project-slug" + "\\}", apiClient.escapeString(projectSlug.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Get a pipeline * Returns a pipeline by ID. * @param pipelineId The unique ID of the pipeline. (required) * @return Pipeline * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A pipeline object. -
*/ public Pipeline getPipelineById(UUID pipelineId) throws ApiException { return getPipelineByIdWithHttpInfo(pipelineId).getData(); } /** * Get a pipeline * Returns a pipeline by ID. * @param pipelineId The unique ID of the pipeline. (required) * @return ApiResponse<Pipeline> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A pipeline object. -
*/ public ApiResponse getPipelineByIdWithHttpInfo(UUID pipelineId) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'pipelineId' is set if (pipelineId == null) { throw new ApiException(400, "Missing the required parameter 'pipelineId' when calling getPipelineById"); } // create path and map variables String localVarPath = "/pipeline/{pipeline-id}" .replaceAll("\\{" + "pipeline-id" + "\\}", apiClient.escapeString(pipelineId.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Get a pipeline's configuration * Returns a pipeline's configuration by ID. * @param pipelineId The unique ID of the pipeline. (required) * @return PipelineConfig * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 The configuration strings for the pipeline. -
*/ public PipelineConfig getPipelineConfigById(UUID pipelineId) throws ApiException { return getPipelineConfigByIdWithHttpInfo(pipelineId).getData(); } /** * Get a pipeline's configuration * Returns a pipeline's configuration by ID. * @param pipelineId The unique ID of the pipeline. (required) * @return ApiResponse<PipelineConfig> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 The configuration strings for the pipeline. -
*/ public ApiResponse getPipelineConfigByIdWithHttpInfo(UUID pipelineId) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'pipelineId' is set if (pipelineId == null) { throw new ApiException(400, "Missing the required parameter 'pipelineId' when calling getPipelineConfigById"); } // create path and map variables String localVarPath = "/pipeline/{pipeline-id}/config" .replaceAll("\\{" + "pipeline-id" + "\\}", apiClient.escapeString(pipelineId.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Get a project * Retrieves a project by project slug. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @return Project * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A project object -
*/ public Project getProjectBySlug(String projectSlug) throws ApiException { return getProjectBySlugWithHttpInfo(projectSlug).getData(); } /** * Get a project * Retrieves a project by project slug. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @return ApiResponse<Project> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A project object -
*/ public ApiResponse getProjectBySlugWithHttpInfo(String projectSlug) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'projectSlug' is set if (projectSlug == null) { throw new ApiException(400, "Missing the required parameter 'projectSlug' when calling getProjectBySlug"); } // create path and map variables String localVarPath = "/project/{project-slug}" .replaceAll("\\{" + "project-slug" + "\\}", apiClient.escapeString(projectSlug.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Get test metadata * Get test metadata for a build. * @param jobNumber The number of the job. (required) * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @return TestsResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A paginated list of test results. -
*/ public TestsResponse getTests(Object jobNumber, String projectSlug) throws ApiException { return getTestsWithHttpInfo(jobNumber, projectSlug).getData(); } /** * Get test metadata * Get test metadata for a build. * @param jobNumber The number of the job. (required) * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @return ApiResponse<TestsResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A paginated list of test results. -
*/ public ApiResponse getTestsWithHttpInfo(Object jobNumber, String projectSlug) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'jobNumber' is set if (jobNumber == null) { throw new ApiException(400, "Missing the required parameter 'jobNumber' when calling getTests"); } // verify the required parameter 'projectSlug' is set if (projectSlug == null) { throw new ApiException(400, "Missing the required parameter 'projectSlug' when calling getTests"); } // create path and map variables String localVarPath = "/project/{project-slug}/{job-number}/tests" .replaceAll("\\{" + "job-number" + "\\}", apiClient.escapeString(jobNumber.toString())) .replaceAll("\\{" + "project-slug" + "\\}", apiClient.escapeString(projectSlug.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * User Information * Provides information about the user with the given ID. * @param id The unique ID of the user. (required) * @return User * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 User login information. -
*/ public User getUser(UUID id) throws ApiException { return getUserWithHttpInfo(id).getData(); } /** * User Information * Provides information about the user with the given ID. * @param id The unique ID of the user. (required) * @return ApiResponse<User> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 User login information. -
*/ public ApiResponse getUserWithHttpInfo(UUID id) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'id' is set if (id == null) { throw new ApiException(400, "Missing the required parameter 'id' when calling getUser"); } // create path and map variables String localVarPath = "/user/{id}" .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Get a workflow * Returns summary fields of a workflow by ID. * @param id The unique ID of the workflow. (required) * @return Workflow * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A workflow object. -
*/ public Workflow getWorkflowById(UUID id) throws ApiException { return getWorkflowByIdWithHttpInfo(id).getData(); } /** * Get a workflow * Returns summary fields of a workflow by ID. * @param id The unique ID of the workflow. (required) * @return ApiResponse<Workflow> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A workflow object. -
*/ public ApiResponse getWorkflowByIdWithHttpInfo(UUID id) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'id' is set if (id == null) { throw new ApiException(400, "Missing the required parameter 'id' when calling getWorkflowById"); } // create path and map variables String localVarPath = "/workflow/{id}" .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Get all checkout keys * Returns a sequence of checkout keys for `:project`. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @return CheckoutKeyListResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A sequence of checkout keys. -
*/ public CheckoutKeyListResponse listCheckoutKeys(String projectSlug) throws ApiException { return listCheckoutKeysWithHttpInfo(projectSlug).getData(); } /** * Get all checkout keys * Returns a sequence of checkout keys for `:project`. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @return ApiResponse<CheckoutKeyListResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A sequence of checkout keys. -
*/ public ApiResponse listCheckoutKeysWithHttpInfo(String projectSlug) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'projectSlug' is set if (projectSlug == null) { throw new ApiException(400, "Missing the required parameter 'projectSlug' when calling listCheckoutKeys"); } // create path and map variables String localVarPath = "/project/{project-slug}/checkout-key" .replaceAll("\\{" + "project-slug" + "\\}", apiClient.escapeString(projectSlug.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * List all environment variables * Returns four 'x' characters, in addition to the last four ASCII characters of the value, consistent with the display of environment variable values on the CircleCI website. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @return EnvironmentVariableListResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A sequence of environment variables. -
*/ public EnvironmentVariableListResponse listEnvVars(String projectSlug) throws ApiException { return listEnvVarsWithHttpInfo(projectSlug).getData(); } /** * List all environment variables * Returns four 'x' characters, in addition to the last four ASCII characters of the value, consistent with the display of environment variable values on the CircleCI website. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @return ApiResponse<EnvironmentVariableListResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A sequence of environment variables. -
*/ public ApiResponse listEnvVarsWithHttpInfo(String projectSlug) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'projectSlug' is set if (projectSlug == null) { throw new ApiException(400, "Missing the required parameter 'projectSlug' when calling listEnvVars"); } // create path and map variables String localVarPath = "/project/{project-slug}/envvar" .replaceAll("\\{" + "project-slug" + "\\}", apiClient.escapeString(projectSlug.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Get your pipelines * Returns a sequence of all pipelines for this project triggered by the user. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @param pageToken A token to retrieve the next page of results. (optional) * @return PipelineListResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A sequence of pipelines. -
*/ public PipelineListResponse listMyPipelines(String projectSlug, String pageToken) throws ApiException { return listMyPipelinesWithHttpInfo(projectSlug, pageToken).getData(); } /** * Get your pipelines * Returns a sequence of all pipelines for this project triggered by the user. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @param pageToken A token to retrieve the next page of results. (optional) * @return ApiResponse<PipelineListResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A sequence of pipelines. -
*/ public ApiResponse listMyPipelinesWithHttpInfo(String projectSlug, String pageToken) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'projectSlug' is set if (projectSlug == null) { throw new ApiException(400, "Missing the required parameter 'projectSlug' when calling listMyPipelines"); } // create path and map variables String localVarPath = "/project/{project-slug}/pipeline/mine" .replaceAll("\\{" + "project-slug" + "\\}", apiClient.escapeString(projectSlug.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page-token", pageToken)); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Get all pipelines * Returns all pipelines for this project. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @param branch The name of a vcs branch. (optional) * @param pageToken A token to retrieve the next page of results. (optional) * @return PipelineListResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
202 A sequence of pipelines. -
*/ public PipelineListResponse listPipelinesForProject(String projectSlug, String branch, String pageToken) throws ApiException { return listPipelinesForProjectWithHttpInfo(projectSlug, branch, pageToken).getData(); } /** * Get all pipelines * Returns all pipelines for this project. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @param branch The name of a vcs branch. (optional) * @param pageToken A token to retrieve the next page of results. (optional) * @return ApiResponse<PipelineListResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
202 A sequence of pipelines. -
*/ public ApiResponse listPipelinesForProjectWithHttpInfo(String projectSlug, String branch, String pageToken) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'projectSlug' is set if (projectSlug == null) { throw new ApiException(400, "Missing the required parameter 'projectSlug' when calling listPipelinesForProject"); } // create path and map variables String localVarPath = "/project/{project-slug}/pipeline" .replaceAll("\\{" + "project-slug" + "\\}", apiClient.escapeString(projectSlug.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "branch", branch)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page-token", pageToken)); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Get a workflow's jobs * Returns a sequence of jobs for a workflow. * @param id The unique ID of the workflow. (required) * @return WorkflowJobListResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A paginated sequence of jobs. -
*/ public WorkflowJobListResponse listWorkflowJobs(UUID id) throws ApiException { return listWorkflowJobsWithHttpInfo(id).getData(); } /** * Get a workflow's jobs * Returns a sequence of jobs for a workflow. * @param id The unique ID of the workflow. (required) * @return ApiResponse<WorkflowJobListResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A paginated sequence of jobs. -
*/ public ApiResponse listWorkflowJobsWithHttpInfo(UUID id) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'id' is set if (id == null) { throw new ApiException(400, "Missing the required parameter 'id' when calling listWorkflowJobs"); } // create path and map variables String localVarPath = "/workflow/{id}/job" .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Get a pipeline's workflows * Returns a paginated list of workflows by pipeline ID. * @param pipelineId The unique ID of the pipeline. (required) * @param pageToken A token to retrieve the next page of results. (optional) * @return WorkflowListResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A paginated list of workflow objects. -
*/ public WorkflowListResponse listWorkflowsByPipelineId(UUID pipelineId, String pageToken) throws ApiException { return listWorkflowsByPipelineIdWithHttpInfo(pipelineId, pageToken).getData(); } /** * Get a pipeline's workflows * Returns a paginated list of workflows by pipeline ID. * @param pipelineId The unique ID of the pipeline. (required) * @param pageToken A token to retrieve the next page of results. (optional) * @return ApiResponse<WorkflowListResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 A paginated list of workflow objects. -
*/ public ApiResponse listWorkflowsByPipelineIdWithHttpInfo(UUID pipelineId, String pageToken) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'pipelineId' is set if (pipelineId == null) { throw new ApiException(400, "Missing the required parameter 'pipelineId' when calling listWorkflowsByPipelineId"); } // create path and map variables String localVarPath = "/pipeline/{pipeline-id}/workflow" .replaceAll("\\{" + "pipeline-id" + "\\}", apiClient.escapeString(pipelineId.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page-token", pageToken)); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Rerun a workflow * Reruns a workflow. * @param id The unique ID of the workflow. (required) * @param rerunWorkflowParameters (optional) * @return MessageResponse * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
202 A confirmation message. -
*/ public MessageResponse rerunWorkflow(UUID id, RerunWorkflowParameters rerunWorkflowParameters) throws ApiException { return rerunWorkflowWithHttpInfo(id, rerunWorkflowParameters).getData(); } /** * Rerun a workflow * Reruns a workflow. * @param id The unique ID of the workflow. (required) * @param rerunWorkflowParameters (optional) * @return ApiResponse<MessageResponse> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
202 A confirmation message. -
*/ public ApiResponse rerunWorkflowWithHttpInfo(UUID id, RerunWorkflowParameters rerunWorkflowParameters) throws ApiException { Object localVarPostBody = rerunWorkflowParameters; // verify the required parameter 'id' is set if (id == null) { throw new ApiException(400, "Missing the required parameter 'id' when calling rerunWorkflow"); } // create path and map variables String localVarPath = "/workflow/{id}/rerun" .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Trigger a new pipeline * Triggers a new pipeline on the project. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @param xAttributionLogin The login or user-readable identifier for the pipeline's triggerer. (optional) * @param xAttributionActorId The id the integration uses to identify the pipeline's triggerer. (optional) * @param triggerPipelineParameters (optional) * @return PipelineLight * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
201 The created pipeline. -
*/ public PipelineLight triggerPipeline(String projectSlug, String xAttributionLogin, String xAttributionActorId, TriggerPipelineParameters triggerPipelineParameters) throws ApiException { return triggerPipelineWithHttpInfo(projectSlug, xAttributionLogin, xAttributionActorId, triggerPipelineParameters).getData(); } /** * Trigger a new pipeline * Triggers a new pipeline on the project. * @param projectSlug Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. (required) * @param xAttributionLogin The login or user-readable identifier for the pipeline's triggerer. (optional) * @param xAttributionActorId The id the integration uses to identify the pipeline's triggerer. (optional) * @param triggerPipelineParameters (optional) * @return ApiResponse<PipelineLight> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
201 The created pipeline. -
*/ public ApiResponse triggerPipelineWithHttpInfo(String projectSlug, String xAttributionLogin, String xAttributionActorId, TriggerPipelineParameters triggerPipelineParameters) throws ApiException { Object localVarPostBody = triggerPipelineParameters; // verify the required parameter 'projectSlug' is set if (projectSlug == null) { throw new ApiException(400, "Missing the required parameter 'projectSlug' when calling triggerPipeline"); } // create path and map variables String localVarPath = "/project/{project-slug}/pipeline" .replaceAll("\\{" + "project-slug" + "\\}", apiClient.escapeString(projectSlug.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); if (xAttributionLogin != null) localVarHeaderParams.put("x-attribution-login", apiClient.parameterToString(xAttributionLogin)); if (xAttributionActorId != null) localVarHeaderParams.put("x-attribution-actor-id", apiClient.parameterToString(xAttributionActorId)); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "api_key_header", "api_key_query", "basic_auth" }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy