All URIs are relative to https://api.factset.com
| Method | HTTP request | Description |
|---|---|---|
| cancel_calculation_by_id | DELETE /analytics/engines/v2/calculations/{id} | Cancel calculation by id |
| get_calculation_status_by_id | GET /analytics/engines/v2/calculations/{id} | Get calculation status by id |
| get_calculation_status_summaries | GET /analytics/engines/v2/calculations | Get all calculation statuses |
| run_calculation | POST /analytics/engines/v2/calculations | Run calculation |
cancel_calculation_by_id(id)
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.
- Basic Authentication (Basic):
from __future__ import print_function
import time
import fds.analyticsapi.engines
from fds.analyticsapi.engines.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.factset.com
# See configuration.py for a list of all supported configuration parameters.
configuration = fds.analyticsapi.engines.Configuration(
host = "https://api.factset.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: Basic
configuration = fds.analyticsapi.engines.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Enter a context with an instance of the API client
with fds.analyticsapi.engines.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = fds.analyticsapi.engines.CalculationsApi(api_client)
id = 'id_example' # str | From url, provided from the location header in the Run Multiple Calculations endpoint.
try:
# Cancel calculation by id
api_instance.cancel_calculation_by_id(id)
except ApiException as e:
print("Exception when calling CalculationsApi->cancel_calculation_by_id: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | From url, provided from the location header in the Run Multiple Calculations endpoint. |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 204 | Expected response, request was cancelled 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-RateLimit-Limit - Number of allowed requests for the time window. * X-RateLimit-Remaining - Number of requests left for the time window. * X-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-RateLimit-Limit - Number of allowed requests for the time window. * X-RateLimit-Remaining - Number of requests left for the time window. * X-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-RateLimit-Limit - Number of allowed requests for the time window. * X-RateLimit-Remaining - Number of requests left for the time window. * X-RateLimit-Reset - Number of seconds remaining till rate limit resets. |
| 404 | There was no request for the 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-RateLimit-Limit - Number of allowed requests for the time window. * X-RateLimit-Remaining - Number of requests left for the time window. * X-RateLimit-Reset - Number of seconds remaining till rate limit resets. |
| 429 | Rate limit reached. Wait till the time specified in Retry-After header value to make further requests. | * 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. * 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. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CalculationStatus get_calculation_status_by_id(id)
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.
- Basic Authentication (Basic):
from __future__ import print_function
import time
import fds.analyticsapi.engines
from fds.analyticsapi.engines.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.factset.com
# See configuration.py for a list of all supported configuration parameters.
configuration = fds.analyticsapi.engines.Configuration(
host = "https://api.factset.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: Basic
configuration = fds.analyticsapi.engines.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Enter a context with an instance of the API client
with fds.analyticsapi.engines.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = fds.analyticsapi.engines.CalculationsApi(api_client)
id = 'id_example' # str | From url, provided from the location header in the Run Multiple Calculations endpoint.
try:
# Get calculation status by id
api_response = api_instance.get_calculation_status_by_id(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling CalculationsApi->get_calculation_status_by_id: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | From url, provided from the location header in the Run Multiple Calculations endpoint. |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Expected response, returns status information of the entire calculation and each individual calculation unit. | * 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-RateLimit-Limit - Number of allowed requests for the time window. * X-RateLimit-Remaining - Number of requests left for the time window. * X-RateLimit-Reset - Number of seconds remaining till rate limit resets. |
| 400 | Invalid identifier provided. | * 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-RateLimit-Limit - Number of allowed requests for the time window. * X-RateLimit-Remaining - Number of requests left for the time window. * X-RateLimit-Reset - Number of seconds remaining till rate limit resets. |
| 401 | Missing or invalid authentication. | * 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. |
| 403 | User is forbidden with current credentials. | * 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-RateLimit-Limit - Number of allowed requests for the time window. * X-RateLimit-Remaining - Number of requests left for the time window. * X-RateLimit-Reset - Number of seconds remaining till rate limit resets. |
| 404 | Provided identifier was not a request, or the request was cancelled. | * 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-RateLimit-Limit - Number of allowed requests for the time window. * X-RateLimit-Remaining - Number of requests left for the time window. * X-RateLimit-Reset - Number of seconds remaining till rate limit resets. |
| 406 | Unsupported Accept header. Header needs to be set to application/json. | * 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-RateLimit-Limit - Number of allowed requests for the time window. * X-RateLimit-Remaining - Number of requests left for the time window. * X-RateLimit-Reset - Number of seconds remaining till rate limit resets. |
| 429 | Rate limit reached. Wait till the time specified in Retry-After header value to make further requests. | * 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. * 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. | * 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. |
| 503 | Request timed out. Retry the request in sometime. | * 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. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
dict(str, CalculationStatusSummary) get_calculation_status_summaries()
Get all calculation statuses
This endpoints returns all active calculation requests.
- Basic Authentication (Basic):
from __future__ import print_function
import time
import fds.analyticsapi.engines
from fds.analyticsapi.engines.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.factset.com
# See configuration.py for a list of all supported configuration parameters.
configuration = fds.analyticsapi.engines.Configuration(
host = "https://api.factset.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: Basic
configuration = fds.analyticsapi.engines.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Enter a context with an instance of the API client
with fds.analyticsapi.engines.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = fds.analyticsapi.engines.CalculationsApi(api_client)
try:
# Get all calculation statuses
api_response = api_instance.get_calculation_status_summaries()
pprint(api_response)
except ApiException as e:
print("Exception when calling CalculationsApi->get_calculation_status_summaries: %s\n" % e)This endpoint does not need any parameter.
dict(str, CalculationStatusSummary)
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List of active calculation requests. | * 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-RateLimit-Limit - Number of allowed requests for the time window. * X-RateLimit-Remaining - Number of requests left for the time window. * X-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-RateLimit-Limit - Number of allowed requests for the time window. * X-RateLimit-Remaining - Number of requests left for the time window. * X-RateLimit-Reset - Number of seconds remaining till rate limit resets. |
| 406 | Unsupported Accept 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-RateLimit-Limit - Number of allowed requests for the time window. * X-RateLimit-Remaining - Number of requests left for the time window. * X-RateLimit-Reset - Number of seconds remaining till rate limit resets. |
| 429 | Rate limit reached. Wait till the time specified in Retry-After header value to make further requests. | * 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. * 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. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
run_calculation(calculation=calculation)
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 500 units 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.
- Basic Authentication (Basic):
from __future__ import print_function
import time
import fds.analyticsapi.engines
from fds.analyticsapi.engines.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.factset.com
# See configuration.py for a list of all supported configuration parameters.
configuration = fds.analyticsapi.engines.Configuration(
host = "https://api.factset.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: Basic
configuration = fds.analyticsapi.engines.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Enter a context with an instance of the API client
with fds.analyticsapi.engines.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = fds.analyticsapi.engines.CalculationsApi(api_client)
calculation = fds.analyticsapi.engines.Calculation() # Calculation | (optional)
try:
# Run calculation
api_instance.run_calculation(calculation=calculation)
except ApiException as e:
print("Exception when calling CalculationsApi->run_calculation: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| calculation | Calculation | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 202 | Expected response, contains the URL in the Location header to check the status of the calculation. | * Location - URL to check status of the request. * 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-Points-Limit - Maximum points limit across all batches. * X-FactSet-Api-Points-Remaining - Number of points remaining till points limit reached. * X-FactSet-Api-Units-Limit - Maximum units limit across all batches. * X-FactSet-Api-Units-Remaining - Number of units remaining till units limit reached. * X-RateLimit-Limit - Number of allowed requests for the time window. * X-RateLimit-Remaining - Number of requests left for the time window. * X-RateLimit-Reset - Number of seconds remaining till rate limit resets. |
| 400 | Invalid POST body. | * Location - URL to check status of the request. * 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-Points-Limit - Maximum points limit across all batches. * X-FactSet-Api-Points-Remaining - Number of points remaining till points limit reached. * X-FactSet-Api-Units-Limit - Maximum units limit across all batches. * X-FactSet-Api-Units-Remaining - Number of units remaining till units limit reached. * X-RateLimit-Limit - Number of allowed requests for the time window. * X-RateLimit-Remaining - Number of requests left for the time window. * X-RateLimit-Reset - Number of seconds remaining till rate limit resets. |
| 401 | Missing or invalid authentication. | * Location - URL to check status of the request. * 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-Points-Limit - Maximum points limit across all batches. * X-FactSet-Api-Points-Remaining - Number of points remaining till points limit reached. * X-FactSet-Api-Units-Limit - Maximum units limit across all batches. * X-FactSet-Api-Units-Remaining - Number of units remaining till units limit reached. |
| 403 | User is forbidden with current credentials. | * Location - URL to check status of the request. * 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-Points-Limit - Maximum points limit across all batches. * X-FactSet-Api-Points-Remaining - Number of points remaining till points limit reached. * X-FactSet-Api-Units-Limit - Maximum units limit across all batches. * X-FactSet-Api-Units-Remaining - Number of units remaining till units limit reached. * X-RateLimit-Limit - Number of allowed requests for the time window. * X-RateLimit-Remaining - Number of requests left for the time window. * X-RateLimit-Reset - Number of seconds remaining till rate limit resets. |
| 415 | Missing/Invalid Content-Type header. Header needs to be set to application/json. | * Location - URL to check status of the request. * 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-Points-Limit - Maximum points limit across all batches. * X-FactSet-Api-Points-Remaining - Number of points remaining till points limit reached. * X-FactSet-Api-Units-Limit - Maximum units limit across all batches. * X-FactSet-Api-Units-Remaining - Number of units remaining till units limit reached. * X-RateLimit-Limit - Number of allowed requests for the time window. * X-RateLimit-Remaining - Number of requests left for the time window. * X-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. | * Location - URL to check status of the request. * 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-Points-Limit - Maximum points limit across all batches. * X-FactSet-Api-Points-Remaining - Number of points remaining till points limit reached. * X-FactSet-Api-Units-Limit - Maximum units limit across all batches. * X-FactSet-Api-Units-Remaining - Number of units remaining till units limit reached. * X-RateLimit-Limit - Number of allowed requests for the time window. * X-RateLimit-Remaining - Number of requests left for the time window. * X-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. | * Location - URL to check status of the request. * 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-Points-Limit - Maximum points limit across all batches. * X-FactSet-Api-Points-Remaining - Number of points remaining till points limit reached. * X-FactSet-Api-Units-Limit - Maximum units limit across all batches. * X-FactSet-Api-Units-Remaining - Number of units remaining till units limit reached. |
| 503 | Request timed out. Retry the request in sometime. | * Location - URL to check status of the request. * 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-Points-Limit - Maximum points limit across all batches. * X-FactSet-Api-Points-Remaining - Number of points remaining till points limit reached. * X-FactSet-Api-Units-Limit - Maximum units limit across all batches. * X-FactSet-Api-Units-Remaining - Number of units remaining till units limit reached. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]