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

factset.analyticsapi.engines.api.PubCalculationsApi Maven / Gradle / Ivy

There is a newer version: 6.0.0
Show newest version

package factset.analyticsapi.engines.api;

import factset.analyticsapi.engines.ApiException;
import factset.analyticsapi.engines.ApiClient;
import factset.analyticsapi.engines.ApiResponse;
import factset.analyticsapi.engines.Configuration;
import factset.analyticsapi.engines.Pair;

import javax.ws.rs.core.GenericType;

import java.util.HashMap;
import java.util.Map;

import java.io.File;

import factset.analyticsapi.engines.models.CalculationStatusRoot;
import factset.analyticsapi.engines.models.ClientErrorResponse;
import java.io.File;
import factset.analyticsapi.engines.models.PubCalculationParametersRoot;

@javax.annotation.Generated(value = "CustomJavaClientCodegen")
public class PubCalculationsApi {
  private ApiClient apiClient;
  public PubCalculationsApi() {
    this(Configuration.getDefaultApiClient());
  }

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

  /**
   * Get the API cilent
   *
   * @return API client
   */
  public ApiClient getApiClient() {
    return apiClient;
  }

  /**
   * Set the API cilent
   *
   * @param apiClient an instance of API client
   */
  public void setApiClient(ApiClient apiClient) {
    this.apiClient = apiClient;
  }

