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:

2 Likes

(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