Is it possible using only one link with apikey

Like that

https://coda.io/apis/v1beta1/docs/{docId}/tables/{tableIdOrName}?api_key={apiKey}

vs

d3.json(“https://api.airtable.com/v0/appH5bjFWetBPMsYQ/alphabet?api_key=keyWn17XGTuOJRKYO”)

I use D3.json() and one link with apikey value to get table datas . It works by airtable api key url . But I can’t figure it out is it work on Coda api. ?

The table data is simple

And this is my use coda api case on https://observablehq.com/@colocarto/bar-chart

Yeah . I know currently , page API don’t work.
I just wanna figure it out before .

I’m learning a little JS code and D3.js , intent to build dashboard chart on observablehq , such as quadrant chart for prioritization techniques , and Radar Chart , more flexible common chart ( such as, custom bar color ,filter data button, etc)

Thanks.

Our API currently accepts API keys using the Authentication header param, as described in the docs. I haven’t used D3 in a while, but it looks like d3.json() passes the parameters over to fetch(), so you should be able to write something like:

const url = 'https://coda.io/api/v1beta1/...';
const token = '<your token>';
const data = await d3.json(url, {headers: {Authentication: `Bearer ${token}`}}).then(things => ...);
1 Like