Hey there!
Is it possible to retrieve the contents of a Notepad document when supplied the rid? I’m looking to summarize my Notepad documents using AIP.
Hey there!
Is it possible to retrieve the contents of a Notepad document when supplied the rid? I’m looking to summarize my Notepad documents using AIP.
Hi, unfortunately, we currently do not have any publicly documented or supported APIs for retrieving the contents of a Notepad from the rid, aside from opening the document itself via https://<stack>.palantirfoundry.com/workspace/notepad/view/<rid>
.
Even though @leons is correct that there are not published APIs for this, you definitely can grab the JSON representation or text from the internal API using a Source pointing back at your Foundry instance and a Webhook to the Notepad api endpoint. You could then wire this webhook into an Action so you could, for instance, show the notepad embedded in Workshop and then click a button to get an AIP summary.
This involves poking around in the browser developer console to figure out these API endpoints as well as figuring out how to configure the Sources and Webhooks, which can be a bit finicky.
Here’s a bit of a hint from a version of this I have set up. I can’t give any hints on the Source configuration, because I don’t actually have access to that on this stack, but you might find it in the answer to another question here, or could ask again just about how to set up a Source so that you can use a Webhook to hit the Foundry APIs.
I will strongly cavaet that Palantir does not endorse or support using these internal APIs. The only APIs that get versioned and which we make any guarantees about stability or not breaking are those in the Foundry API. So if you do proceed with this, make sure to keep it in mind; you won’t get any notice if the Notepad team decides to change the way these endpoints work or remove them entirely and you won’t get any support (except probably from other people here on the community) if you run into issues.
I’d love to have Notepad add a couple content access APIs to the Foundry API gateway; maybe we’ll get that someday so we can officially unlock these kinds of native document processing workflows that we can easily do on PDFs in media sets or other external media.