View on GitHub

analyticsapi-engines-dotnet-sdk

FactSet.AnalyticsAPI.Engines.Api.FIABCalculationsApi

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

Method HTTP request Description
GetCalculationById GET /analytics/engines/fiab/v1/calculations/{id} Get FIAB calculation by id
GetCalculationStatusSummaries GET /analytics/engines/fiab/v1/calculations Get all FIAB calculation summaries
RunCalculation POST /analytics/engines/fiab/v1/calculations Run FIAB calculation

GetCalculationById

FIABCalculationStatus GetCalculationById (string id)

Get FIAB calculation by id

This is the endpoint to check on the progress of a previously requested calculation.

Example

using System.Collections.Generic;
using System.Diagnostics;
using FactSet.AnalyticsAPI.Engines.Api;
using FactSet.AnalyticsAPI.Engines.Client;
using FactSet.AnalyticsAPI.Engines.Model;

namespace Example
{
    public class GetCalculationByIdExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.factset.com";
            // Configure HTTP basic authorization: Basic
            config.Username = "YOUR_USERNAME";
            config.Password = "YOUR_PASSWORD";
            // Configure Bearer token for authorization: Bearer
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new FIABCalculationsApi(config);
            var id = id_example;  // string | from url, provided from the location header in the Run FIAB Calculation endpoint

            try
            {
                // Get FIAB calculation by id
                FIABCalculationStatus result = apiInstance.GetCalculationById(id);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling FIABCalculationsApi.GetCalculationById: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

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

Return type

FIABCalculationStatus

Authorization

Basic, Bearer

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | Expected response, returns status information of the entire calculation if it is complete. | * 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, returns status information of the entire calculation if it is not complete. | * 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.
| | 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.
| | 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.
| | 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]

GetCalculationStatusSummaries

Dictionary<string, FIABCalculationStatusSummary> GetCalculationStatusSummaries ()

Get all FIAB calculation summaries

This endpoints returns all FIAB calculation requests.

Example

using System.Collections.Generic;
using System.Diagnostics;
using FactSet.AnalyticsAPI.Engines.Api;
using FactSet.AnalyticsAPI.Engines.Client;
using FactSet.AnalyticsAPI.Engines.Model;

namespace Example
{
    public class GetCalculationStatusSummariesExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.factset.com";
            // Configure HTTP basic authorization: Basic
            config.Username = "YOUR_USERNAME";
            config.Password = "YOUR_PASSWORD";
            // Configure Bearer token for authorization: Bearer
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new FIABCalculationsApi(config);

            try
            {
                // Get all FIAB calculation summaries
                Dictionary<string, FIABCalculationStatusSummary> result = apiInstance.GetCalculationStatusSummaries();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling FIABCalculationsApi.GetCalculationStatusSummaries: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

Dictionary<string, FIABCalculationStatusSummary>

Authorization

Basic, Bearer

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | List of active FIAB 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-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.
| | 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-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. 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]

RunCalculation

void RunCalculation (FIABCalculationParameters fIABCalculationParameters = null)

Run FIAB calculation

This endpoint creates a new FIAB calculation. 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: * Any settings in POST body will act as a one-time override over the settings saved in the FIAB template.

Example

using System.Collections.Generic;
using System.Diagnostics;
using FactSet.AnalyticsAPI.Engines.Api;
using FactSet.AnalyticsAPI.Engines.Client;
using FactSet.AnalyticsAPI.Engines.Model;

namespace Example
{
    public class RunCalculationExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.factset.com";
            // Configure HTTP basic authorization: Basic
            config.Username = "YOUR_USERNAME";
            config.Password = "YOUR_PASSWORD";
            // Configure Bearer token for authorization: Bearer
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new FIABCalculationsApi(config);
            var fIABCalculationParameters = new FIABCalculationParameters(); // FIABCalculationParameters |  (optional) 

            try
            {
                // Run FIAB calculation
                apiInstance.RunCalculation(fIABCalculationParameters);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling FIABCalculationsApi.RunCalculation: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
fIABCalculationParameters FIABCalculationParameters   [optional]

Return type

void (empty response body)

Authorization

Basic, Bearer

HTTP request headers

HTTP response details

| 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-Calculations-Limit - Maximum FIAB request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FIAB 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 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-Calculations-Limit - Maximum FIAB request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FIAB 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. | * 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-Calculations-Limit - Maximum FIAB request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FIAB requests remaining till request 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-Calculations-Limit - Maximum FIAB request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FIAB 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. | * 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-Calculations-Limit - Maximum FIAB request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FIAB 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 FIAB 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-Calculations-Limit - Maximum FIAB request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FIAB 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. | * 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-Calculations-Limit - Maximum FIAB request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FIAB requests remaining till request 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-Calculations-Limit - Maximum FIAB request limit.
* X-FactSet-Api-Calculations-Remaining - Number of FIAB requests remaining till request limit reached.
|

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