  /**
   * Cancel Pub calculation by id
   * This is the endpoint to cancel a previously submitted calculation.
   * @param id from url, provided from the location header in the Create and Run Pub calculation endpoint (required)
   * @throws ApiException if fails to make API call
   * @http.response.details
     
Status Code Description Response Headers
204 Expected response, calculation was canceled successfully. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
400 Invalid identifier provided. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
404 There was no request for the calculation identifier provided, or the request was already canceled for the provided identifier. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
401 Missing or invalid authentication. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
403 User is forbidden with current credentials * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
500 Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
503 Request timed out. Retry the request in sometime. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
*/ public void cancelCalculationById(String id) throws ApiException { cancelCalculationByIdWithHttpInfo(id); } /** * Cancel Pub calculation by id * This is the endpoint to cancel a previously submitted calculation. * @param id from url, provided from the location header in the Create and Run Pub calculation endpoint (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
204 Expected response, calculation was canceled successfully. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
400 Invalid identifier provided. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
404 There was no request for the calculation identifier provided, or the request was already canceled for the provided identifier. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
401 Missing or invalid authentication. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
403 User is forbidden with current credentials * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
500 Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
503 Request timed out. Retry the request in sometime. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
*/ public ApiResponse cancelCalculationByIdWithHttpInfo(String id) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'id' is set if (id == null) { throw new ApiException(400, "Missing the required parameter 'id' when calling cancelCalculationById"); } // create path and map variables String localVarPath = "/analytics/engines/pub/v3/calculations/{id}" .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); // query params java.util.List localVarQueryParams = new java.util.ArrayList(); java.util.Map localVarHeaderParams = new java.util.HashMap(); java.util.Map localVarCookieParams = new java.util.HashMap(); java.util.Map localVarFormParams = new java.util.HashMap(); final String[] localVarAccepts = { "text/plain", "application/json", "text/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "Basic", "Bearer" }; Map returnTypeMap = new HashMap(); returnTypeMap.put(400, new GenericType(){}); returnTypeMap.put(404, new GenericType(){}); return apiClient.invokeAPIWithReturnMap("PubCalculationsApi.cancelCalculationById", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, returnTypeMap, false); } /** * Get Pub calculation parameters by id * This is the endpoint that returns the calculation parameters passed for a calculation. * @param id from url, provided from the location header in the Create and Run Pub calculation endpoint (required) @return PubCalculationParametersRoot * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Expected response, returns the Pub calculation parameters. * Content-Encoding - Standard HTTP header. Header value based on Accept-Encoding Request header.
* Content-Type - Standard HTTP header.
* Transfer-Encoding - Standard HTTP header. Header value will be set to Chunked if Accept-Encoding header is specified.
* X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
400 Invalid identifier provided. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
404 Calculation id not found * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
401 Missing or invalid authentication. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
403 User is forbidden with current credentials * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
500 Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
503 Request timed out. Retry the request in sometime. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
*/ public PubCalculationParametersRoot getCalculationParameters(String id) throws ApiException { return getCalculationParametersWithHttpInfo(id).getData(); } /** * Get Pub calculation parameters by id * This is the endpoint that returns the calculation parameters passed for a calculation. * @param id from url, provided from the location header in the Create and Run Pub calculation endpoint (required) * @return ApiResponse<PubCalculationParametersRoot> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Expected response, returns the Pub calculation parameters. * Content-Encoding - Standard HTTP header. Header value based on Accept-Encoding Request header.
* Content-Type - Standard HTTP header.
* Transfer-Encoding - Standard HTTP header. Header value will be set to Chunked if Accept-Encoding header is specified.
* X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
400 Invalid identifier provided. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
404 Calculation id not found * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
401 Missing or invalid authentication. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
403 User is forbidden with current credentials * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
500 Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
503 Request timed out. Retry the request in sometime. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
*/ public ApiResponse getCalculationParametersWithHttpInfo(String id) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'id' is set if (id == null) { throw new ApiException(400, "Missing the required parameter 'id' when calling getCalculationParameters"); } // create path and map variables String localVarPath = "/analytics/engines/pub/v3/calculations/{id}" .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); // query params java.util.List localVarQueryParams = new java.util.ArrayList(); java.util.Map localVarHeaderParams = new java.util.HashMap(); java.util.Map localVarCookieParams = new java.util.HashMap(); java.util.Map localVarFormParams = new java.util.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[] { "Basic", "Bearer" }; GenericType localVarReturnType = new GenericType() {}; Map returnTypeMap = new HashMap(); returnTypeMap.put(200, new GenericType(){}); returnTypeMap.put(400, new GenericType(){}); returnTypeMap.put(404, new GenericType(){}); return apiClient.invokeAPIWithReturnMap("PubCalculationsApi.getCalculationParameters", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, returnTypeMap, false); } /** * Get Pub calculation status by id * This is the endpoint to check on the progress of a previously requested calculation. If the calculation has finished computing, the location header will point to the result url. * @param id from url, provided from the location header in the Create and Run Pub calculation endpoint (required) @return CalculationStatusRoot * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Expected response once calculation is completed. * Content-Encoding - Standard HTTP header. Header value based on Accept-Encoding Request header.
* Content-Type - Standard HTTP header.
* Transfer-Encoding - Standard HTTP header. Header value will be set to Chunked if Accept-Encoding header is specified.
* X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
202 Expected response returned if the calculation is not yet completed. * X-FactSet-Api-PickUp-Progress - FactSet's progress header.
* Cache-Control - Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value.
* X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
400 Invalid identifier provided. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
404 Calculation was already returned, provided id was not a requested calculation, or the calculation was cancelled * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
401 Missing or invalid authentication. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
403 User is forbidden with current credentials * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
500 Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
503 Request timed out. Retry the request in sometime. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
*/ public CalculationStatusRoot getCalculationStatusById(String id) throws ApiException { return getCalculationStatusByIdWithHttpInfo(id).getData(); } /** * Get Pub calculation status by id * This is the endpoint to check on the progress of a previously requested calculation. If the calculation has finished computing, the location header will point to the result url. * @param id from url, provided from the location header in the Create and Run Pub calculation endpoint (required) * @return ApiResponse<CalculationStatusRoot> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Expected response once calculation is completed. * Content-Encoding - Standard HTTP header. Header value based on Accept-Encoding Request header.
* Content-Type - Standard HTTP header.
* Transfer-Encoding - Standard HTTP header. Header value will be set to Chunked if Accept-Encoding header is specified.
* X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
202 Expected response returned if the calculation is not yet completed. * X-FactSet-Api-PickUp-Progress - FactSet's progress header.
* Cache-Control - Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value.
* X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
400 Invalid identifier provided. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
404 Calculation was already returned, provided id was not a requested calculation, or the calculation was cancelled * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
401 Missing or invalid authentication. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
403 User is forbidden with current credentials * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
500 Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
503 Request timed out. Retry the request in sometime. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
*/ public ApiResponse getCalculationStatusByIdWithHttpInfo(String id) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'id' is set if (id == null) { throw new ApiException(400, "Missing the required parameter 'id' when calling getCalculationStatusById"); } // create path and map variables String localVarPath = "/analytics/engines/pub/v3/calculations/{id}/status" .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); // query params java.util.List localVarQueryParams = new java.util.ArrayList(); java.util.Map localVarHeaderParams = new java.util.HashMap(); java.util.Map localVarCookieParams = new java.util.HashMap(); java.util.Map localVarFormParams = new java.util.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[] { "Basic", "Bearer" }; GenericType localVarReturnType = new GenericType() {}; Map returnTypeMap = new HashMap(); returnTypeMap.put(200, new GenericType(){}); returnTypeMap.put(202, new GenericType(){}); returnTypeMap.put(400, new GenericType(){}); returnTypeMap.put(404, new GenericType(){}); return apiClient.invokeAPIWithReturnMap("PubCalculationsApi.getCalculationStatusById", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, returnTypeMap, false); } /** * Get Pub calculation result by id * This is the endpoint to get the result of a previously requested calculation. If the calculation has finished computing, the body of the response will contain the requested document in the specified format. * @param id from url, provided from the location header in the Get Pub calculation status by id endpoint (required) * @param unitId from url, provided from the location header in the Get Pub calculation status by id endpoint (required) @return File * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Expected response once calculation is completed, returns result in the format specified in the Calculation parameters. * Content-Encoding - Standard HTTP header. Header value based on Accept-Encoding Request header.
* Content-Type - Standard HTTP header.
* Transfer-Encoding - Standard HTTP header. Header value will be set to Chunked if Accept-Encoding header is specified.
* X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
400 Invalid identifier provided. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
404 Calculation was already returned, provided id was not a requested calculation, or the calculation was cancelled * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
401 Missing or invalid authentication. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
403 User is forbidden with current credentials * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
500 Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
503 Request timed out. Retry the request in sometime. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
*/ public File getCalculationUnitResultById(String id, String unitId) throws ApiException { return getCalculationUnitResultByIdWithHttpInfo(id, unitId).getData(); } /** * Get Pub calculation result by id * This is the endpoint to get the result of a previously requested calculation. If the calculation has finished computing, the body of the response will contain the requested document in the specified format. * @param id from url, provided from the location header in the Get Pub calculation status by id endpoint (required) * @param unitId from url, provided from the location header in the Get Pub calculation status by id endpoint (required) * @return ApiResponse<File> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Expected response once calculation is completed, returns result in the format specified in the Calculation parameters. * Content-Encoding - Standard HTTP header. Header value based on Accept-Encoding Request header.
* Content-Type - Standard HTTP header.
* Transfer-Encoding - Standard HTTP header. Header value will be set to Chunked if Accept-Encoding header is specified.
* X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
400 Invalid identifier provided. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
404 Calculation was already returned, provided id was not a requested calculation, or the calculation was cancelled * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
401 Missing or invalid authentication. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
403 User is forbidden with current credentials * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
500 Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
503 Request timed out. Retry the request in sometime. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
*/ public ApiResponse getCalculationUnitResultByIdWithHttpInfo(String id, String unitId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'id' is set if (id == null) { throw new ApiException(400, "Missing the required parameter 'id' when calling getCalculationUnitResultById"); } // verify the required parameter 'unitId' is set if (unitId == null) { throw new ApiException(400, "Missing the required parameter 'unitId' when calling getCalculationUnitResultById"); } // create path and map variables String localVarPath = "/analytics/engines/pub/v3/calculations/{id}/units/{unitId}/result" .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())) .replaceAll("\\{" + "unitId" + "\\}", apiClient.escapeString(unitId.toString())); // query params java.util.List localVarQueryParams = new java.util.ArrayList(); java.util.Map localVarHeaderParams = new java.util.HashMap(); java.util.Map localVarCookieParams = new java.util.HashMap(); java.util.Map localVarFormParams = new java.util.HashMap(); final String[] localVarAccepts = { "application/json", "application/x-protobuf", "application/pdf" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "Basic", "Bearer" }; GenericType localVarReturnType = new GenericType() {}; Map returnTypeMap = new HashMap(); returnTypeMap.put(200, new GenericType(){}); returnTypeMap.put(400, new GenericType(){}); returnTypeMap.put(404, new GenericType(){}); return apiClient.invokeAPIWithReturnMap("PubCalculationsApi.getCalculationUnitResultById", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, returnTypeMap, false); } /** * Create and Run Pub calculation * This endpoint runs the Pub calculation specified in the POST body parameters. It can take one or more units as input. * @param xFactSetApiLongRunningDeadline Long running deadline in seconds when only one unit is passed in the POST body. (optional) * @param cacheControl Standard HTTP header. Accepts max-stale. (optional) * @param pubCalculationParametersRoot Calculation Parameters (optional) @return (For 202 status - CalculationStatusRoot)(For 200 status - CalculationStatusRoot)(For 201 status - File) * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
202 Expected response, contains the poll URL in the Location header. * Location - URL to poll for the resulting calculation
* X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
200 Expected response, if the calculation has one unit and is completed with an error. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
201 Expected response if the calculation has one unit and is completed in a short span, returns JSON in the format specified in the Calculation parameters. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
400 Invalid calculation parameters. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
404 One or more calculation settings were unavailable. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
401 Missing or invalid authentication. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
403 User is forbidden with current credentials * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
415 Missing/Invalid Content-Type header. Header needs to be set to application/json. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
429 Rate limit reached. Cancel older requests using Cancel Calculation endpoint or wait for older requests to finish/expire. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
* Retry-After - Time to wait in seconds before making a new request as the rate limit has reached.
500 Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
503 Request timed out. Retry the request in sometime. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
*/ public Object postAndCalculate(Integer xFactSetApiLongRunningDeadline, String cacheControl, PubCalculationParametersRoot pubCalculationParametersRoot) throws ApiException { return postAndCalculateWithHttpInfo(xFactSetApiLongRunningDeadline, cacheControl, pubCalculationParametersRoot).getData(); } /** * Create and Run Pub calculation * This endpoint runs the Pub calculation specified in the POST body parameters. It can take one or more units as input. * @param xFactSetApiLongRunningDeadline Long running deadline in seconds when only one unit is passed in the POST body. (optional) * @param cacheControl Standard HTTP header. Accepts max-stale. (optional) * @param pubCalculationParametersRoot Calculation Parameters (optional) * @return ApiResponse<Object>(For 202 status - CalculationStatusRoot)(For 200 status - CalculationStatusRoot)(For 201 status - File) * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
202 Expected response, contains the poll URL in the Location header. * Location - URL to poll for the resulting calculation
* X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
200 Expected response, if the calculation has one unit and is completed with an error. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
201 Expected response if the calculation has one unit and is completed in a short span, returns JSON in the format specified in the Calculation parameters. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
400 Invalid calculation parameters. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
404 One or more calculation settings were unavailable. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
401 Missing or invalid authentication. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
403 User is forbidden with current credentials * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
415 Missing/Invalid Content-Type header. Header needs to be set to application/json. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
429 Rate limit reached. Cancel older requests using Cancel Calculation endpoint or wait for older requests to finish/expire. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
* Retry-After - Time to wait in seconds before making a new request as the rate limit has reached.
500 Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
503 Request timed out. Retry the request in sometime. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
*/ public ApiResponse postAndCalculateWithHttpInfo(Integer xFactSetApiLongRunningDeadline, String cacheControl, PubCalculationParametersRoot pubCalculationParametersRoot) throws ApiException { Object localVarPostBody = pubCalculationParametersRoot; // create path and map variables String localVarPath = "/analytics/engines/pub/v3/calculations"; // query params java.util.List localVarQueryParams = new java.util.ArrayList(); java.util.Map localVarHeaderParams = new java.util.HashMap(); java.util.Map localVarCookieParams = new java.util.HashMap(); java.util.Map localVarFormParams = new java.util.HashMap(); if (xFactSetApiLongRunningDeadline != null) localVarHeaderParams.put("X-FactSet-Api-Long-Running-Deadline", apiClient.parameterToString(xFactSetApiLongRunningDeadline)); if (cacheControl != null) localVarHeaderParams.put("Cache-Control", apiClient.parameterToString(cacheControl)); final String[] localVarAccepts = { "application/pdf", "application/vnd.openxmlformats-officedocument.presentationml.presentation" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "Basic", "Bearer" }; GenericType localVarReturnType = new GenericType() {}; Map returnTypeMap = new HashMap(); returnTypeMap.put(202, new GenericType(){}); returnTypeMap.put(200, new GenericType(){}); returnTypeMap.put(201, new GenericType(){}); returnTypeMap.put(400, new GenericType(){}); returnTypeMap.put(404, new GenericType(){}); return apiClient.invokeAPIWithReturnMap("PubCalculationsApi.postAndCalculate", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, returnTypeMap, false); } /** * Create or Update Pub calculation and run it. * This endpoint updates and run the Pub calculation specified in the PUT body parameters. This also allows creating new Pub calculations with custom ids. It can take one or more units as input. Remarks: * Start and and end date must be within the configuration's min and max date range * @param id from url, provided from the location header in the Create and Run Pub calculation endpoint (required) * @param xFactSetApiLongRunningDeadline Long running deadline in seconds when only one unit is passed in the PUT body. (optional) * @param cacheControl Standard HTTP header. Accepts max-stale. (optional) * @param pubCalculationParametersRoot Calculation Parameters (optional) @return (For 202 status - CalculationStatusRoot)(For 200 status - CalculationStatusRoot)(For 201 status - File) * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
202 Expected response, contains the poll URL in the Location header. * Location - URL to poll for the resulting calculation
* X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
200 Expected response, if the calculation has one unit and is completed with an error. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
201 Expected response if the calculation has one unit and is completed in a short span, returns JSON in the format specified in the Calculation parameters. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
400 Invalid Calculation Parameters. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
404 One or more calculation settings were unavailable. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
409 Duplicate calculation exists with same parameters. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
401 Missing or invalid authentication. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
403 User is forbidden with current credentials * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
415 Missing/Invalid Content-Type header. Header needs to be set to application/json. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
429 Rate limit reached. Cancel older requests using Cancel Calculation endpoint or wait for older requests to finish/expire. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
* Retry-After - Time to wait in seconds before making a new request as the rate limit has reached.
500 Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
503 Request timed out. Retry the request in sometime. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
*/ public Object putAndCalculate(String id, Integer xFactSetApiLongRunningDeadline, String cacheControl, PubCalculationParametersRoot pubCalculationParametersRoot) throws ApiException { return putAndCalculateWithHttpInfo(id, xFactSetApiLongRunningDeadline, cacheControl, pubCalculationParametersRoot).getData(); } /** * Create or Update Pub calculation and run it. * This endpoint updates and run the Pub calculation specified in the PUT body parameters. This also allows creating new Pub calculations with custom ids. It can take one or more units as input. Remarks: * Start and and end date must be within the configuration's min and max date range * @param id from url, provided from the location header in the Create and Run Pub calculation endpoint (required) * @param xFactSetApiLongRunningDeadline Long running deadline in seconds when only one unit is passed in the PUT body. (optional) * @param cacheControl Standard HTTP header. Accepts max-stale. (optional) * @param pubCalculationParametersRoot Calculation Parameters (optional) * @return ApiResponse<Object>(For 202 status - CalculationStatusRoot)(For 200 status - CalculationStatusRoot)(For 201 status - File) * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
202 Expected response, contains the poll URL in the Location header. * Location - URL to poll for the resulting calculation
* X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
200 Expected response, if the calculation has one unit and is completed with an error. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
201 Expected response if the calculation has one unit and is completed in a short span, returns JSON in the format specified in the Calculation parameters. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
400 Invalid Calculation Parameters. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
404 One or more calculation settings were unavailable. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
409 Duplicate calculation exists with same parameters. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
401 Missing or invalid authentication. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
403 User is forbidden with current credentials * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
415 Missing/Invalid Content-Type header. Header needs to be set to application/json. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
429 Rate limit reached. Cancel older requests using Cancel Calculation endpoint or wait for older requests to finish/expire. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
* X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window.
* X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window.
* X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets.
* Retry-After - Time to wait in seconds before making a new request as the rate limit has reached.
500 Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
503 Request timed out. Retry the request in sometime. * X-DataDirect-Request-Key - FactSet's request key header.
* X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication.
* X-FactSet-Api-Calculations-Limit - Maximum FI request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached.
*/ public ApiResponse putAndCalculateWithHttpInfo(String id, Integer xFactSetApiLongRunningDeadline, String cacheControl, PubCalculationParametersRoot pubCalculationParametersRoot) throws ApiException { Object localVarPostBody = pubCalculationParametersRoot; // verify the required parameter 'id' is set if (id == null) { throw new ApiException(400, "Missing the required parameter 'id' when calling putAndCalculate"); } // create path and map variables String localVarPath = "/analytics/engines/pub/v3/calculations/{id}" .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); // query params java.util.List localVarQueryParams = new java.util.ArrayList(); java.util.Map localVarHeaderParams = new java.util.HashMap(); java.util.Map localVarCookieParams = new java.util.HashMap(); java.util.Map localVarFormParams = new java.util.HashMap(); if (xFactSetApiLongRunningDeadline != null) localVarHeaderParams.put("X-FactSet-Api-Long-Running-Deadline", apiClient.parameterToString(xFactSetApiLongRunningDeadline)); if (cacheControl != null) localVarHeaderParams.put("Cache-Control", apiClient.parameterToString(cacheControl)); final String[] localVarAccepts = { "application/pdf" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "Basic", "Bearer" }; GenericType localVarReturnType = new GenericType() {}; Map returnTypeMap = new HashMap(); returnTypeMap.put(202, new GenericType(){}); returnTypeMap.put(200, new GenericType(){}); returnTypeMap.put(201, new GenericType(){}); returnTypeMap.put(400, new GenericType(){}); returnTypeMap.put(404, new GenericType(){}); returnTypeMap.put(409, new GenericType(){}); return apiClient.invokeAPIWithReturnMap("PubCalculationsApi.putAndCalculate", localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, returnTypeMap, false); } }