Skip to content

Latest commit

 

History

History
754 lines (596 loc) · 52.1 KB

File metadata and controls

754 lines (596 loc) · 52.1 KB

fds.analyticsapi.engines.UnlinkedPATemplatesApi

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

Method HTTP request Description
create_unlinked_pa_templates POST /analytics/engines/pa/v3/unlinked-templates Create unlinked PA template
delete_unlinked_pa_templates DELETE /analytics/engines/pa/v3/unlinked-templates/{id} Delete unlinked PA template
get_default_unlinked_pa_template_types GET /analytics/engines/pa/v3/unlinked-templates/template-types Get default unlinked PA template types.
get_details_type GET /analytics/engines/pa/v3/unlinked-templates/template-types/{id} Get unlinked PA template type details by id.
get_unlinked_pa_templates GET /analytics/engines/pa/v3/unlinked-templates Get unlinked PA templates
get_unlinked_pa_templates_by_id GET /analytics/engines/pa/v3/unlinked-templates/{id} Get unlinked PA template details by id
update_unlinked_pa_templates PUT /analytics/engines/pa/v3/unlinked-templates/{id} Update unlinked PA template

create_unlinked_pa_templates

UnlinkedPATemplatePostSummaryRoot create_unlinked_pa_templates(unlinked_pa_template_parameters_root)

Create unlinked PA template

This endpoint creates a template which is not linked to any specific PA3 tile. Remarks: * Mandatory fields are required to be passed in POST requests and Optional fields are not necessary. If no mandatory fields are passed, then we can use the template as a component and skip the component creation. * Mandatory, optional and locked fields can be "accounts", "benchmarks", "groups", "columns", "dates", "currencyisocode" and "componentdetail". * We cannot override the Locked fields when creating the Component. * Mandatory and locked strings are mutually exclusive. * Any settings in the POST body will act as a one-time override over the settings saved in the PA template. * Multi-horizon frequencies are not supported through this endpoint. * Componentdetail supports securities, groups, and totals as well but if we don't pass anything that defaults to securities.

Example

  • Basic Authentication (Basic):
  • Bearer Authentication (Bearer):
import time
import fds.analyticsapi.engines
from fds.analyticsapi.engines.api import unlinked_pa_templates_api
from fds.analyticsapi.engines.model.unlinked_pa_template_post_summary_root import UnlinkedPATemplatePostSummaryRoot
from fds.analyticsapi.engines.model.unlinked_pa_template_parameters_root import UnlinkedPATemplateParametersRoot
from fds.analyticsapi.engines.model.client_error_response import ClientErrorResponse
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'
)

# Configure Bearer authorization: Bearer
configuration = fds.analyticsapi.engines.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# 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 = unlinked_pa_templates_api.UnlinkedPATemplatesApi(api_client)
    unlinked_pa_template_parameters_root = UnlinkedPATemplateParametersRoot(
        data=UnlinkedPATemplateParameters(
            directory="directory_example",
            template_type_id="template_type_id_example",
            description="description_example",
            accounts=[
                PAIdentifier(
                    id="id_example",
                    holdingsmode="holdingsmode_example",
                ),
            ],
            benchmarks=[
                PAIdentifier(
                    id="id_example",
                    holdingsmode="holdingsmode_example",
                ),
            ],
            columns=[
                PACalculationColumn(
                    id="id_example",
                    statistics=[
                        "statistics_example",
                    ],
                ),
            ],
            dates=PADateParameters(
                startdate="startdate_example",
                enddate="enddate_example",
                frequency="frequency_example",
            ),
            groups=[
                PACalculationGroup(
                    id="id_example",
                ),
            ],
            currencyisocode="currencyisocode_example",
            componentdetail="componentdetail_example",
            content=TemplateContentTypes(
                mandatory=[
                    "mandatory_example",
                ],
                optional=[
                    "optional_example",
                ],
                locked=[
                    "locked_example",
                ],
            ),
        ),
        meta=None,
    ) # UnlinkedPATemplateParametersRoot | Request Parameters

    # example passing only required values which don't have defaults set
    try:
        # Create unlinked PA template
        api_response = api_instance.create_unlinked_pa_templates(unlinked_pa_template_parameters_root)
        pprint(api_response)
    except fds.analyticsapi.engines.ApiException as e:
        print("Exception when calling UnlinkedPATemplatesApi->create_unlinked_pa_templates: %s\n" % e)

