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