View on GitHub

analyticsapi-engines-dotnet-sdk

FactSet.AnalyticsAPI.Engines.Api.DatesApi

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

Method HTTP request Description
ConvertPADatesToAbsoluteFormat GET /analytics/engines/pa/v3/dates Convert PA dates to absolute format
ConvertVaultDatesToAbsoluteFormat GET /analytics/engines/vault/v3/dates Convert Vault dates to absolute format

ConvertPADatesToAbsoluteFormat

DateParametersSummaryRoot ConvertPADatesToAbsoluteFormat (string enddate, string componentid, string account, string startdate = null)

Convert PA dates to absolute format

This endpoint converts the given start and end dates in FactSet date format to yyyymmdd format for a PA calculation. For more information on FactSet date format, please refer to the PA Engine API documentation under the ‘API Documentation’ section in the developer portal.

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 ConvertPADatesToAbsoluteFormatExample
    {
        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 DatesApi(config);
            var enddate = -1AY;  // string | End Date
            var componentid = 801B800245E468A52AEBEC4BE31CFF5AF82F371DAEF5F158AC2E98C2FA324B46;  // string | Component Id
            var account = Client:/Folder1/Folder2/AccountName.ACCT;  // string | Account ( Account Name ending with .ACCT or .ACTM )
            var startdate = -3AY;  // string | Start Date (optional) 

            try
            {
                // Convert PA dates to absolute format
                DateParametersSummaryRoot result = apiInstance.ConvertPADatesToAbsoluteFormat(enddate, componentid, account, startdate);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling DatesApi.ConvertPADatesToAbsoluteFormat: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
enddate string End Date  
componentid string Component Id  
account string Account ( Account Name ending with .ACCT or .ACTM )  
startdate string Start Date [optional]

Return type

DateParametersSummaryRoot

Authorization

Basic, Bearer

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | Expected response, returns the converted dates in yyyymmdd format. | * 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 query parameter or value is 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 | Document or account 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.
| | 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]

ConvertVaultDatesToAbsoluteFormat

DateParametersSummaryRoot ConvertVaultDatesToAbsoluteFormat (string enddate, string componentid, string account, string startdate = null)

Convert Vault dates to absolute format

This endpoint converts the given start and end dates in FactSet date format to yyyymmdd format for a Vault calculation. For more information on FactSet date format, please refer to the Vault API documentation under the ‘API Documentation’ section in the developer portal.

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 ConvertVaultDatesToAbsoluteFormatExample
    {
        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 DatesApi(config);
            var enddate = enddate_example;  // string | End Date
            var componentid = componentid_example;  // string | Vault Component Id
            var account = account_example;  // string | Account
            var startdate = startdate_example;  // string | Start Date (optional) 

            try
            {
                // Convert Vault dates to absolute format
                DateParametersSummaryRoot result = apiInstance.ConvertVaultDatesToAbsoluteFormat(enddate, componentid, account, startdate);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling DatesApi.ConvertVaultDatesToAbsoluteFormat: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
enddate string End Date  
componentid string Vault Component Id  
account string Account  
startdate string Start Date [optional]

Return type

DateParametersSummaryRoot

Authorization

Basic, Bearer

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | Expected response, returns the converted dates in yyyymmdd format. | * 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 query parameter or value is 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 | vault Document or account 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.
| | 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]