I am able to get into the API (using a combination of R and insomnia) and have got several stuff already drawn from it, to my endless joy. But now I’m trying to get a table from a report, and I get this:
{
“errors”: [
{
“message”: “startTime and endTime are the same value. Make sure to specify a non-zero time range. Use the fights query to obtain the time ranges of each fight.”,
“extensions”: {
“category”: “graphql”
},
“locations”: [
{
“line”: 1,
“column”: 70
}
],
“path”: [
“reportData”,
“report”,
“table”
]
}
],
“data”: {
“reportData”: {
“report”: {
“startTime”: 1604603500691,
“endTime”: 1604607410705,
“table”: null
}
}
}
}
Thank you, defining an endtime worked, though I just wanted the whole report and it’s stated as optional, but both are set at 0 so I get why that won’t work. For now, I set it at 10000000, which seems to work.
Hey @Kairi - I’m trying to get through the Insomnia API and I also wanted to pull data in R. Could you help me out with getting started/set-up? Would really appreciate the help, not finding much documentation online and I’m pretty noob with APIs in general.
Sure. What have you got? Can you get to the logs via Insomnia? That’s the first step. There I got the token from (yes, it should be possible to get that in R using httr, if you find how, let me know ;)).
You need the package library(ghql) and library(jsonlite), and then you can try: