Hi all,
I'm trying to use REST API to connect TRTH in R, now I'm having problem with my code
library(httr)
uri1 <- "https://hosted.datascopeapi.reuters.com/RestApi/v1/Search/HistoricalSearch"
token1 <- paste("Token", cred[2], sep = " ")
body1 <- '{ "Request": { "Identifier": "TRI.N", "IdentifierType": "Ric", "Range": { "Start": "2015-11-17T00:00:00.000Z", "End": "2015-11-24T00:00:00.000Z" } } }'
a <- httr::GET(uri1, body = body1, add_headers(Prefer = "respond-async",Authorization = token1))
result <- httr::content(a, "parsed", "application/json")
In the above code I save my token in cred[2]
After I run my code, I get this result
$error
$error$message [1]
"No HTTP resource was found that matches the request URI 'https://hosted.datascopeapi.reuters.com/RestApi/v1/Search/HistoricalSearch'."
Looks like I have a wrong URI input, but I just copy this address from sample code.
I appreciate that if anybody can help me with this issue.