Parameters

Name Type Description Notes
unlinked_pa_template_parameters_root UnlinkedPATemplateParametersRoot Request Parameters

Return type

Authorization

Basic, Bearer

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Expected response, created a unlinked PA template. * 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 data provided. Please check the request parameters before attempting again. * 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]

delete_unlinked_pa_templates

delete_unlinked_pa_templates(id)

Delete unlinked PA template

This endpoint deletes an existing unliked PA template.

Example

  • Basic Authentication (Basic):
  • Bearer Authentication (Bearer):
import time
import fds.analyticsapi.engines
from fds.analyticsapi.engines.api import unlinked_pa_templates_api
from fds.analyticsapi.engines.model.client_error_response import ClientErrorResponse
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'
)

# Configure Bearer authorization: Bearer
configuration = fds.analyticsapi.engines.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# 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 = unlinked_pa_templates_api.UnlinkedPATemplatesApi(api_client)
    id = "id_example" # str | Unique identifier for an unlinked PA template

    # example passing only required values which don't have defaults set
    try:
        # Delete unlinked PA template
        api_instance.delete_unlinked_pa_templates(id)
    except fds.analyticsapi.engines.ApiException as e:
        print("Exception when calling UnlinkedPATemplatesApi->delete_unlinked_pa_templates: %s\n" % e)

Parameters

Name Type Description Notes
id str Unique identifier for an unlinked PA template

Return type

  • A tuple with response data, HTTP status code and response headers.
  • Response datatype: None (empty response body)

Authorization

Basic, Bearer

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 Expected response, deleted the unlinked PA template 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-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 data provided. Please check the request parameters before attempting again. * 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 Template 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]

get_default_unlinked_pa_template_types

UnlinkedPATemplateCategoryAndTypeRoot get_default_unlinked_pa_template_types()

Get default unlinked PA template types.

This endpoint fetches default unlinked PA template types.

Example

  • Basic Authentication (Basic):
  • Bearer Authentication (Bearer):
import time
import fds.analyticsapi.engines
from fds.analyticsapi.engines.api import unlinked_pa_templates_api
from fds.analyticsapi.engines.model.unlinked_pa_template_category_and_type_root import UnlinkedPATemplateCategoryAndTypeRoot
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'
)

# Configure Bearer authorization: Bearer
configuration = fds.analyticsapi.engines.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# 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 = unlinked_pa_templates_api.UnlinkedPATemplatesApi(api_client)

    # example, this endpoint has no required or optional parameters
    try:
        # Get default unlinked PA template types.
        api_response = api_instance.get_default_unlinked_pa_template_types()
        pprint(api_response)
    except fds.analyticsapi.engines.ApiException as e:
        print("Exception when calling UnlinkedPATemplatesApi->get_default_unlinked_pa_template_types: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

Authorization

Basic, Bearer

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Expected response, default unlinked PA template types * 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]

get_details_type

UnlinkedPATemplateCategoryAndTypeDetailsRoot get_details_type(id)

Get unlinked PA template type details by id.

This endpoint fetches the unlinked PA template type details.

Example

  • Basic Authentication (Basic):
  • Bearer Authentication (Bearer):
import time
import fds.analyticsapi.engines
from fds.analyticsapi.engines.api import unlinked_pa_templates_api
from fds.analyticsapi.engines.model.unlinked_pa_template_category_and_type_details_root import UnlinkedPATemplateCategoryAndTypeDetailsRoot
from fds.analyticsapi.engines.model.client_error_response import ClientErrorResponse
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'
)

