Description Format Methods Public fields Methods Examples
factset.analyticsapi.engines
An R6Class
generator object
GetByUrl Url of the GET endpoint This function can be used to fetch data from any Get endpoint.
@param url character
@returnType raw
On encountering errors, an error of subclass ApiException will be thrown.
status code : 200 | Expected response once the request is successful. Response body will contain the data.
return type : raw
response headers :
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-DataDirect-Request-Key | FactSet’s request key header. |
status code : 400 | Invalid identifier provided.
response headers :
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-DataDirect-Request-Key | FactSet’s request key header. |
status code : 401 | Missing or invalid authentication.
response headers :
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-DataDirect-Request-Key | FactSet’s request key header. |
status code : 403 | User is forbidden with current credentials
response headers :
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-DataDirect-Request-Key | FactSet’s request key header. |
status code : 406 | Unsupported Accept header.
response headers :
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-DataDirect-Request-Key | FactSet’s request key header. |
status code : 500 | Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting.
response headers :
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-DataDirect-Request-Key | FactSet’s request key header. |
status code : 503 | Request timed out. Retry the request in sometime.
response headers :
X-FactSet-Api-Request-Key | Key to uniquely identify an Analytics API request. Only available after successful authentication. |
X-DataDirect-Request-Key | FactSet’s request key header. |
apiClient
Handles the client-server communication.
new()
UtilityApi$new(apiClient)
GetByUrl()
UtilityApi$GetByUrl(url, ...)
GetByUrlWithHttpInfo()
UtilityApi$GetByUrlWithHttpInfo(url, ...)
clone()
The objects of this class are cloneable with this method.
UtilityApi$clone(deep = FALSE)
deep
Whether to make a deep clone.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ## Not run:
#################### GetByUrl ####################
library(factset.analyticsapi.engines)
var.url <- url # character | Url of the GET endpoint
# Get by url
api.instance <- UtilityApi$new()
#Configure HTTP basic authorization: Basic
# provide your username in the user-serial format
api.instance$apiClient$username <- '<user-serial>';
# provide your api key generated using the developer portal
api.instance$apiClient$password <- '<api_key>';
result <- tryCatch(
api.instance$GetByUrl(url = var.url),
ApiException = function(ex) ex
)
# In case of error, print the error object
if(!is.null(result$ApiException)) {
cat(result$ApiException$toString())
} else {
# deserialized response object
response.object <- result$content
# response headers
response.headers <- result$response$headers
# response status code
response.status.code <- result$response$status_code
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.