Description Format Methods Public fields Methods Examples
factset.analyticsapi.engines.Calculations
An R6Class
generator object
CancelCalculationById Cancel calculation by id This is the endpoint to cancel a previously submitted calculation request. Instead of doing a GET on the getCalculationById URL, cancel the calculation by doing a DELETE. All individual calculation units within the calculation will be canceled if they have not already finished.
@param id character
On encountering errors, an error of subclass ApiException will be thrown.
status code : 204 | Expected response, request was cancelled successfully.
response headers :
X-RateLimit-Remaining | Number of requests left for the time window. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 400 | Invalid identifier provided.
response headers :
X-RateLimit-Remaining | Number of requests left for the time window. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 401 | Missing or invalid authentication.
response headers :
X-RateLimit-Remaining | Number of requests left for the time window. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 403 | User is forbidden with current credentials.
response headers :
X-RateLimit-Remaining | Number of requests left for the time window. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 404 | There was no request for the identifier provided, or the request was already canceled for the provided identifier.
response headers :
X-RateLimit-Remaining | Number of requests left for the time window. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 500 | Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting.
response headers :
X-RateLimit-Remaining | Number of requests left for the time window. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 503 | Request timed out. Retry the request in sometime.
response headers :
X-RateLimit-Remaining | Number of requests left for the time window. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
X-DataDirect-Request-Key | FactSet's request key header. |
GetCalculationStatusById Get calculation status by id This is the endpoint to check on the progress of a previous calculation request. Response body contains status information of the entire request and each individual calculation unit.
@param id character
@returnType CalculationStatus
On encountering errors, an error of subclass ApiException will be thrown.
status code : 200 | Expected response, returns status information of the entire calculation and each individual calculation unit.
return type : CalculationStatus
response headers :
X-RateLimit-Remaining | Number of requests left for the time window. |
Cache-Control | Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 400 | Invalid identifier provided.
response headers :
X-RateLimit-Remaining | Number of requests left for the time window. |
Cache-Control | Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 401 | Missing or invalid authentication.
response headers :
X-RateLimit-Remaining | Number of requests left for the time window. |
Cache-Control | Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 403 | User is forbidden with current credentials.
response headers :
X-RateLimit-Remaining | Number of requests left for the time window. |
Cache-Control | Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 404 | Provided identifier was not a request, or the request was cancelled.
response headers :
X-RateLimit-Remaining | Number of requests left for the time window. |
Cache-Control | Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 406 | Unsupported Accept header. Header needs to be set to application/json.
response headers :
X-RateLimit-Remaining | Number of requests left for the time window. |
Cache-Control | Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 500 | Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting.
response headers :
X-RateLimit-Remaining | Number of requests left for the time window. |
Cache-Control | Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 503 | Request timed out. Retry the request in sometime.
response headers :
X-RateLimit-Remaining | Number of requests left for the time window. |
Cache-Control | Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
X-DataDirect-Request-Key | FactSet's request key header. |
GetCalculationStatusSummaries Get all calculation statuses This endpoints returns all active calculation requests.
@returnType named list( CalculationStatusSummary )
On encountering errors, an error of subclass ApiException will be thrown.
status code : 200 | List of active calculation requests.
return type : map(CalculationStatusSummary)
response headers :
X-RateLimit-Remaining | Number of requests left for the time window. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 401 | Missing or invalid authentication.
response headers :
X-RateLimit-Remaining | Number of requests left for the time window. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 403 | User is forbidden with current credentials.
response headers :
X-RateLimit-Remaining | Number of requests left for the time window. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 406 | Unsupported Accept header. Header needs to be set to application/json.
response headers :
X-RateLimit-Remaining | Number of requests left for the time window. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 500 | Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting.
response headers :
X-RateLimit-Remaining | Number of requests left for the time window. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 503 | Request timed out. Retry the request in sometime.
response headers :
X-RateLimit-Remaining | Number of requests left for the time window. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
X-DataDirect-Request-Key | FactSet's request key header. |
RunCalculation Run calculation This endpoint creates a new calculation and runs the set of calculation units specified in the POST body. This must be used first before get status or cancelling endpoints with a calculation id. A successful response will contain the URL to check the status of the calculation request. Remarks: * Maximum 25 points allowed per calculation and maximum 500 points allowed across all simultaneous calculations. (Refer API documentation for more information) * Any settings in POST body will act as a one-time override over the settings saved in the PA/SPAR/Vault template.
@param calculation Calculation
On encountering errors, an error of subclass ApiException will be thrown.
status code : 202 | Expected response, contains the URL in the Location header to check the status of the calculation.
response headers :
X-FactSet-Api-Points-Limit | Maximum points limit across all batches. |
X-RateLimit-Remaining | Number of requests left for the time window. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-FactSet-Api-Points-Remaining | Number of points remaining till points limit reached. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
Location | URL to check status of the request. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 400 | Invalid POST body.
response headers :
X-FactSet-Api-Points-Limit | Maximum points limit across all batches. |
X-RateLimit-Remaining | Number of requests left for the time window. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-FactSet-Api-Points-Remaining | Number of points remaining till points limit reached. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
Location | URL to check status of the request. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 401 | Missing or invalid authentication.
response headers :
X-FactSet-Api-Points-Limit | Maximum points limit across all batches. |
X-RateLimit-Remaining | Number of requests left for the time window. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-FactSet-Api-Points-Remaining | Number of points remaining till points limit reached. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
Location | URL to check status of the request. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 403 | User is forbidden with current credentials.
response headers :
X-FactSet-Api-Points-Limit | Maximum points limit across all batches. |
X-RateLimit-Remaining | Number of requests left for the time window. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-FactSet-Api-Points-Remaining | Number of points remaining till points limit reached. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
Location | URL to check status of the request. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 415 | Missing/Invalid Content-Type header. Header needs to be set to application/json.
response headers :
X-FactSet-Api-Points-Limit | Maximum points limit across all batches. |
X-RateLimit-Remaining | Number of requests left for the time window. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-FactSet-Api-Points-Remaining | Number of points remaining till points limit reached. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
Location | URL to check status of the request. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 429 | Rate limit reached. Cancel older requests using Cancel Calculation endpoint or wait for older requests to finish / expire.
response headers :
X-FactSet-Api-Points-Limit | Maximum points limit across all batches. |
X-RateLimit-Remaining | Number of requests left for the time window. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-FactSet-Api-Points-Remaining | Number of points remaining till points limit reached. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
Location | URL to check status of the request. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 500 | Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting.
response headers :
X-FactSet-Api-Points-Limit | Maximum points limit across all batches. |
X-RateLimit-Remaining | Number of requests left for the time window. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-FactSet-Api-Points-Remaining | Number of points remaining till points limit reached. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
Location | URL to check status of the request. |
X-DataDirect-Request-Key | FactSet's request key header. |
status code : 503 | Request timed out. Retry the request in sometime.
response headers :
X-FactSet-Api-Points-Limit | Maximum points limit across all batches. |
X-RateLimit-Remaining | Number of requests left for the time window. |
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-FactSet-Api-Points-Remaining | Number of points remaining till points limit reached. |
X-RateLimit-Reset | Number of seconds remaining till rate limit resets. |
X-RateLimit-Limit | Number of allowed requests for the time window. |
Location | URL to check status of the request. |
X-DataDirect-Request-Key | FactSet's request key header. |
apiClient
Handles the client-server communication.
new()
CalculationsApi$new(apiClient)
CancelCalculationById()
CalculationsApi$CancelCalculationById(id, ...)
CancelCalculationByIdWithHttpInfo()
CalculationsApi$CancelCalculationByIdWithHttpInfo(id, ...)
GetCalculationStatusById()
CalculationsApi$GetCalculationStatusById(id, ...)
GetCalculationStatusByIdWithHttpInfo()
CalculationsApi$GetCalculationStatusByIdWithHttpInfo(id, ...)
GetCalculationStatusSummaries()
CalculationsApi$GetCalculationStatusSummaries(...)
GetCalculationStatusSummariesWithHttpInfo()
CalculationsApi$GetCalculationStatusSummariesWithHttpInfo(...)
RunCalculation()
CalculationsApi$RunCalculation(calculation = NULL, ...)
RunCalculationWithHttpInfo()
CalculationsApi$RunCalculationWithHttpInfo(calculation = NULL, ...)
clone()
The objects of this class are cloneable with this method.
CalculationsApi$clone(deep = FALSE)
deep
Whether to make a deep clone.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | ## Not run:
#################### CancelCalculationById ####################
library(factset.analyticsapi.engines)
var.id <- 'id_example' # character | From url, provided from the location
# header in the Run Multiple Calculations endpoint.
#Cancel calculation by id
api.instance <- CalculationsApi$new()
#Configure HTTP basic authorization: Basic
# provide your username in the user-serial format
api.instance$apiClient$username <- '<user-serial>';
# provide your api key generated using the developer portal
api.instance$apiClient$password <- '<api_key>';
result <- tryCatch(
api.instance$CancelCalculationById(var.id),
ApiException = function(ex) ex
)
# In case of error, print the error object
if(!is.null(result$ApiException)) {
cat(result$ApiException$toString())
} else {
# response headers
response.headers <- result$response$headers
# response status code
response.status.code <- result$response$status_code
}
#################### GetCalculationStatusById ####################
library(factset.analyticsapi.engines)
var.id <- 'id_example' # character | From url, provided from the location
# header in the Run Multiple Calculations endpoint.
#Get calculation status by id
api.instance <- CalculationsApi$new()
#Configure HTTP basic authorization: Basic
# provide your username in the user-serial format
api.instance$apiClient$username <- '<user-serial>';
# provide your api key generated using the developer portal
api.instance$apiClient$password <- '<api_key>';
result <- tryCatch(
api.instance$GetCalculationStatusById(var.id),
ApiException = function(ex) ex
)
# In case of error, print the error object
if(!is.null(result$ApiException)) {
cat(result$ApiException$toString())
} else {
# deserialized response object
response.object <- result$content
# response headers
response.headers <- result$response$headers
# response status code
response.status.code <- result$response$status_code
}
#################### GetCalculationStatusSummaries ####################
library(factset.analyticsapi.engines)
#Get all calculation statuses
api.instance <- CalculationsApi$new()
#Configure HTTP basic authorization: Basic
# provide your username in the user-serial format
api.instance$apiClient$username <- '<user-serial>';
# provide your api key generated using the developer portal
api.instance$apiClient$password <- '<api_key>';
result <- tryCatch(
api.instance$GetCalculationStatusSummaries(),
ApiException = function(ex) ex
)
# In case of error, print the error object
if(!is.null(result$ApiException)) {
cat(result$ApiException$toString())
} else {
# deserialized response object
response.object <- result$content
# response headers
response.headers <- result$response$headers
# response status code
response.status.code <- result$response$status_code
}
#################### RunCalculation ####################
library(factset.analyticsapi.engines)
var.calculation <- Calculation$new() # Calculation |
#Run calculation
api.instance <- CalculationsApi$new()
#Configure HTTP basic authorization: Basic
# provide your username in the user-serial format
api.instance$apiClient$username <- '<user-serial>';
# provide your api key generated using the developer portal
api.instance$apiClient$password <- '<api_key>';
result <- tryCatch(
api.instance$RunCalculation(calculation=var.calculation),
ApiException = function(ex) ex
)
# In case of error, print the error object
if(!is.null(result$ApiException)) {
cat(result$ApiException$toString())
} else {
# response headers
response.headers <- result$response$headers
# response status code
response.status.code <- result$response$status_code
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.