# Configure Bearer authorization: Bearer
configuration = fds.analyticsapi.engines.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# 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 = unlinked_pa_templates_api.UnlinkedPATemplatesApi(api_client)
    id = "id_example" # str | Unique identifier for an unlinked PA template type

    # example passing only required values which don't have defaults set
    try:
        # Get unlinked PA template type details by id.
        api_response = api_instance.get_details_type(id)
        pprint(api_response)
    except fds.analyticsapi.engines.ApiException as e:
        print("Exception when calling UnlinkedPATemplatesApi->get_details_type: %s\n" % e)

Parameters

Name Type Description Notes
id str Unique identifier for an unlinked PA template type

Return type

Authorization

Basic, Bearer

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Expected response, details of the unlinked PA template type * 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 data provided. Please check the request parameters before attempting again. * 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 Unlinked PA template type 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]

get_unlinked_pa_templates

UnlinkedPATemplateSummaryRoot get_unlinked_pa_templates()

Get unlinked PA templates

This endpoint returns the list of unlinked PA templates.

Example

  • Basic Authentication (Basic):
  • Bearer Authentication (Bearer):
import time
import fds.analyticsapi.engines
from fds.analyticsapi.engines.api import unlinked_pa_templates_api
from fds.analyticsapi.engines.model.unlinked_pa_template_summary_root import UnlinkedPATemplateSummaryRoot
from fds.analyticsapi.engines.model.client_error_response import ClientErrorResponse
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'
)

# Configure Bearer authorization: Bearer
configuration = fds.analyticsapi.engines.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# 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 = unlinked_pa_templates_api.UnlinkedPATemplatesApi(api_client)
    directory = "directory_example" # str | Get unlinked PA templates in path. (optional)
    category = "category_example" # str | Get unlinked PA templates by category. (optional)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # Get unlinked PA templates
        api_response = api_instance.get_unlinked_pa_templates(directory=directory, category=category)
        pprint(api_response)
    except fds.analyticsapi.engines.ApiException as e:
        print("Exception when calling UnlinkedPATemplatesApi->get_unlinked_pa_templates: %s\n" % e)

Parameters

Name Type Description Notes
directory str Get unlinked PA templates in path. [optional]
category str Get unlinked PA templates by category. [optional]

Return type

Authorization

Basic, Bearer

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Expected response, returns a list of unlinked PA templates. * 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 data provided. Please check the request parameters before attempting again. * 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]

get_unlinked_pa_templates_by_id

UnlinkedPATemplateRoot get_unlinked_pa_templates_by_id(id)

Get unlinked PA template details by id

This endpoint fetches the template settings.

Example

  • Basic Authentication (Basic):
  • Bearer Authentication (Bearer):
import time
import fds.analyticsapi.engines
from fds.analyticsapi.engines.api import unlinked_pa_templates_api
from fds.analyticsapi.engines.model.unlinked_pa_template_root import UnlinkedPATemplateRoot
from fds.analyticsapi.engines.model.client_error_response import ClientErrorResponse
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'
)

# Configure Bearer authorization: Bearer
configuration = fds.analyticsapi.engines.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# 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 = unlinked_pa_templates_api.UnlinkedPATemplatesApi(api_client)
    id = "id_example" # str | Unique identifier for an unlinked PA template

    # example passing only required values which don't have defaults set
    try:
        # Get unlinked PA template details by id
        api_response = api_instance.get_unlinked_pa_templates_by_id(id)
        pprint(api_response)
    except fds.analyticsapi.engines.ApiException as e:
        print("Exception when calling UnlinkedPATemplatesApi->get_unlinked_pa_templates_by_id: %s\n" % e)

Parameters

Name Type Description Notes
id str Unique identifier for an unlinked PA template

