fds.analyticsapi.engines.TemplatedPAComponentsApi
All URIs are relative to https://api.factset.com
| Method | HTTP request | Description |
|---|---|---|
| create_templated_pa_components | POST /analytics/engines/pa/v3/templated-components | Create templated PA component |
| delete_templated_pa_components | DELETE /analytics/engines/pa/v3/templated-components/{id} | Delete templated PA component |
| get_templated_pa_component_by_id | GET /analytics/engines/pa/v3/templated-components/{id} | Get templated PA component by id |
| get_templated_pa_components_in_path | GET /analytics/engines/pa/v3/templated-components | Get templated PA components in path |
| update_templated_pa_components | PUT /analytics/engines/pa/v3/templated-components/{id} | Update templated PA component |
create_templated_pa_components
TemplatedPAComponentPostSummaryRoot create_templated_pa_components(templated_pa_component_parameters_root)
Create templated PA component
This endpoint creates new component based off of linked PA template or unlinked PA template. Remarks: * Any settings in the POST body will act as a one-time override over the settings saved in the PA template. * Account identifiers must have .ACCT or .ACTM extension or BENCH: prefix. Holdings mode can be optionally set for every account. Possible values for holdings mode are B&H (Buy and Hold), TBR (Transaction based returns), OMS (Order Management System), VLT (Vaulted returns) or EXT (External Returns Data). Default holdings mode value is B&H. * Multi-horizon frequencies are not supported through this endpoint. * Componentdetail supports securities, groups, groupsall, and totals levels of granularity. However, if no value is passed, the default value is ‘securities’. Additionally, while ‘groupsall’ returns all the group levels in the PA component, setting componentdetail to ‘groups’ only returns the expanded or collapsed group levels within the PA component. * If we are overriding the grouping with a frequency, we will be overriding the grouping saved to the original component and also overriding the default frequency of the Beginning of Period to whatever we pass in the request body. * If we are overriding grouping frequency without overriding the group id it will not be applied to the default groupings saved to the original component.
Example
- Basic Authentication (Basic):
- Bearer Authentication (Bearer):
```python
import time
import fds.analyticsapi.engines
from fds.analyticsapi.engines.api import templated_pa_components_api
from fds.analyticsapi.engines.model.templated_pa_component_post_summary_root import TemplatedPAComponentPostSummaryRoot
from fds.analyticsapi.engines.model.templated_pa_component_parameters_root import TemplatedPAComponentParametersRoot
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 = templated_pa_components_api.TemplatedPAComponentsApi(api_client) templated_pa_component_parameters_root = TemplatedPAComponentParametersRoot( data=TemplatedPAComponentParameters( directory=”directory_example”, parent_template_id=”parent_template_id_example”, description=”description_example”, component_data=PAComponentData( accounts=[ PAIdentifier( id=”id_example”, holdingsmode=”holdingsmode_example”, ), ], benchmarks=[ PAIdentifier( id=”id_example”, holdingsmode=”holdingsmode_example”, ), ], groups=[ PACalculationGroup( id=”id_example”, frequency=”frequency_example”, ), ], columns=[ PACalculationColumn( id=”id_example”, statistics=[ “statistics_example”, ], ), ], dates=PADateParameters( startdate=”startdate_example”, enddate=”enddate_example”, frequency=”frequency_example”, ), datasources=PACalculationDataSources( portfoliopricingsources=[ PACalculationPricingSource( id=”id_example”, ), ], benchmarkpricingsources=[ PACalculationPricingSource( id=”id_example”, ), ], useportfoliopricingsourcesforbenchmark=True, ), currencyisocode=”currencyisocode_example”, componentdetail=”componentdetail_example”, ), ), meta=None, ) # TemplatedPAComponentParametersRoot | Request Parameters
# example passing only required values which don't have defaults set
try:
# Create templated PA component
api_response = api_instance.create_templated_pa_components(templated_pa_component_parameters_root)
pprint(api_response)
except fds.analyticsapi.engines.ApiException as e:
print("Exception when calling TemplatedPAComponentsApi->create_templated_pa_components: %s\n" % e) ```
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| templated_pa_component_parameters_root | TemplatedPAComponentParametersRoot | Request Parameters |
Return type
- A tuple with response data, HTTP status code and response headers.
- Response datatype: TemplatedPAComponentPostSummaryRoot
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: text/plain, application/json, text/json
HTTP response details
| Status code | Description | Response headers |
|————-|————-|——————|
201 | Expected response, templated PA component created 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.
|
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 | 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.
|
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_templated_pa_components
delete_templated_pa_components(id)
Delete templated PA component
This endpoint deletes an existing templated PA component
Example
- Basic Authentication (Basic):
- Bearer Authentication (Bearer):
```python
import time
import fds.analyticsapi.engines
from fds.analyticsapi.engines.api import templated_pa_components_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 = templated_pa_components_api.TemplatedPAComponentsApi(api_client) id = “01234567890123456789012345678901” # str | Unique identifier for a templated PA component
# example passing only required values which don't have defaults set
try:
# Delete templated PA component
api_instance.delete_templated_pa_components(id)
except fds.analyticsapi.engines.ApiException as e:
print("Exception when calling TemplatedPAComponentsApi->delete_templated_pa_components: %s\n" % e) ```
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Unique identifier for a templated PA component |
Return type
- A tuple with response data, HTTP status code and response headers.
- Response datatype: None (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: text/plain, application/json, text/json
HTTP response details
| Status code | Description | Response headers |
|————-|————-|——————|
204 | Expected response, deleted the templated PA component 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 | Component 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_templated_pa_component_by_id
TemplatedPAComponentRoot get_templated_pa_component_by_id(id)
Get templated PA component by id
This endpoint fetches the templated PA component settings.
Example
- Basic Authentication (Basic):
- Bearer Authentication (Bearer):
```python
import time
import fds.analyticsapi.engines
from fds.analyticsapi.engines.api import templated_pa_components_api
from fds.analyticsapi.engines.model.templated_pa_component_root import TemplatedPAComponentRoot
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 = templated_pa_components_api.TemplatedPAComponentsApi(api_client) id = “01234567890123456789012345678901” # str | Unique identifier for a templated PA component
# example passing only required values which don't have defaults set
try:
# Get templated PA component by id
api_response = api_instance.get_templated_pa_component_by_id(id)
pprint(api_response)
except fds.analyticsapi.engines.ApiException as e:
print("Exception when calling TemplatedPAComponentsApi->get_templated_pa_component_by_id: %s\n" % e) ```
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Unique identifier for a templated PA component |
Return type
- A tuple with response data, HTTP status code and response headers.
- Response datatype: TemplatedPAComponentRoot
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|————-|————-|——————|
200 | Expected response, templated PA component details. | * 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 | Templated PA component 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_templated_pa_components_in_path
TemplatedPAComponentSummaryRoot get_templated_pa_components_in_path(directory)
Get templated PA components in path
This endpoint returns the list of templated PA components in path.
Example
- Basic Authentication (Basic):
- Bearer Authentication (Bearer):
```python
import time
import fds.analyticsapi.engines
from fds.analyticsapi.engines.api import templated_pa_components_api
from fds.analyticsapi.engines.model.templated_pa_component_summary_root import TemplatedPAComponentSummaryRoot
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 = templated_pa_components_api.TemplatedPAComponentsApi(api_client) directory = “Personal:TemplatedPAComponents/” # str | Get templated PA components in path
# example passing only required values which don't have defaults set
try:
# Get templated PA components in path
api_response = api_instance.get_templated_pa_components_in_path(directory)
pprint(api_response)
except fds.analyticsapi.engines.ApiException as e:
print("Exception when calling TemplatedPAComponentsApi->get_templated_pa_components_in_path: %s\n" % e) ```
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| directory | str | Get templated PA components in path |
Return type
- A tuple with response data, HTTP status code and response headers.
- Response datatype: TemplatedPAComponentSummaryRoot
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|————-|————-|——————|
200 | Expected response, returns a list templated PA components. | * 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]
update_templated_pa_components
TemplatedPAComponentPostSummaryRoot update_templated_pa_components(id, templated_pa_component_update_parameters_root)
Update templated PA component
This endpoint allows the user to change the request body from an existing templated PA component. Remarks: * Any settings in the POST body will act as a one-time override over the settings saved in the PA template. * Account identifiers must have .ACCT or .ACTM extension or BENCH: prefix. Holdings mode can be optionally set for every account. Possible values for holdings mode are B&H (Buy and Hold), TBR (Transaction based returns), OMS (Order Management System), VLT (Vaulted returns) or EXT (External Returns Data). Default holdings mode value is B&H. * Multi-horizon frequencies are not supported through this endpoint. * Componentdetail supports securities, groups, groupsall, and totals levels of granularity. However, if no value is passed, the default value is ‘securities’. Additionally, while ‘groupsall’ returns all the group levels in the PA component, setting componentdetail to ‘groups’ only returns the expanded or collapsed group levels within the PA component. * If we are overriding the grouping with a frequency, we will be overriding the grouping saved to the original component and also overriding the default frequency of the Beginning of Period to whatever we pass in the request body. * If we are overriding grouping frequency without overriding the group id it will not be applied to the default groupings saved to the original component.
Example
- Basic Authentication (Basic):
- Bearer Authentication (Bearer):
```python
import time
import fds.analyticsapi.engines
from fds.analyticsapi.engines.api import templated_pa_components_api
from fds.analyticsapi.engines.model.templated_pa_component_post_summary_root import TemplatedPAComponentPostSummaryRoot
from fds.analyticsapi.engines.model.client_error_response import ClientErrorResponse
from fds.analyticsapi.engines.model.templated_pa_component_update_parameters_root import TemplatedPAComponentUpdateParametersRoot
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 = templated_pa_components_api.TemplatedPAComponentsApi(api_client) id = “01234567890123456789012345678901” # str | Unique identifier for a templated PA component templated_pa_component_update_parameters_root = TemplatedPAComponentUpdateParametersRoot( data=TemplatedPAComponentUpdateParameters( parent_template_id=”parent_template_id_example”, description=”description_example”, component_data=PAComponentData( accounts=[ PAIdentifier( id=”id_example”, holdingsmode=”holdingsmode_example”, ), ], benchmarks=[ PAIdentifier( id=”id_example”, holdingsmode=”holdingsmode_example”, ), ], groups=[ PACalculationGroup( id=”id_example”, frequency=”frequency_example”, ), ], columns=[ PACalculationColumn( id=”id_example”, statistics=[ “statistics_example”, ], ), ], dates=PADateParameters( startdate=”startdate_example”, enddate=”enddate_example”, frequency=”frequency_example”, ), datasources=PACalculationDataSources( portfoliopricingsources=[ PACalculationPricingSource( id=”id_example”, ), ], benchmarkpricingsources=[ PACalculationPricingSource( id=”id_example”, ), ], useportfoliopricingsourcesforbenchmark=True, ), currencyisocode=”currencyisocode_example”, componentdetail=”componentdetail_example”, ), ), meta=None, ) # TemplatedPAComponentUpdateParametersRoot | Request Parameters
# example passing only required values which don't have defaults set
try:
# Update templated PA component
api_response = api_instance.update_templated_pa_components(id, templated_pa_component_update_parameters_root)
pprint(api_response)
except fds.analyticsapi.engines.ApiException as e:
print("Exception when calling TemplatedPAComponentsApi->update_templated_pa_components: %s\n" % e) ```
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Unique identifier for a templated PA component | |
| templated_pa_component_update_parameters_root | TemplatedPAComponentUpdateParametersRoot | Request Parameters |
Return type
- A tuple with response data, HTTP status code and response headers.
- Response datatype: TemplatedPAComponentPostSummaryRoot
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|————-|————-|——————|
200 | Expected response, updated 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 | Component or 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]