🏠 back to Observable

API to upload an attachment ?

Is there an API (say, HTTP POST) to upload an attachment to a notebook outside of observable?

I want to generate a JSON file on my server and upload it to a notebook automatically.

1 Like

Not currently, no. But I want this so much!! One use case is programmatically writing to a file attachment on some user-triggered event inside a notebook, so you can analyze some data or change some state and then save it for everyone. Another use case (maybe more what you’re talking about) is more like cron jobs for ETL-ish stuff. (I’d love to be able to write those in notebooks too, hah, which might require notebooks to run headless on a server somehow.)

There’s some discussion of this in our Feedback repo; I’d love if you added any needs or details or ideas:


(Of course there’s also the option that, if you can store the JSON on the server too, the notebook could fetch it from there.)

1 Like