Skip to content

Latest commit

 

History

History
251 lines (190 loc) · 26.1 KB

File metadata and controls

251 lines (190 loc) · 26.1 KB

fds.analyticsapi.engines.VaultCalculationsApi

All URIs are relative to https://api.factset.com

Method HTTP request Description
cancel_vault_calculation_by_id DELETE /analytics/engines/vault/v2/calculations/{id} Cancel Vault calculation by id
get_vault_calculation_by_id GET /analytics/engines/vault/v2/calculations/{id} Get Vault calculation by id
run_vault_calculation POST /analytics/engines/vault/v2/calculations Run Vault Calculation

cancel_vault_calculation_by_id

cancel_vault_calculation_by_id(id)

Cancel Vault calculation by id

This is the endpoint to cancel a previously submitted calculation. Instead of doing a GET on the polling URL, cancel the request by doing a DELETE.

Example

  • 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.VaultCalculationsApi(api_client)
    id = 'id_example' # str | from url, provided from the location header in the Run Calculation endpoint

    try:
        # Cancel Vault calculation by id
        api_instance.cancel_vault_calculation_by_id(id)
    except ApiException as e:
        print("Exception when calling VaultCalculationsApi->cancel_vault_calculation_by_id: %s\n" % e)

Parameters

Name Type Description Notes
id str from url, provided from the location header in the Run Calculation endpoint

Return type

void (empty response body)

Authorization

Basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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-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 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-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.
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]

get_vault_calculation_by_id

object get_vault_calculation_by_id(id)

Get Vault calculation by id

This is the endpoint to check on the progress of a previously requested calculation. If the calculation has finished computing, the body of the response will contain the requested document in JSON.

Example

  • 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.VaultCalculationsApi(api_client)
    id = 'id_example' # str | from url, provided from the location header in the Run Calculation endpoint

    try:
        # Get Vault calculation by id
        api_response = api_instance.get_vault_calculation_by_id(id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling VaultCalculationsApi->get_vault_calculation_by_id: %s\n" % e)

Parameters

Name Type Description Notes
id str from url, provided from the location header in the Run Calculation endpoint

Return type

object

Authorization

Basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
202 Expected response returned if the calculation is not yet completed. * Cache-Control - Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value.
* 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-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.
200 Expected response once calculation is completed, returns JSON in the format specified in the Run Calculations endpoint. * Cache-Control - Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value.
* 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-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.
* 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-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.
* 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.
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.
* 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-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 Calculation was already returned, provided id was not a requested calculation, or the calculation was cancelled * Cache-Control - Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value.
* 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-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.
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.
* 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.
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.
* 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.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

run_vault_calculation

object run_vault_calculation(vault_calculation_parameters=vault_calculation_parameters)

Run Vault Calculation

This endpoint runs the Vault calculation specified in the POST body parameters. It must be used first before polling or cancelling endpoints. A successful response will contain the URL to poll for the result of the calculation. Remarks: * Start and and end date must be within the configuration's min and max date range

Example

  • 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.VaultCalculationsApi(api_client)
    vault_calculation_parameters = fds.analyticsapi.engines.VaultCalculationParameters() # VaultCalculationParameters |  (optional)

    try:
        # Run Vault Calculation
        api_response = api_instance.run_vault_calculation(vault_calculation_parameters=vault_calculation_parameters)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling VaultCalculationsApi->run_vault_calculation: %s\n" % e)

Parameters

Name Type Description Notes
vault_calculation_parameters VaultCalculationParameters [optional]

Return type

object

Authorization

Basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
202 Expected response, contains the poll URL in the Location header. * Cache-Control - Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value.
* 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-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.
201 Expected response if calculation is completed within 30 seconds, returns JSON in the format specified in the Run Calculations endpoint. * Cache-Control - Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value.
* 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-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. * Cache-Control - Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value.
* 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-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.
* 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.
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.
* 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-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 One or more calculation settings were unavailable. * Cache-Control - Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value.
* 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-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. * Cache-Control - Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value.
* 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-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. * Cache-Control - Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value.
* 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-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. * Cache-Control - Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value.
* 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.
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.
* 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.

[Back to top] [Back to API list] [Back to Model list] [Back to README]