Getting Content of Boxnote
Is it possible to use the Box API to get the text content of a Boxnote?
I can extract text from other types of documents, but when I try to download a Boxnote, all I get is a JSON containing the metadata, with a blank field for 'text', regardless of what is in the note itself. I have the feeling it may be because the ITEM_UPLOAD event is tracking the contents of the boxnote when it was first created, and not after I've saved content, so I'm seeing the blank text that it started with before I filled it in and saved. Is there a different event type generated when a Boxnote is saved that I can pull the text from?
-
Hi ,
No, it's not. While there are no Box Notes APIs in and of themselves, there are two solid options for you:
- Representations APIs: These APIs are specifically for getting representations of files (PDF / thumbnail / text / etc). Within those docs is a section for fetching text representations, which should work to be able to extract the text out of a Box notes file (which will have a file ID associated with it).
- Download file endpoint: You can download the content of a Box note via its file ID. What is returned is a large JSON structure that has a large amount of metadata, but also has the content of the file embedded in there. The main issue with this method is that there is some unique markup in the content that is used to structure UI elements like tables and headers, but that can be parsed and removed / adjusted since it's predictable.
Hope that helps,
Jon
サインインしてコメントを残してください。
コメント
4件のコメント