Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package com.seeq.api;
import com.seeq.ApiException;
import com.seeq.ApiClient;
import com.seeq.Configuration;
import com.seeq.model.*;
import com.seeq.Pair;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.ProcessingException;
import com.seeq.model.AnnotationListOutputV1;
import com.seeq.model.ArchiveOutputV1;
import com.seeq.model.ItemSearchPreviewListV1;
import com.seeq.model.ReferencedItemsOutputV1;
import com.seeq.model.StatusMessageBase;
import java.util.UUID;
import com.seeq.model.WorkbookInputV1;
import com.seeq.model.WorkbookOutputListV1;
import com.seeq.model.WorkbookOutputV1;
import com.seeq.model.WorksheetInputV1;
import com.seeq.model.WorksheetOutputListV1;
import com.seeq.model.WorksheetOutputV1;
import com.seeq.model.WorkstepInputV1;
import com.seeq.model.WorkstepOutputV1;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class WorkbooksApi {
private ApiClient apiClient;
private long retryTimeout = 5_000; // Default of 5 seconds
public WorkbooksApi() {
this(Configuration.getDefaultApiClient());
}
public WorkbooksApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public void setRetryTimeout(long retryTimeout) {
this.retryTimeout = retryTimeout;
}
public long getRetryTimeout() {
return this.retryTimeout;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Put the specified item at the top of the recently accessed list for the workbook
*
* @param workbookId ID of the workbook (required)
* @param itemId Item to be added (required)
* @return ItemSearchPreviewListV1
* @throws ApiException if fails to make API call
*/
public ItemSearchPreviewListV1 addRecentlyAccessed(String workbookId, String itemId) throws ApiException {
ApiClient.ApiResponse localVarResponse = addRecentlyAccessedWithHttpInfo(workbookId, itemId);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Put the specified item at the top of the recently accessed list for the workbook
*
* @param workbookId ID of the workbook (required)
* @param itemId Item to be added (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse addRecentlyAccessedWithHttpInfo(String workbookId, String itemId) throws ApiException {
Map localVarHeaderParams = new HashMap();
return addRecentlyAccessedWithHeadersAndHttpInfo(workbookId, itemId, localVarHeaderParams);
}
/**
* Put the specified item at the top of the recently accessed list for the workbook
*
* @param workbookId ID of the workbook (required)
* @param itemId Item to be added (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse addRecentlyAccessedWithHeadersAndHttpInfo(String workbookId, String itemId, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return addRecentlyAccessedInternal(workbookId, itemId, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse addRecentlyAccessedInternal(String workbookId, String itemId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'workbookId' is set
if (workbookId == null) {
throw new ApiException(400, "Missing the required path parameter 'workbookId' when calling addRecentlyAccessed");
}
// verify the required path parameter 'itemId' is set
if (itemId == null) {
throw new ApiException(400, "Missing the required path parameter 'itemId' when calling addRecentlyAccessed");
}
// create path and map variables
String localVarPath = "/workbooks/{workbookId}/recently-accessed/{itemId}"
.replaceAll("\\{" + "workbookId" + "\\}", apiClient.escapeString(workbookId.toString()))
.replaceAll("\\{" + "itemId" + "\\}", apiClient.escapeString(itemId.toString()));
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/vnd.seeq.v1+json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Archive a workbook by id
*
* @param id ID of the workbook to archive (required)
* @return ArchiveOutputV1
* @throws ApiException if fails to make API call
*/
public ArchiveOutputV1 archiveWorkbook(String id) throws ApiException {
ApiClient.ApiResponse localVarResponse = archiveWorkbookWithHttpInfo(id);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Archive a workbook by id
*
* @param id ID of the workbook to archive (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse archiveWorkbookWithHttpInfo(String id) throws ApiException {
Map localVarHeaderParams = new HashMap();
return archiveWorkbookWithHeadersAndHttpInfo(id, localVarHeaderParams);
}
/**
* Archive a workbook by id
*
* @param id ID of the workbook to archive (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse archiveWorkbookWithHeadersAndHttpInfo(String id, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return archiveWorkbookInternal(id, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse archiveWorkbookInternal(String id, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required path parameter 'id' when calling archiveWorkbook");
}
// create path and map variables
String localVarPath = "/workbooks/{id}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Archive a worksheet
*
* @param workbookId ID of the workbook on which the worksheet exists (required)
* @param worksheetId ID of the worksheet to archive (required)
* @return ArchiveOutputV1
* @throws ApiException if fails to make API call
*/
public ArchiveOutputV1 archiveWorksheet(String workbookId, String worksheetId) throws ApiException {
ApiClient.ApiResponse localVarResponse = archiveWorksheetWithHttpInfo(workbookId, worksheetId);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Archive a worksheet
*
* @param workbookId ID of the workbook on which the worksheet exists (required)
* @param worksheetId ID of the worksheet to archive (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse archiveWorksheetWithHttpInfo(String workbookId, String worksheetId) throws ApiException {
Map localVarHeaderParams = new HashMap();
return archiveWorksheetWithHeadersAndHttpInfo(workbookId, worksheetId, localVarHeaderParams);
}
/**
* Archive a worksheet
*
* @param workbookId ID of the workbook on which the worksheet exists (required)
* @param worksheetId ID of the worksheet to archive (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse archiveWorksheetWithHeadersAndHttpInfo(String workbookId, String worksheetId, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return archiveWorksheetInternal(workbookId, worksheetId, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse archiveWorksheetInternal(String workbookId, String worksheetId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'workbookId' is set
if (workbookId == null) {
throw new ApiException(400, "Missing the required path parameter 'workbookId' when calling archiveWorksheet");
}
// verify the required path parameter 'worksheetId' is set
if (worksheetId == null) {
throw new ApiException(400, "Missing the required path parameter 'worksheetId' when calling archiveWorksheet");
}
// create path and map variables
String localVarPath = "/workbooks/{workbookId}/worksheets/{worksheetId}"
.replaceAll("\\{" + "workbookId" + "\\}", apiClient.escapeString(workbookId.toString()))
.replaceAll("\\{" + "worksheetId" + "\\}", apiClient.escapeString(worksheetId.toString()));
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Create a workbook
*
* @param body Workbook information (required)
* @return WorkbookOutputV1
* @throws ApiException if fails to make API call
*/
public WorkbookOutputV1 createWorkbook(WorkbookInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = createWorkbookWithHttpInfo(body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Create a workbook
*
* @param body Workbook information (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createWorkbookWithHttpInfo(WorkbookInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return createWorkbookWithHeadersAndHttpInfo(body, localVarHeaderParams);
}
/**
* Create a workbook
*
* @param body Workbook information (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createWorkbookWithHeadersAndHttpInfo(WorkbookInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return createWorkbookInternal(body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse createWorkbookInternal(WorkbookInputV1 body, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = body;
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling createWorkbook");
}
// create path and map variables
String localVarPath = "/workbooks";
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/vnd.seeq.v1+json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Create a worksheet
*
* @param workbookId ID of the workbook on which to create the worksheet (required)
* @param body Worksheet information (required)
* @return WorksheetOutputV1
* @throws ApiException if fails to make API call
*/
public WorksheetOutputV1 createWorksheet(String workbookId, WorksheetInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = createWorksheetWithHttpInfo(workbookId, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Create a worksheet
*
* @param workbookId ID of the workbook on which to create the worksheet (required)
* @param body Worksheet information (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createWorksheetWithHttpInfo(String workbookId, WorksheetInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return createWorksheetWithHeadersAndHttpInfo(workbookId, body, localVarHeaderParams);
}
/**
* Create a worksheet
*
* @param workbookId ID of the workbook on which to create the worksheet (required)
* @param body Worksheet information (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createWorksheetWithHeadersAndHttpInfo(String workbookId, WorksheetInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return createWorksheetInternal(workbookId, body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse createWorksheetInternal(String workbookId, WorksheetInputV1 body, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = body;
// verify the required path parameter 'workbookId' is set
if (workbookId == null) {
throw new ApiException(400, "Missing the required path parameter 'workbookId' when calling createWorksheet");
}
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling createWorksheet");
}
// create path and map variables
String localVarPath = "/workbooks/{workbookId}/worksheets"
.replaceAll("\\{" + "workbookId" + "\\}", apiClient.escapeString(workbookId.toString()));
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/vnd.seeq.v1+json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Append a new workstep to the worksheet
*
* @param workbookId ID of the workbook on which the worksheet exists (required)
* @param worksheetId ID of the worksheet on which to append the new workstep (required)
* @param body Workstep information (required)
* @param noWorkstepMessage Option to not send a workstep message notifying clients that the current workstep of the worksheet has been updated. Should only be used when multiple worksteps are being pushed in quick succession and a subsequent call will be made to set the current workstep. (optional, default to false)
* @return WorkstepOutputV1
* @throws ApiException if fails to make API call
*/
public WorkstepOutputV1 createWorkstep(String workbookId, String worksheetId, WorkstepInputV1 body, Boolean noWorkstepMessage) throws ApiException {
ApiClient.ApiResponse localVarResponse = createWorkstepWithHttpInfo(workbookId, worksheetId, body, noWorkstepMessage);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Append a new workstep to the worksheet
*
* @param workbookId ID of the workbook on which the worksheet exists (required)
* @param worksheetId ID of the worksheet on which to append the new workstep (required)
* @param body Workstep information (required)
* @param noWorkstepMessage Option to not send a workstep message notifying clients that the current workstep of the worksheet has been updated. Should only be used when multiple worksteps are being pushed in quick succession and a subsequent call will be made to set the current workstep. (optional, default to false)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createWorkstepWithHttpInfo(String workbookId, String worksheetId, WorkstepInputV1 body, Boolean noWorkstepMessage) throws ApiException {
Map localVarHeaderParams = new HashMap();
return createWorkstepWithHeadersAndHttpInfo(workbookId, worksheetId, body, noWorkstepMessage, localVarHeaderParams);
}
/**
* Append a new workstep to the worksheet
*
* @param workbookId ID of the workbook on which the worksheet exists (required)
* @param worksheetId ID of the worksheet on which to append the new workstep (required)
* @param body Workstep information (required)
* @param noWorkstepMessage Option to not send a workstep message notifying clients that the current workstep of the worksheet has been updated. Should only be used when multiple worksteps are being pushed in quick succession and a subsequent call will be made to set the current workstep. (optional, default to false)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createWorkstepWithHeadersAndHttpInfo(String workbookId, String worksheetId, WorkstepInputV1 body, Boolean noWorkstepMessage, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "noWorkstepMessage", noWorkstepMessage));
localVarHeaderParams.putAll(customHeaders);
return createWorkstepInternal(workbookId, worksheetId, body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse createWorkstepInternal(String workbookId, String worksheetId, WorkstepInputV1 body, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = body;
// verify the required path parameter 'workbookId' is set
if (workbookId == null) {
throw new ApiException(400, "Missing the required path parameter 'workbookId' when calling createWorkstep");
}
// verify the required path parameter 'worksheetId' is set
if (worksheetId == null) {
throw new ApiException(400, "Missing the required path parameter 'worksheetId' when calling createWorkstep");
}
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling createWorkstep");
}
// create path and map variables
String localVarPath = "/workbooks/{workbookId}/worksheets/{worksheetId}/worksteps"
.replaceAll("\\{" + "workbookId" + "\\}", apiClient.escapeString(workbookId.toString()))
.replaceAll("\\{" + "worksheetId" + "\\}", apiClient.escapeString(worksheetId.toString()));
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/vnd.seeq.v1+json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Get the recently accessed list for the workbook
*
* @param workbookId ID of the workbook (required)
* @return ItemSearchPreviewListV1
* @throws ApiException if fails to make API call
*/
public ItemSearchPreviewListV1 getRecentlyAccessed(String workbookId) throws ApiException {
ApiClient.ApiResponse localVarResponse = getRecentlyAccessedWithHttpInfo(workbookId);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get the recently accessed list for the workbook
*
* @param workbookId ID of the workbook (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getRecentlyAccessedWithHttpInfo(String workbookId) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getRecentlyAccessedWithHeadersAndHttpInfo(workbookId, localVarHeaderParams);
}
/**
* Get the recently accessed list for the workbook
*
* @param workbookId ID of the workbook (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getRecentlyAccessedWithHeadersAndHttpInfo(String workbookId, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return getRecentlyAccessedInternal(workbookId, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getRecentlyAccessedInternal(String workbookId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'workbookId' is set
if (workbookId == null) {
throw new ApiException(400, "Missing the required path parameter 'workbookId' when calling getRecentlyAccessed");
}
// create path and map variables
String localVarPath = "/workbooks/{workbookId}/recently-accessed"
.replaceAll("\\{" + "workbookId" + "\\}", apiClient.escapeString(workbookId.toString()));
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Get items referenced by workstep or a journal
*
* @param worksheetId ID of the worksheet associated with journal that references items to return (required)
* @param workstepId ID of the workstep that references items to return (required)
* @return ReferencedItemsOutputV1
* @throws ApiException if fails to make API call
*/
public ReferencedItemsOutputV1 getReferencedItems(String worksheetId, String workstepId) throws ApiException {
ApiClient.ApiResponse localVarResponse = getReferencedItemsWithHttpInfo(worksheetId, workstepId);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get items referenced by workstep or a journal
*
* @param worksheetId ID of the worksheet associated with journal that references items to return (required)
* @param workstepId ID of the workstep that references items to return (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getReferencedItemsWithHttpInfo(String worksheetId, String workstepId) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getReferencedItemsWithHeadersAndHttpInfo(worksheetId, workstepId, localVarHeaderParams);
}
/**
* Get items referenced by workstep or a journal
*
* @param worksheetId ID of the worksheet associated with journal that references items to return (required)
* @param workstepId ID of the workstep that references items to return (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getReferencedItemsWithHeadersAndHttpInfo(String worksheetId, String workstepId, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return getReferencedItemsInternal(worksheetId, workstepId, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getReferencedItemsInternal(String worksheetId, String workstepId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'worksheetId' is set
if (worksheetId == null) {
throw new ApiException(400, "Missing the required path parameter 'worksheetId' when calling getReferencedItems");
}
// verify the required path parameter 'workstepId' is set
if (workstepId == null) {
throw new ApiException(400, "Missing the required path parameter 'workstepId' when calling getReferencedItems");
}
// create path and map variables
String localVarPath = "/workbooks/worksheets/{worksheetId}/worksteps/{workstepId}/referenced-items"
.replaceAll("\\{" + "worksheetId" + "\\}", apiClient.escapeString(worksheetId.toString()))
.replaceAll("\\{" + "workstepId" + "\\}", apiClient.escapeString(workstepId.toString()));
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Get a workbook
*
* @param id ID of the workbook to retrieve (required)
* @param fullAncestry If true, the actual ancestor folders of the workbook will be returned, which includes the home folder of the relevant user. Otherwise, if a workbook is shared, then only the ancestors that are shared will be returned. Requires admin privileges. (optional)
* @return WorkbookOutputV1
* @throws ApiException if fails to make API call
*/
public WorkbookOutputV1 getWorkbook(String id, Boolean fullAncestry) throws ApiException {
ApiClient.ApiResponse localVarResponse = getWorkbookWithHttpInfo(id, fullAncestry);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a workbook
*
* @param id ID of the workbook to retrieve (required)
* @param fullAncestry If true, the actual ancestor folders of the workbook will be returned, which includes the home folder of the relevant user. Otherwise, if a workbook is shared, then only the ancestors that are shared will be returned. Requires admin privileges. (optional)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getWorkbookWithHttpInfo(String id, Boolean fullAncestry) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getWorkbookWithHeadersAndHttpInfo(id, fullAncestry, localVarHeaderParams);
}
/**
* Get a workbook
*
* @param id ID of the workbook to retrieve (required)
* @param fullAncestry If true, the actual ancestor folders of the workbook will be returned, which includes the home folder of the relevant user. Otherwise, if a workbook is shared, then only the ancestors that are shared will be returned. Requires admin privileges. (optional)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getWorkbookWithHeadersAndHttpInfo(String id, Boolean fullAncestry, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "fullAncestry", fullAncestry));
localVarHeaderParams.putAll(customHeaders);
return getWorkbookInternal(id, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getWorkbookInternal(String id, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required path parameter 'id' when calling getWorkbook");
}
// create path and map variables
String localVarPath = "/workbooks/{id}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Get a collection of workbooks
*
* @param userId The user ID to return workbooks for, defaults to the current user if not specified. Only an admin user is allowed to specify a user ID. (optional)
* @param isArchived True to filter results to only workbooks that have been archived, false to filter results to workbooks that are not archived. (optional, default to false)
* @param sortOrder A field by which to order the workbooks followed by a space and 'asc' or 'desc'. Field name can be one of: createdAt, updatedAt, name (optional, default to createdAt asc)
* @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
* @return WorkbookOutputListV1
* @throws ApiException if fails to make API call
*/
public WorkbookOutputListV1 getWorkbooks(String userId, Boolean isArchived, String sortOrder, Integer offset, Integer limit) throws ApiException {
ApiClient.ApiResponse localVarResponse = getWorkbooksWithHttpInfo(userId, isArchived, sortOrder, offset, limit);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a collection of workbooks
*
* @param userId The user ID to return workbooks for, defaults to the current user if not specified. Only an admin user is allowed to specify a user ID. (optional)
* @param isArchived True to filter results to only workbooks that have been archived, false to filter results to workbooks that are not archived. (optional, default to false)
* @param sortOrder A field by which to order the workbooks followed by a space and 'asc' or 'desc'. Field name can be one of: createdAt, updatedAt, name (optional, default to createdAt asc)
* @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getWorkbooksWithHttpInfo(String userId, Boolean isArchived, String sortOrder, Integer offset, Integer limit) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getWorkbooksWithHeadersAndHttpInfo(userId, isArchived, sortOrder, offset, limit, localVarHeaderParams);
}
/**
* Get a collection of workbooks
*
* @param userId The user ID to return workbooks for, defaults to the current user if not specified. Only an admin user is allowed to specify a user ID. (optional)
* @param isArchived True to filter results to only workbooks that have been archived, false to filter results to workbooks that are not archived. (optional, default to false)
* @param sortOrder A field by which to order the workbooks followed by a space and 'asc' or 'desc'. Field name can be one of: createdAt, updatedAt, name (optional, default to createdAt asc)
* @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getWorkbooksWithHeadersAndHttpInfo(String userId, Boolean isArchived, String sortOrder, Integer offset, Integer limit, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "userId", userId));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "isArchived", isArchived));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "sortOrder", sortOrder));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
localVarHeaderParams.putAll(customHeaders);
return getWorkbooksInternal(localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getWorkbooksInternal(List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/workbooks";
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Get a worksheet
*
* @param workbookId ID of the workbook for which to retrieve the worksheets (required)
* @param worksheetId ID of the worksheet to retrieve (required)
* @return WorksheetOutputV1
* @throws ApiException if fails to make API call
*/
public WorksheetOutputV1 getWorksheet(String workbookId, String worksheetId) throws ApiException {
ApiClient.ApiResponse localVarResponse = getWorksheetWithHttpInfo(workbookId, worksheetId);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a worksheet
*
* @param workbookId ID of the workbook for which to retrieve the worksheets (required)
* @param worksheetId ID of the worksheet to retrieve (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getWorksheetWithHttpInfo(String workbookId, String worksheetId) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getWorksheetWithHeadersAndHttpInfo(workbookId, worksheetId, localVarHeaderParams);
}
/**
* Get a worksheet
*
* @param workbookId ID of the workbook for which to retrieve the worksheets (required)
* @param worksheetId ID of the worksheet to retrieve (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getWorksheetWithHeadersAndHttpInfo(String workbookId, String worksheetId, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return getWorksheetInternal(workbookId, worksheetId, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getWorksheetInternal(String workbookId, String worksheetId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'workbookId' is set
if (workbookId == null) {
throw new ApiException(400, "Missing the required path parameter 'workbookId' when calling getWorksheet");
}
// verify the required path parameter 'worksheetId' is set
if (worksheetId == null) {
throw new ApiException(400, "Missing the required path parameter 'worksheetId' when calling getWorksheet");
}
// create path and map variables
String localVarPath = "/workbooks/{workbookId}/worksheets/{worksheetId}"
.replaceAll("\\{" + "workbookId" + "\\}", apiClient.escapeString(workbookId.toString()))
.replaceAll("\\{" + "worksheetId" + "\\}", apiClient.escapeString(worksheetId.toString()));
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Get a list of reports that reference a given worksheet
*
* @param workbookId The ID of the workbook for containing the worksheet (required)
* @param worksheetId The ID of the worksheet (required)
* @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
* @return AnnotationListOutputV1
* @throws ApiException if fails to make API call
*/
public AnnotationListOutputV1 getWorksheetUsages(String workbookId, String worksheetId, Integer offset, Integer limit) throws ApiException {
ApiClient.ApiResponse localVarResponse = getWorksheetUsagesWithHttpInfo(workbookId, worksheetId, offset, limit);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a list of reports that reference a given worksheet
*
* @param workbookId The ID of the workbook for containing the worksheet (required)
* @param worksheetId The ID of the worksheet (required)
* @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getWorksheetUsagesWithHttpInfo(String workbookId, String worksheetId, Integer offset, Integer limit) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getWorksheetUsagesWithHeadersAndHttpInfo(workbookId, worksheetId, offset, limit, localVarHeaderParams);
}
/**
* Get a list of reports that reference a given worksheet
*
* @param workbookId The ID of the workbook for containing the worksheet (required)
* @param worksheetId The ID of the worksheet (required)
* @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getWorksheetUsagesWithHeadersAndHttpInfo(String workbookId, String worksheetId, Integer offset, Integer limit, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
localVarHeaderParams.putAll(customHeaders);
return getWorksheetUsagesInternal(workbookId, worksheetId, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getWorksheetUsagesInternal(String workbookId, String worksheetId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'workbookId' is set
if (workbookId == null) {
throw new ApiException(400, "Missing the required path parameter 'workbookId' when calling getWorksheetUsages");
}
// verify the required path parameter 'worksheetId' is set
if (worksheetId == null) {
throw new ApiException(400, "Missing the required path parameter 'worksheetId' when calling getWorksheetUsages");
}
// create path and map variables
String localVarPath = "/workbooks/{workbookId}/worksheets/{worksheetId}/usages"
.replaceAll("\\{" + "workbookId" + "\\}", apiClient.escapeString(workbookId.toString()))
.replaceAll("\\{" + "worksheetId" + "\\}", apiClient.escapeString(worksheetId.toString()));
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Get a collection of worksheets
*
* @param workbookId The ID of the workbook for which to retrieve the worksheets (required)
* @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
* @param isArchived Whether to return archived worksheets (optional, default to false)
* @return WorksheetOutputListV1
* @throws ApiException if fails to make API call
*/
public WorksheetOutputListV1 getWorksheets(String workbookId, Integer offset, Integer limit, Boolean isArchived) throws ApiException {
ApiClient.ApiResponse localVarResponse = getWorksheetsWithHttpInfo(workbookId, offset, limit, isArchived);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a collection of worksheets
*
* @param workbookId The ID of the workbook for which to retrieve the worksheets (required)
* @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
* @param isArchived Whether to return archived worksheets (optional, default to false)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getWorksheetsWithHttpInfo(String workbookId, Integer offset, Integer limit, Boolean isArchived) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getWorksheetsWithHeadersAndHttpInfo(workbookId, offset, limit, isArchived, localVarHeaderParams);
}
/**
* Get a collection of worksheets
*
* @param workbookId The ID of the workbook for which to retrieve the worksheets (required)
* @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
* @param isArchived Whether to return archived worksheets (optional, default to false)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getWorksheetsWithHeadersAndHttpInfo(String workbookId, Integer offset, Integer limit, Boolean isArchived, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "isArchived", isArchived));
localVarHeaderParams.putAll(customHeaders);
return getWorksheetsInternal(workbookId, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getWorksheetsInternal(String workbookId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'workbookId' is set
if (workbookId == null) {
throw new ApiException(400, "Missing the required path parameter 'workbookId' when calling getWorksheets");
}
// create path and map variables
String localVarPath = "/workbooks/{workbookId}/worksheets"
.replaceAll("\\{" + "workbookId" + "\\}", apiClient.escapeString(workbookId.toString()));
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Get a workstep
*
* @param workbookId ID of the workbook for which to retrieve the worksteps (required)
* @param worksheetId ID of the worksheet for which to retrieve the worksteps (required)
* @param workstepId ID of the workstep to retrieve (required)
* @return WorkstepOutputV1
* @throws ApiException if fails to make API call
*/
public WorkstepOutputV1 getWorkstep(String workbookId, String worksheetId, String workstepId) throws ApiException {
ApiClient.ApiResponse localVarResponse = getWorkstepWithHttpInfo(workbookId, worksheetId, workstepId);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a workstep
*
* @param workbookId ID of the workbook for which to retrieve the worksteps (required)
* @param worksheetId ID of the worksheet for which to retrieve the worksteps (required)
* @param workstepId ID of the workstep to retrieve (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getWorkstepWithHttpInfo(String workbookId, String worksheetId, String workstepId) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getWorkstepWithHeadersAndHttpInfo(workbookId, worksheetId, workstepId, localVarHeaderParams);
}
/**
* Get a workstep
*
* @param workbookId ID of the workbook for which to retrieve the worksteps (required)
* @param worksheetId ID of the worksheet for which to retrieve the worksteps (required)
* @param workstepId ID of the workstep to retrieve (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getWorkstepWithHeadersAndHttpInfo(String workbookId, String worksheetId, String workstepId, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return getWorkstepInternal(workbookId, worksheetId, workstepId, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getWorkstepInternal(String workbookId, String worksheetId, String workstepId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'workbookId' is set
if (workbookId == null) {
throw new ApiException(400, "Missing the required path parameter 'workbookId' when calling getWorkstep");
}
// verify the required path parameter 'worksheetId' is set
if (worksheetId == null) {
throw new ApiException(400, "Missing the required path parameter 'worksheetId' when calling getWorkstep");
}
// verify the required path parameter 'workstepId' is set
if (workstepId == null) {
throw new ApiException(400, "Missing the required path parameter 'workstepId' when calling getWorkstep");
}
// create path and map variables
String localVarPath = "/workbooks/{workbookId}/worksheets/{worksheetId}/worksteps/{workstepId}"
.replaceAll("\\{" + "workbookId" + "\\}", apiClient.escapeString(workbookId.toString()))
.replaceAll("\\{" + "worksheetId" + "\\}", apiClient.escapeString(worksheetId.toString()))
.replaceAll("\\{" + "workstepId" + "\\}", apiClient.escapeString(workstepId.toString()));
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Move a Worksheet to a new location in the same Workbook
*
* @param workbookId ID of the workbook on which the worksheet exists (required)
* @param worksheetId ID of the worksheet on which the workstep exists (required)
* @param nextWorksheetId ID of the worksheet that the specified worksheet should precede. If not supplied then the worksheet will be moved to be the last worksheet in the workbook. (optional)
* @return WorksheetOutputV1
* @throws ApiException if fails to make API call
*/
public WorksheetOutputV1 moveWorksheet(String workbookId, String worksheetId, String nextWorksheetId) throws ApiException {
ApiClient.ApiResponse localVarResponse = moveWorksheetWithHttpInfo(workbookId, worksheetId, nextWorksheetId);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Move a Worksheet to a new location in the same Workbook
*
* @param workbookId ID of the workbook on which the worksheet exists (required)
* @param worksheetId ID of the worksheet on which the workstep exists (required)
* @param nextWorksheetId ID of the worksheet that the specified worksheet should precede. If not supplied then the worksheet will be moved to be the last worksheet in the workbook. (optional)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse moveWorksheetWithHttpInfo(String workbookId, String worksheetId, String nextWorksheetId) throws ApiException {
Map localVarHeaderParams = new HashMap();
return moveWorksheetWithHeadersAndHttpInfo(workbookId, worksheetId, nextWorksheetId, localVarHeaderParams);
}
/**
* Move a Worksheet to a new location in the same Workbook
*
* @param workbookId ID of the workbook on which the worksheet exists (required)
* @param worksheetId ID of the worksheet on which the workstep exists (required)
* @param nextWorksheetId ID of the worksheet that the specified worksheet should precede. If not supplied then the worksheet will be moved to be the last worksheet in the workbook. (optional)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse moveWorksheetWithHeadersAndHttpInfo(String workbookId, String worksheetId, String nextWorksheetId, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "nextWorksheetId", nextWorksheetId));
localVarHeaderParams.putAll(customHeaders);
return moveWorksheetInternal(workbookId, worksheetId, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse moveWorksheetInternal(String workbookId, String worksheetId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'workbookId' is set
if (workbookId == null) {
throw new ApiException(400, "Missing the required path parameter 'workbookId' when calling moveWorksheet");
}
// verify the required path parameter 'worksheetId' is set
if (worksheetId == null) {
throw new ApiException(400, "Missing the required path parameter 'worksheetId' when calling moveWorksheet");
}
// create path and map variables
String localVarPath = "/workbooks/{workbookId}/worksheets/{worksheetId}/next"
.replaceAll("\\{" + "workbookId" + "\\}", apiClient.escapeString(workbookId.toString()))
.replaceAll("\\{" + "worksheetId" + "\\}", apiClient.escapeString(worksheetId.toString()));
// query params
Map