Have any questions on Getting Started Guide - Coda API? Ask away here.
Linking to an existing thread on this topic: One-way sync (handle pagination for syncing source tables with >500 items)
hi @oleg I am going through the guide, but I am not understanding. In the guide, it suggests to use the createDoc() function to create your first doc. The way the getting started guide is set up, it suggests you can figure it out on your own, since it has a Show Solution feature to hide the code solution.
So I went to the CodaAPI to see how I could figure out how to create the doc. Thereâs nothing listed showing that method/formula/endpoint. In fact, if you search the whole page nothing shows for CreateDoc except one place where it talks about free vs paid workspaces.
I was expecting something akin to https://coda.io/formulas - am I missing something here?
Hi @Johg_Ananda, sorry for the late reply. Apologies if it was unclear, but the â#createDocâ text in the API docs is actually a link that goes to https://coda.io/developers/apis/v1beta1#operation/createDoc. Technically the âoperation IDâ of that endpoint is createDoc
, but I guess the actual docs donât really expose that anywhere (other than in the link itself). You should also be able to find it if you explore the navigation / table of contents on the left side: under âDocsâ, itâs the âCreate a docâ endpoint. Hope that helps!
hey thanks for the reply @oleg! Iâm new to the API docs, so Iâm looking at these with beginnerâs eyes. Help me understand - why arenât they set up the same way as the formulas? Why doesnât the string âcreatedocâ appear on the page?
I feel like if that is a method/formula the text âcreatedocâ should appear on the page?
The formulas youâre referring to are JavaScript functions, part of the Google Apps Script library for the Coda API. The Google Apps Script library is provided as a convenience to having to write your own code to handle the actual network requests. The API documentation is general documentation for the REST API.
Aside from the Google Apps Script library, there are other third-party client libraries that wrap these REST endpoints. Each library and language has its own conventions for how API methods are exposed and named, so you might have to look through the docs yourself to find the associated endpoint rather than relying on Ctrl/Cmd+F search.
To follow up, I should note that we actually have example code for Google Apps Script in the documentation:
But, note that the default sample points to Python code, so you wonât be able to find it unless you select âGoogle Apps Scriptâ for the endpoint youâre interested in.
In the tutorial the printImageUrlTest()
which is supposed to get the âlatest pic of Parisâ is failing:
Just updated the documentation, but looks like you need to add the date
parameter to the API call since there doesnât appear to be any recent images. Change the nasaURL
to this: https://api.nasa.gov/planetary/earth/assets/?api_key=DEMO_KEY&dim=0.1&date=2017-01-01