Page 1 of 1

JSON with Bearer Authorization

PostPosted: Tue Nov 03, 2020 2:43 pm
by roquej
Can get this to work! Looking for instructions on how to connected to a JSON source with bearer authentication.

Any help would be greatly appreciate it.

JP

Re: JSON with Bearer Authorization

PostPosted: Tue Nov 03, 2020 2:53 pm
by FlyingDiver
You're probably going to need to write a Python script that fetches the data and writes it to a CVS data file.

Here's an example of doing the data fetch: https://stackoverflow.com/questions/299 ... arer-token

And to write the data: https://stackoverflow.com/questions/187 ... son-to-csv

Re: JSON with Bearer Authorization

PostPosted: Tue Nov 03, 2020 3:35 pm
by roquej
Thank you! will give that a try.

JP

Re: JSON with Bearer Authorization

PostPosted: Tue Nov 03, 2020 3:42 pm
by DaveL17
Just to make sure I understand, you're looking to chart directly from a JSON data source? That's not possible with the plugin. It only works with CSV data sources.

Re: JSON with Bearer Authorization

PostPosted: Tue Nov 03, 2020 3:50 pm
by FlyingDiver
DaveL17 wrote:
Just to make sure I understand, you're looking to chart directly from a JSON data source? That's not possible with the plugin. It only works with CSV data sources.


Which is why I gave him a link to saving the JSON data to CSV. ;)

Re: JSON with Bearer Authorization

PostPosted: Tue Nov 03, 2020 4:29 pm
by roquej
I just thought about using the GhostXML plugin to write data to a file or using variable before charting. I wonder if it works with bearer auth...need to try that.


Sent from my iPhone using Tapatalk Pro

Re: JSON with Bearer Authorization

PostPosted: Tue Nov 03, 2020 4:42 pm
by DaveL17
FlyingDiver wrote:
DaveL17 wrote:
Just to make sure I understand, you're looking to chart directly from a JSON data source? That's not possible with the plugin. It only works with CSV data sources.


Which is why I gave him a link to saving the JSON data to CSV. ;)


And you said 'probably'. :D

Re: JSON with Bearer Authorization

PostPosted: Tue Nov 03, 2020 4:43 pm
by DaveL17
roquej wrote:
I just thought about using the GhostXML plugin to write data to a file or using variable before charting. I wonder if it works with bearer auth...need to try that.


Sent from my iPhone using Tapatalk Pro

Let me know how it goes. GhostXML has a fair bit of support for different auth schemes, but it's not necessarily universal.

Re: JSON with Bearer Authorization

PostPosted: Tue Nov 03, 2020 4:46 pm
by roquej



Sent from my iPhone using Tapatalk Pro