Documentation Index
Fetch the complete documentation index at: https://www.plain.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Using TypeScript? Check out our GraphQL SDK for a fully typed client.
You can fetch snippets either as a paginated collection or by ID.
These queries require the following permissions:
Get snippets
query getSnippets($first: Int = 50, $after: String) {
snippets(first: $first, after: $after) {
edges {
node {
id
name
text
markdown
path
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
Get a snippet by ID
query getSnippet($snippetId: ID!) {
snippet(snippetId: $snippetId) {
id
name
text
markdown
path
}
}
{
"snippetId": "sn_01HXXXXXXXXXXXXXXXXXXXXXXX"
}