All URIs are relative to https://api.factset.com/content/factset-fundamentals/v2
Method | HTTP request | Description |
---|---|---|
getBatchData | GET /batch-result | Returns the response for a Batch Request |
getBatchStatus | GET /batch-status | Returns the status for a Batch Request |
BatchResultResponse getBatchData(id)
Returns the response for a Batch Request
Returns the response data for the underlying batch request that is specified by the id. By default, this endpoint will return data as JSON. If you wish to receive your data in CSV format, you can edit the header to have the "accept" parameter as "text/csv" instead of "application/json".
Important
The parameter variables defined below are just examples and may potentially contain non valid values. Please replace them with valid values.
const { ApiClient, BatchProcessingApi } = require('@factset/sdk-factsetfundamentals');
const { ConfidentialClient } = require('@factset/sdk-utils');
const apiClient = ApiClient.instance;
// Examples for each supported authentication method are below,
// choose one that satisfies your use case.
// (Preferred) OAuth 2.0: FactSetOAuth2
// See https://github.com/FactSet/enterprise-sdk#oauth-20
// for information on how to create the app-config.json file
//
// The confidential client instance should be reused in production environments.
// See https://github.com/FactSet/enterprise-sdk-utils-typescript#authentication
// for more information on using the ConfidentialClient class
apiClient.factsetOauth2Client = new ConfidentialClient('/path/to/app-config.json');
// Basic authentication: FactSetApiKey
// See https://github.com/FactSet/enterprise-sdk#api-key
// for information how to create an API key
// const FactSetApiKey = apiClient.authentications['FactSetApiKey'];
// FactSetApiKey.username = 'USERNAME-SERIAL';
// FactSetApiKey.password = 'API-KEY';
const apiInstance = new BatchProcessingApi();
const id = "id_example"; // String | Batch Request identifier.
// Call api endpoint
apiInstance.getBatchData(id).then(
data => {
// data is a responsewrapper: GetBatchDataResponseWrapper
switch (data.statusCode) {
case 200:
// BatchResultResponse
console.log(data.getResponse200());
break;
case 202:
// BatchStatusResponse
console.log(data.getResponse202());
break;
}
},
error => {
console.error(error);
},
);
Name | Type | Description | Notes |
---|---|---|---|
id | String | Batch Request identifier. |
- Content-Type: Not defined
- Accept: application/json
BatchStatusResponse getBatchStatus(id)
Returns the status for a Batch Request
Return the status for the underlying batch request that is specified by the id.
Important
The parameter variables defined below are just examples and may potentially contain non valid values. Please replace them with valid values.
const { ApiClient, BatchProcessingApi } = require('@factset/sdk-factsetfundamentals');
const { ConfidentialClient } = require('@factset/sdk-utils');
const apiClient = ApiClient.instance;
// Examples for each supported authentication method are below,
// choose one that satisfies your use case.
// (Preferred) OAuth 2.0: FactSetOAuth2
// See https://github.com/FactSet/enterprise-sdk#oauth-20
// for information on how to create the app-config.json file
//
// The confidential client instance should be reused in production environments.
// See https://github.com/FactSet/enterprise-sdk-utils-typescript#authentication
// for more information on using the ConfidentialClient class
apiClient.factsetOauth2Client = new ConfidentialClient('/path/to/app-config.json');
// Basic authentication: FactSetApiKey
// See https://github.com/FactSet/enterprise-sdk#api-key
// for information how to create an API key
// const FactSetApiKey = apiClient.authentications['FactSetApiKey'];
// FactSetApiKey.username = 'USERNAME-SERIAL';
// FactSetApiKey.password = 'API-KEY';
const apiInstance = new BatchProcessingApi();
const id = "id_example"; // String | Batch Request identifier.
// Call api endpoint
apiInstance.getBatchStatus(id).then(
data => {
console.log('API called successfully. Returned data:');
console.log(data);
},
error => {
console.error(error);
},
);
Name | Type | Description | Notes |
---|---|---|---|
id | String | Batch Request identifier. |
- Content-Type: Not defined
- Accept: application/json