Return type

  • A tuple with response data, HTTP status code and response headers.
  • Response datatype: UnlinkedPATemplateRoot

Authorization

Basic, Bearer

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Expected response, get details of the unlinked PA template. * 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 data provided. Please check the request parameters before attempting again. * 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 Template 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]

update_unlinked_pa_templates

UnlinkedPATemplatePostSummaryRoot update_unlinked_pa_templates(id, unlinked_pa_template_update_parameters_root)

Update unlinked PA template

This endpoint updates an existing unlinked PA template. Remarks: * Mandatory fields are required to be passed in POST requests and Optional fields are not necessary. If no mandatory fields are passed, then we can use the template as a component and skip the component creation. * Mandatory, optional and locked fields can be "accounts", "benchmarks", "groups", "columns", "dates", "currencyisocode" and "componentdetail". * We cannot override the Locked fields when creating the Component. * Mandatory and locked strings are mutually exclusive. * Any settings in the POST body will act as a one-time override over the settings saved in the PA template. * Multi-horizon frequencies are not supported through this endpoint. * Componentdetail supports securities, groups, and totals as well but if we don't pass anything that defaults to securities.

Example

  • Basic Authentication (Basic):
  • Bearer Authentication (Bearer):
import time
import fds.analyticsapi.engines
from fds.analyticsapi.engines.api import unlinked_pa_templates_api
from fds.analyticsapi.engines.model.unlinked_pa_template_update_parameters_root import UnlinkedPATemplateUpdateParametersRoot
from fds.analyticsapi.engines.model.unlinked_pa_template_post_summary_root import UnlinkedPATemplatePostSummaryRoot
from fds.analyticsapi.engines.model.client_error_response import ClientErrorResponse
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'
)

# Configure Bearer authorization: Bearer
configuration = fds.analyticsapi.engines.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# 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 = unlinked_pa_templates_api.UnlinkedPATemplatesApi(api_client)
    id = "id_example" # str | Unique identifier for an unlinked PA template
    unlinked_pa_template_update_parameters_root = UnlinkedPATemplateUpdateParametersRoot(
        data=UnlinkedPATemplateUpdateParameters(
            description="description_example",
            accounts=[
                PAIdentifier(
                    id="id_example",
                    holdingsmode="holdingsmode_example",
                ),
            ],
            benchmarks=[
                PAIdentifier(
                    id="id_example",
                    holdingsmode="holdingsmode_example",
                ),
            ],
            columns=[
                PACalculationColumn(
                    id="id_example",
                    statistics=[
                        "statistics_example",
                    ],
                ),
            ],
            dates=PADateParameters(
                startdate="startdate_example",
                enddate="enddate_example",
                frequency="frequency_example",
            ),
            groups=[
                PACalculationGroup(
                    id="id_example",
                ),
            ],
            currencyisocode="currencyisocode_example",
            componentdetail="componentdetail_example",
            content=TemplateContentTypes(
                mandatory=[
                    "mandatory_example",
                ],
                optional=[
                    "optional_example",
                ],
                locked=[
                    "locked_example",
                ],
            ),
        ),
        meta=None,
    ) # UnlinkedPATemplateUpdateParametersRoot | Request Parameters

    # example passing only required values which don't have defaults set
    try:
        # Update unlinked PA template
        api_response = api_instance.update_unlinked_pa_templates(id, unlinked_pa_template_update_parameters_root)
        pprint(api_response)
    except fds.analyticsapi.engines.ApiException as e:
        print("Exception when calling UnlinkedPATemplatesApi->update_unlinked_pa_templates: %s\n" % e)

Parameters

Name Type Description Notes
id str Unique identifier for an unlinked PA template
unlinked_pa_template_update_parameters_root UnlinkedPATemplateUpdateParametersRoot Request Parameters

Return type

Authorization

Basic, Bearer

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Expected response, updated the unlinked PA template. * 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 data provided. Please check the request parameters before attempting again. * 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 Template 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]