net.leanix.mtm.api.ExportsApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of leanix-mtm-sdk-java Show documentation
Show all versions of leanix-mtm-sdk-java Show documentation
SDK for Java to access leanIX MTM REST API
package net.leanix.mtm.api;
import net.leanix.dropkit.apiclient.ApiException;
import net.leanix.dropkit.apiclient.ApiClient;
import net.leanix.dropkit.apiclient.Configuration;
import net.leanix.dropkit.apiclient.Pair;
import javax.ws.rs.core.GenericType;
import net.leanix.mtm.api.models.WorkspaceResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ExportsApi {
private ApiClient apiClient;
public ExportsApi() {
this(Configuration.getDefaultApiClient());
}
public ExportsApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* getExport
* Retrieves an export
* @param key Download key (required)
* @return WorkspaceResponse
* @throws ApiException if fails to make API call
*/
public WorkspaceResponse getExport(String key) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'key' is set
if (key == null) {
throw new ApiException(400, "Missing the required parameter 'key' when calling getExport");
}
// create path and map variables
String localVarPath = "/exports/{key}"
.replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/octet-stream"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "token" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy