# 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
}
# }
Run the code above in your browser using DataLab