Notes
API reference derived from the current plain-core schema. Check app.capabilities for feature support and app.access plus host permissions for authorization. Examples use synthetic values; replace paths, IDs, inputs and filters before calling.
Type Definitions
type Mutation {
createNote(input: NoteInput!): Note!
deleteNotes(query: String!): ActionResult!
exportNotes(query: String!): String!
restoreNotes(query: String!): ActionResult!
saveFeedEntriesToNotes(query: String!): [ID!]!
trashNotes(query: String!): ActionResult!
updateNote(id: ID!, input: NoteInput!): Note!
}
type Query {
note(id: ID!): Note
noteCount(query: String!): Int!
notes(query: String!, offset: Int!, limit: Int!): [Note!]!
}
type ActionResult {
affectedCount: Int!
}
scalar Instant
type Note {
id: ID!
title: String!
content: String!
deletedAt: Instant
createdAt: Instant!
updatedAt: Instant!
tags: [Tag!]!
}
input NoteInput {
title: String!
content: String!
}
type Tag {
id: ID!
name: String!
type: Int!
count: Int!
}Operations
createNote
Create and persist a note from the supplied input.
mutation createNote($input: NoteInput!) {
createNote(input: $input) { id title content deletedAt createdAt updatedAt }
}deleteNotes
Permanently delete trashed notes matching a query. Only operates on already-trashed notes.
mutation deleteNotes($query: String!) {
deleteNotes(query: $query) { affectedCount }
}exportNotes
Serialize notes matching a query (including tags) as a JSON string for backup/transfer.
mutation exportNotes($query: String!) {
exportNotes(query: $query)
}restoreNotes
Restore trashed notes matching a query.
mutation restoreNotes($query: String!) {
restoreNotes(query: $query) { affectedCount }
}saveFeedEntriesToNotes
Save matching feed entries as notes and return the created note IDs.
mutation saveFeedEntriesToNotes($query: String!) {
saveFeedEntriesToNotes(query: $query)
}trashNotes
Move notes matching a query to the trash.
mutation trashNotes($query: String!) {
trashNotes(query: $query) { affectedCount }
}updateNote
Update a stored note from the supplied input.
mutation updateNote($id: ID!, $input: NoteInput!) {
updateNote(id: $id, input: $input) { id title content deletedAt createdAt updatedAt }
}note
Fetch a single note by ID.
query note($id: ID!) {
note(id: $id) { id title content deletedAt createdAt updatedAt }
}noteCount
Count notes matching a query.
query noteCount($query: String!) {
noteCount(query: $query)
}notes
Search notes (title + content). Leave query empty to list all non-trashed notes.
query notes($query: String!, $offset: Int!, $limit: Int!) {
notes(query: $query, offset: $offset, limit: $limit) { id title content deletedAt createdAt updatedAt }
}