Through the official getnote CLI to perform real operations. Do not construct OpenAPI requests, IDs, or note links yourself; for machine calls, prefer -o json, and judge results by the exit code and the result contract below.
Unified result determination
For the JSON result of all API commands, first look at the structure below, then read the data field specified for each command:
{
"success": true,
"data": {},
"request_id": "可选"
}
A failure result is success=false or the command exit code is non-0; read error.code、error.message、error.reason、error.retryable and the optional request_id. HTTP success, upload completion, the appearance of a task ID, or obtaining an empty note link cannot replace the final successful result.
Intent routing
| Intent | Command entry |
|---|---|
| Save text, links, or local images | getnote save |
| Query asynchronous save tasks | getnote task |
| View recent notes | getnote notes |
| View details or fields | getnote note |
| Quote/link/text original text | getnote note original |
| Audio, meeting, or class transcription | getnote note transcript |
| Image, audio, and file attachments | getnote note attachments |
| Audio or meeting timeline | getnote note timeline |
| Chapter timeline in the summary | getnote note chapters |
| Audio note highlights (independent data) | getnote marks <note_id> |
| List sprout reports by month | getnote sprouts <YYYY-MM> |
| Read the original text of a sprout report | getnote sprout <id> |
| Audio quick notes | gnote note quick, legacy fallback getnote note quick-note |
| Derived to-dos in the meeting summary | getnote note todos |
| Modify notes | getnote note update |
| Delete notes | getnote note delete |
| Public sharing | getnote note share |
When unsure about parameters, first run the target command --help。
Source filtering, lightweight locating, and original text
The list API only returns locating information; then use the detail API to read the complete note.display_title is the display title and does not override the original title; it is normal for quote notes to have an empty title.preview is a locating snippet with source and truncation markers, not the full text.
getnote notes --source dedao --note-type ref --page-size 20 -o json
getnote note '<note_id>' -o json
getnote note original '<note_id>' -o json
| note_type | Original text field | Semantics of content |
|---|---|---|
| ref | ref_content | User comment, not the quoted original text |
| plain_text | content | User body text |
| link | web_page.content | Usually a summary |
| audio / local_audio | audio.original | Usually a summary |
original reads the above fields only by the actual type and returns original_source; a missing original text or unsupported type will error, and comments or locating snippets must not be padded in as the original text. In the list, content_state indicates that the body text is omitted; the detail API returns the complete body text and metadata. Use metadata_state.reference/topics to distinguish complete, partial, and unavailable metadata; do not guess and fill in missing authors, book IDs, or source URLs.
When an article or course has no knowledge base, existing candidates can be precisely looked up after reading the real reference from details or search results. When there is only a course name/manuscript name or a comment, and no candidate yet, first execute the search Skill's “Course, Manuscript, and Comment Locating”: after semantic search finds no source match, list locating information by source in pages and then match metadata; do not ask the user to provide internal IDs, and do not give up because of topics=[] . After obtaining a candidate, look it up precisely:
getnote notes --source dedao --note-type ref --reference-type course_article --reference-id '<reference.resource_id>' --all -o json
# 缺少资源 ID,但有 reference.article.url 时,可改用精确文章 URL
getnote notes --source dedao --note-type ref --article-url '<reference.article.url>' --all -o json
The platform value is taken from reference.source; the resource type is taken from reference.resource_type, do not guess the enum from tags or internal ptype.--reference-id You must pass both --source and --reference-type. The course transcript's resource_id points to a single transcript, and you cannot use it to retrieve the entire course; the entire course must be traversed by matching the course source from the search reference. The referenced resource_id、original_note_id, book ID, and note ID are all different identities; always use them as the returned strings. The course homepage and transcript URL are not interchangeable; when the user provides the course homepage, match it according to the search reference reference.url, and do not pass it to --article-url. URLs retain query/fragment; do not remove parameters on your own. The same article can have multiple different original_note_id, and they must not be merged into a single highlight by article ID.
Creation, body editing, and record updating are three independent timelines. Use --created-from/to、--edited-from/to、--record-updated-from/toas needed; the value must be RFC3339 with a time zone; the interval's from is inclusive and to is exclusive. Do not treat updated_at as the body editing time. Convert the boundaries for "today/last week" according to the user's current date and time zone; the save time is not the article publication date, and do not arbitrarily interpret "recent" as a fixed one month. When the user also restricts the course/knowledge base, retain these conditions.
New parameters require the server-side corresponding meta.capabilities and applied_filters to be consistent with the request; when unsupported, stop that query and explain the need to upgrade the service/client, and do not automatically remove the filter. Validate the full set according to the pagination rules in the knowledge base reference; if you only fetch one page or perform one semantic search, you cannot say "all found."
Save workflow
Text and long-form content
- Preserve the user's original intent; do not expand on your own; when unspecified, do not add a knowledge base, parent note, tags, or public sharing.
- Short text can be passed as a parameter. Long text, Markdown, or content containing complex quotation marks or line breaks must use
--content-fileor--stdinto avoid truncation and escaping corruption. - When retrying the same creation, reuse the same
--idempotency-key。 - Only when the command exit code is 0 and a non-empty string
data.note.note_id、data.note.title、data.note.note_urlexists in the final structure should you reply that the save succeeded.
Links
- When it starts with
http://orhttps://and the user expresses an intent to save, save it as a link and do not treat it as ordinary text. - The CLI will poll the asynchronous task. During processing, you can tell the user "fetching and generating the note," but you must not give a success conclusion in advance.
- Final success must satisfy the three fields for text saving, and
data.notemust already be readable; do not concatenate the link yourself.
Images
- Use the local image path explicitly provided by the user in this turn; do not save the filename as text, and do not include historical images.
- The CLI will validate the actual file format, upload the image, and poll the recognition task.
- Only when the final note details return a valid
note_id/title/note_urldoes it count as success; "the image has been uploaded" is not "the note has been generated."
Asynchronous timeouts and safe retries
getnote save ... -o jsonnormally waits for the final result; if the exit code is non-zero and the output containstask_id、status=pending|processing, the operation result is still uncertain.- When the result is uncertain, use
getnote task <task_id> -o jsonto query the original task.done|successand after there is a validnote_id, then read the note; whenfailed, displayerror_msgormsg。 - After a timeout, stream interruption, or network error, do not directly save again; first query the original task or the most recent note. Only retry when the CLI/API explicitly
retryable=trueand it has been confirmed that the original operation did not succeed.
Querying and deep reading
- "Recent, list, what" uses
getnote notes; when there is an explicit book title or citation source, look it up via the source/knowledge base route above; only vague topics are handed to the search Skill. - When the user provides an ID, read the details directly; pass snowflake IDs through as strings exactly as they are at all times. "This note" only reuses the string ID already returned by the CLI and verified in the current session. If the current CLI cannot directly accept a certain kind of private link, first ask the user to provide the ID; do not extract, guess, or convert it to a number on your own.
- When the user only wants a list, display the title, string ID, and real
note_url. When the user explicitly wants the highlights, original text, or comments of a certain note or a certain source, after locating the matching candidate, read the details directly to fulfill the request without additionally waiting for the user to choose; ask the user to choose only when the candidate is still ambiguous and the target cannot be confirmed. - When unsure of the note type, first read
getnote note <id> -o json:- Quotes/links/text originals:
original; - Recordings, meetings, class verbatim transcripts:
transcript; - Images, audio, files:
attachments; - Chapter timestamps and meeting process:
chapters, readchapter_timeline.items, preserving the rule-parsed sourcesource; recording moments usetimeline, the two are not the same data; - User's on-the-spot quick notes:
quick-note; - Meeting to-dos:
todos, must preservesource, and must not describe rule-parsed results as upstream native to-dos.
- Quotes/links/text originals:
- Do not take
contentthe AI summaries in it and pass them off as the original text. - Marks are read from
getnote marksthedata.marks[]of, and do not use the Timeline's count or content as a substitute. For sprouts, list reports fromgetnote sprouts, then usegetnote sproutto read the body;has_sprout=falsetruthfully indicates that there is no readable report, and do not treat marks or note summaries as sprouts.
Modify, delete, and share
- First read the target note and the current version to confirm the object the user is referring to.
- Appending or prepending content must use the corresponding incremental semantics in the CLI's current help, not overwriting to simulate appending.
- Overwriting the body, replacing all tags, deleting, and public sharing must be confirmed first; only after confirmation use
--yes。 - When sharing recording-type notes, the confirmation wording must state whether the public link includes audio; when the user does not want the audio made public, use the
--exclude-audioin the CLI help. Do not decide the audio's public scope on the user's behalf by default. - When the user has not requested public sharing, only return the private
note_url, and do not automatically generate a share link.
Result and reply format for each command
| Command | Successful result must contain | Reply rule |
|---|---|---|
getnote save … -o json |
success=true、data.note.note_id/title/note_url |
Reply "Saved《Title》" and the real link. For links/images, when only task_id is obtained, it is not yet successful; continue checking the task. |
getnote task <task_id> -o json |
data.task_id/status/note_id?/msg?/error_msg? |
Only done/success and with note_id is it complete;pending/processing is processing;failed explains the real reason. |
getnote notes -o json |
data.notes[].note_id/title/note_url; new filter responses additionally have pagination |
Return the title, string ID, and real link. New filters paginate by pagination.has_more/next_cursor ; old responses with only no pagination paginate by has_more/cursor. Old total cannot be taken as the filtered count. |
getnote note <id> -o json |
data.note.note_id/title/note_url/note_type, read as needed content |
Provide the summary and link first; expand the private full text only when the user explicitly requests it. |
getnote note original <id> -o json |
data.note_id/title/original/original_source |
Only treat original as the original text; if the original text is unavailable, it fails, and comments or summaries must not be used to fill it in. |
getnote note transcript <id> -o json |
data.note_id/title/transcript |
Available only for audio-type notes; if unavailable, state so truthfully. |
getnote note attachments <id> -o json |
data.note_id/title/attachments[] |
List the actual attachments; do not pass off the note cover as an attachment. |
getnote note timeline <id> -o json |
data.note_id/title/timeline |
Display only when an audio/meeting timeline exists. |
getnote note chapters <id> -o json |
data.note_id/title/chapter_timeline |
items[].start_ms is in milliseconds; an empty array means there are no parseable chapters, and markers must not be used to fill it in. |
gnote note quick <id> -o json |
data.note_id/title/quick_note |
Return on-site quick notes; fall back in older environments to getnote note quick-note。 |
getnote note todos <id> -o json |
data.note_id/title/meeting_todos[] |
Keep each item's source; this is parsed by rule from explicit meeting summary sections, and must not be described as an upstream native to-do. |
getnote note update <id> … -o json |
success=true、data? |
Before modifying the body text or all tags, you must --yes; when the final content needs to be displayed, read note。 |
getnote note delete <id> --yes -o json |
success=true、data? |
You can only say "moved to trash", not permanently deleted. |
getnote note share <id> --yes -o json |
success=true、data.note_id/share_id/share_url |
Return only the real share_url, and make clear that it is a public link. |
On API failure, reply with the failed step,error.message/reason, whether it can be retried, and request_id; HTTP 200 must not be treated as business success.
In group chats or shared sessions, only show the necessary title and link first, and do not proactively expand the private full text.