API docs

zpe notes API

mount /notes · base https://zpe.vc/notes · v1.0.0 · 25 operations · 12 write · 2 need no account · beta

the document this app serves now. Contract: https://zpe.vc/notes/_/api/v1/openapi.json · sha256 c5e2f7a9a0c2

GET /_/api/v1/attachments Every image, video and file the account has listAttachments

Every image, video and file the account has

Parameters

nameinrequiredtypenotes
pagequerynointeger1-based page of 20.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200One page, newest first, drawn from the notes' own `pics`, `videos` and `files` columns.object
401No door session, or a session the door could not name.object
503The door did not answer.object

Example

Every image, video and file the account has, with a token from the door.

GET /_/api/v1/attachments
curl -X GET 'https://zpe.vc/notes/_/api/v1/attachments?page=1' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
{
  "attachments": [
    {}
  ],
  "hasMore": false
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

POST /_/api/v1/docs/node Create a doc file or folder createDocNode

Create a doc file or folder

Parameters

nameinrequiredtypenotes
Idempotency-KeyheadernostringNames one intent. A retry carrying the same key gets the first answer instead of a second row; the same key on a different operation is a 409.

Request body application/json · required

fieldtyperequirednotes
type"file" | "folder"yes
titlestringyes
parent_idstring | nullnoAbsent or null puts the node at the root.

Responses

statusmeaningbody
201The node as stored.object
400Not a JSON body, no title, or a type that is neither `file` nor `folder`.object
401No door session, or a session the door could not name.object
503The door did not answer.object

Example

Create a doc file or folder, with a token from the door.

POST /_/api/v1/docs/node
curl -X POST 'https://zpe.vc/notes/_/api/v1/docs/node' \
  -H 'Authorization: Bearer $ZPE_TOKEN' \
  -H 'content-type: application/json' \
  -d '{
  "type": "file",
  "title": "string",
  "parent_id": null
}'
201 application/json
{
  "id": "string",
  "type": "file",
  "title": "string",
  "content": null,
  "parent_id": null
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

GET /_/api/v1/docs/node/{id} Read one doc node getDocNode

Read one doc node

Parameters

nameinrequiredtypenotes
idpathyesstringThe note's id, or the doc node's uuid.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200The node and its body.object
401No door session, or a session the door could not name.object
404The node is not this account's.object
503The door did not answer.object

Example

Read one doc node, with a token from the door.

GET /_/api/v1/docs/node/{id}
curl -X GET 'https://zpe.vc/notes/_/api/v1/docs/node/string' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
{
  "id": "string",
  "type": "file",
  "title": "string",
  "content": null,
  "parent_id": null
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

PUT /_/api/v1/docs/node/{id} Save a doc node's body updateDocNode

Save a doc node's body

Parameters

nameinrequiredtypenotes
idpathyesstringThe note's id, or the doc node's uuid.

Request body application/json · required

fieldtyperequirednotes
contentstringyes

Responses

statusmeaningbody
200Saved.object
400No `content` string in the body.object
401No door session, or a session the door could not name.object
404The node is not this account's.object
503The door did not answer.object

Example

Save a doc node's body, with a token from the door.

PUT /_/api/v1/docs/node/{id}
curl -X PUT 'https://zpe.vc/notes/_/api/v1/docs/node/string' \
  -H 'Authorization: Bearer $ZPE_TOKEN' \
  -H 'content-type: application/json' \
  -d '{
  "content": "string"
}'
200 application/json
{
  "success": false,
  "id": "string"
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

PATCH /_/api/v1/docs/node/{id} Move a doc node under another folder moveDocNode

Move a doc node under another folder

Parameters

nameinrequiredtypenotes
idpathyesstringThe note's id, or the doc node's uuid.

Request body application/json · required

fieldtyperequirednotes
new_parent_idstring | nullnoNull moves the node to the root.

Responses

statusmeaningbody
200Moved, or already where the request asked.object
400Not a JSON body, or a destination that is this node's own descendant or another account's folder.object
401No door session, or a session the door could not name.object
404The node is not this account's.object
503The door did not answer.object

Example

Move a doc node under another folder, with a token from the door.

PATCH /_/api/v1/docs/node/{id}
curl -X PATCH 'https://zpe.vc/notes/_/api/v1/docs/node/string' \
  -H 'Authorization: Bearer $ZPE_TOKEN' \
  -H 'content-type: application/json' \
  -d '{
  "new_parent_id": null
}'
200 application/json
{
  "success": false,
  "message": "string"
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

DELETE /_/api/v1/docs/node/{id} Delete a doc node and its subtree deleteDocNode

Delete a doc node and its subtree

Parameters

nameinrequiredtypenotes
idpathyesstringThe note's id, or the doc node's uuid.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200Deleted, naming every id the delete took with it.object
401No door session, or a session the door could not name.object
404The node is not this account's.object
503The door did not answer.object

Example

Delete a doc node and its subtree, with a token from the door.

DELETE /_/api/v1/docs/node/{id}
curl -X DELETE 'https://zpe.vc/notes/_/api/v1/docs/node/string' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
{
  "success": false,
  "deletedIds": [
    "string"
  ]
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

POST /_/api/v1/docs/node/{id}/rename Rename a doc node renameDocNode

Rename a doc node

Parameters

nameinrequiredtypenotes
idpathyesstringThe note's id, or the doc node's uuid.

Request body application/json · required

fieldtyperequirednotes
new_titlestringyes

Responses

statusmeaningbody
200Renamed.object
400No title in the body, or a blank one.object
401No door session, or a session the door could not name.object
404The node is not this account's.object
503The door did not answer.object

Example

Rename a doc node, with a token from the door.

POST /_/api/v1/docs/node/{id}/rename
curl -X POST 'https://zpe.vc/notes/_/api/v1/docs/node/string/rename' \
  -H 'Authorization: Bearer $ZPE_TOKEN' \
  -H 'content-type: application/json' \
  -d '{
  "new_title": "string"
}'
200 application/json
{
  "success": false,
  "new_title": "string"
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

GET /_/api/v1/docs/tree The account's docs tree docsTree

The account's docs tree

Parameters

nameinrequiredtypenotes
cursorquerynostringThe `x-next-cursor` value from the previous page. A keyset cursor, not an offset, so a write during the walk neither repeats nor skips a row.
limitquerynointegerHow many rows this page carries. Default 100 for tags, 200 for the docs tree; the most a page returns is 500.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200One page of the tree, one level per parent.array of object
401No door session, or a session the door could not name.object
503The door did not answer.object

Example

The account's docs tree, with a token from the door.

GET /_/api/v1/docs/tree
curl -X GET 'https://zpe.vc/notes/_/api/v1/docs/tree?cursor=string&limit=0' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
[
  {
    "id": "string",
    "type": "file",
    "title": "string",
    "parent_id": null,
    "children": [
      {}
    ]
  }
]

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

GET /_/api/v1/files/{noteId}/{fileId} Download one attachment downloadAttachment

Download one attachment

Parameters

nameinrequiredtypenotes
fileIdpathyesstringThe attachment's id, as the note's `files` array names it.
noteIdpathyesintegerThe note the attachment belongs to. Checked against the account before storage is read.
previewquerynoboolean`true` asks the browser to render rather than download.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200The object, with the content type it was stored under. Text-like files are served as `text/plain` so a stored page cannot run in the app's origin.string (binary)
400The note id is not a whole number.object
401No door session, or a session the door could not name.object
404The note is not this account's, or the object is not in storage.object
503The door did not answer, or this deployment has no R2 bucket bound.object

Example

Download one attachment, with a token from the door.

GET /_/api/v1/files/{noteId}/{fileId}
curl -X GET 'https://zpe.vc/notes/_/api/v1/files/0/string?preview=false' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/octet-stream
"string"

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

GET /_/api/v1/notes List the account's notes listNotes

List the account's notes

Parameters

nameinrequiredtypenotes
archivedquerynoboolean`true` lists archived notes instead of live ones.
endTimestampquerynointegerUnix seconds, exclusive. Used together with `startTimestamp`.
favoritesquerynoboolean`true` limits the answer to favorited notes.
pagequerynointeger1-based page of ten notes. A page below one is read as one.
startTimestampquerynointegerUnix seconds. Used together with `endTimestamp`; alone it is ignored.
tagquerynostringOnly notes carrying this tag, lowercased by the writer.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200One page of notes, newest first with pinned rows on top.object
401No door session, or a session the door could not name.object
503The door did not answer, so this app cannot say whose rows these are.object

Example

List the account's notes, with a token from the door.

GET /_/api/v1/notes
curl -X GET 'https://zpe.vc/notes/_/api/v1/notes?archived=false&endTimestamp=0&favorites=false&page=1&startTimestamp=0&tag=string' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
{
  "notes": [
    {
      "id": 0,
      "account_id": "string",
      "content": "string",
      "files": [
        {
          "id": "string",
          "name": "string",
          "size": 0,
          "type": "string"
        }
      ],
      "created_at": 0,
      "updated_at": 0,
      "is_pinned": 0,
      "is_favorited": 0,
      "is_archived": 0,
      "pics": null,
      "videos": "string"
    }
  ],
  "hasMore": false
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

POST /_/api/v1/notes Create a note, with attachments createNote

Create a note, with attachments

Parameters

nameinrequiredtypenotes
Idempotency-KeyheadernostringNames one intent. A retry carrying the same key gets the first answer instead of a second row; the same key on a different operation is a 409.

Request body multipart/form-data · required

fieldtyperequirednotes
contentstringno
filearray of string (binary)noStored under the account's prefix. Image parts are not stored: upstream put images in the note's markdown instead.

Responses

statusmeaningbody
201The note as stored.object
400No text and no file, and no multipart body at all.object
401No door session, or a session the door could not name.object
503The door did not answer, or this deployment has no R2 bucket bound so the attachment cannot be stored.object

Example

Create a note, with attachments, with a token from the door.

POST /_/api/v1/notes
curl -X POST 'https://zpe.vc/notes/_/api/v1/notes' \
  -H 'Authorization: Bearer $ZPE_TOKEN' \
  -H 'content-type: application/json' \
  -d '{
  "content": "string",
  "file": [
    "string"
  ]
}'
201 application/json
{
  "id": 0,
  "account_id": "string",
  "content": "string",
  "files": [
    {
      "id": "string",
      "name": "string",
      "size": 0,
      "type": "string"
    }
  ],
  "created_at": 0,
  "updated_at": 0,
  "is_pinned": 0,
  "is_favorited": 0,
  "is_archived": 0,
  "pics": null,
  "videos": "string"
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

POST /_/api/v1/notes/merge Merge one note into another mergeNotes

Merge one note into another

Parameters

No parameters.

Request body application/json · required

fieldtyperequirednotes
sourceNoteIdintegeryesThe note that is absorbed and removed.
targetNoteIdintegeryesThe note that survives and grows.
addSeparatorbooleanno`true` joins the two bodies with a horizontal rule.

Responses

statusmeaningbody
200The target, after the merge.object
400Not a JSON body, the two ids are equal, or one is not a whole number.object
401No door session, or a session the door could not name.object
404One or both notes are not this account's.object
503The door did not answer.object

Example

Merge one note into another, with a token from the door.

POST /_/api/v1/notes/merge
curl -X POST 'https://zpe.vc/notes/_/api/v1/notes/merge' \
  -H 'Authorization: Bearer $ZPE_TOKEN' \
  -H 'content-type: application/json' \
  -d '{
  "sourceNoteId": 0,
  "targetNoteId": 0,
  "addSeparator": false
}'
200 application/json
{
  "id": 0,
  "account_id": "string",
  "content": "string",
  "files": [
    {
      "id": "string",
      "name": "string",
      "size": 0,
      "type": "string"
    }
  ],
  "created_at": 0,
  "updated_at": 0,
  "is_pinned": 0,
  "is_favorited": 0,
  "is_archived": 0,
  "pics": null,
  "videos": "string"
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

GET /_/api/v1/notes/timeline Counts of notes by year, month and day notesTimeline

Counts of notes by year, month and day

Parameters

nameinrequiredtypenotes
timezonequerynostringAn IANA name. An unrecognised one falls back to UTC rather than failing.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200A nested count tree, over the account's 5000 most recent notes.object
401No door session, or a session the door could not name.object
503The door did not answer.object

Example

Counts of notes by year, month and day, with a token from the door.

GET /_/api/v1/notes/timeline
curl -X GET 'https://zpe.vc/notes/_/api/v1/notes/timeline?timezone=UTC' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
{}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

GET /_/api/v1/notes/{id} Read one note, for the editor getNote

Read one note, for the editor

Parameters

nameinrequiredtypenotes
idpathyesstringThe note's id, or the doc node's uuid.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200The note, its attachments and its tags.object
400The id is not a whole number.object
401No door session, or a session the door could not name.object
404The note is not this account's, and for this caller it does not exist.object
503The door did not answer.object

Example

Read one note, for the editor, with a token from the door.

GET /_/api/v1/notes/{id}
curl -X GET 'https://zpe.vc/notes/_/api/v1/notes/string' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
{
  "id": 0,
  "account_id": "string",
  "content": "string",
  "files": [
    {
      "id": "string",
      "name": "string",
      "size": 0,
      "type": "string"
    }
  ],
  "created_at": 0,
  "updated_at": 0,
  "is_pinned": 0,
  "is_favorited": 0,
  "is_archived": 0,
  "pics": null,
  "videos": "string",
  "tags": [
    "string"
  ]
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

PUT /_/api/v1/notes/{id} Edit a note, its attachments and its mood editNote

Edit a note, its attachments and its mood

Parameters

nameinrequiredtypenotes
idpathyesstringThe note's id, or the doc node's uuid.

Request body multipart/form-data · required

fieldtyperequirednotes
contentstringno
filesToDeletestringnoA JSON array of attachment ids, as multipart parts are strings.
filearray of string (binary)no
update_timestamp"true" | "false"no`false` keeps the old `updated_at`.
isPinned"true" | "false"no
isFavorited"true" | "false"no
is_archived"true" | "false"no

Responses

statusmeaningbody
200The note after the edit, plus its tags. Or `{success, noteDeleted}` when the edit emptied it.object
400The id is not a whole number, or the body is not multipart.object
401No door session, or a session the door could not name.object
404The note is not this account's, and for this caller it does not exist.object
503The door did not answer, or this deployment has no R2 bucket bound.object

Example

Edit a note, its attachments and its mood, with a token from the door.

PUT /_/api/v1/notes/{id}
curl -X PUT 'https://zpe.vc/notes/_/api/v1/notes/string' \
  -H 'Authorization: Bearer $ZPE_TOKEN' \
  -H 'content-type: application/json' \
  -d '{
  "content": "string",
  "filesToDelete": "string",
  "file": [
    "string"
  ],
  "update_timestamp": "true",
  "isPinned": "true",
  "isFavorited": "true",
  "is_archived": "true"
}'
200 application/json
{
  "id": 0,
  "account_id": "string",
  "content": "string",
  "files": [
    {
      "id": "string",
      "name": "string",
      "size": 0,
      "type": "string"
    }
  ],
  "created_at": 0,
  "updated_at": 0,
  "is_pinned": 0,
  "is_favorited": 0,
  "is_archived": 0,
  "pics": null,
  "videos": "string",
  "tags": [
    "string"
  ]
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

DELETE /_/api/v1/notes/{id} Delete a note and its attachments deleteNote

Delete a note and its attachments

Parameters

nameinrequiredtypenotes
idpathyesstringThe note's id, or the doc node's uuid.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
204Deleted. Nothing in the body.
400The id is not a whole number.object
401No door session, or a session the door could not name.object
404The note is not this account's, and for this caller it does not exist.object
503The door did not answer.object

Example

Delete a note and its attachments, with a token from the door.

DELETE /_/api/v1/notes/{id}
curl -X DELETE 'https://zpe.vc/notes/_/api/v1/notes/string' \
  -H 'Authorization: Bearer $ZPE_TOKEN'

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

POST /_/api/v1/notes/{id}/share Share a note to a public address shareNote

Share a note to a public address

Parameters

nameinrequiredtypenotes
idpathyesstringThe note's id, or the doc node's uuid.

Request body application/json · required

fieldtyperequirednotes
expirationTtlintegernoSeconds the link lives. Defaults to 3600; zero means it never lapses.

Responses

statusmeaningbody
200The link: the same one a second share returns, and no shorter a life than before.object
400The id is not a whole number.object
401No door session, or a session the door could not name.object
404The note is not this account's.object
503The door did not answer.object

Example

Share a note to a public address, with a token from the door.

POST /_/api/v1/notes/{id}/share
curl -X POST 'https://zpe.vc/notes/_/api/v1/notes/string/share' \
  -H 'Authorization: Bearer $ZPE_TOKEN' \
  -H 'content-type: application/json' \
  -d '{
  "expirationTtl": 0
}'
200 application/json
{
  "publicId": "string",
  "displayUrl": "string",
  "rawUrl": "string",
  "expiresAt": null
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

DELETE /_/api/v1/notes/{id}/share Revoke a note's public link revokeNoteShare

Revoke a note's public link

Parameters

nameinrequiredtypenotes
idpathyesstringThe note's id, or the doc node's uuid.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200Revoked, whether or not a link was live.object
400The id is not a whole number.object
401No door session, or a session the door could not name.object
404The note is not this account's.object
503The door did not answer.object

Example

Revoke a note's public link, with a token from the door.

DELETE /_/api/v1/notes/{id}/share
curl -X DELETE 'https://zpe.vc/notes/_/api/v1/notes/string/share' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
{
  "success": false,
  "message": "string"
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

GET /_/api/v1/public/note/raw/{public_id} Read a shared note's text, as plain text getPublicNoteRaw no account

Read a shared note's text, as plain text

Parameters

nameinrequiredtypenotes
public_idpathyesstringThe uuid the share link carries.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200The note's text, exactly as written.string
404No live share answers to this id.object

Example

Read a shared note's text, as plain text.

GET /_/api/v1/public/note/raw/{public_id}
curl -X GET 'https://zpe.vc/notes/_/api/v1/public/note/raw/string'
200 text/plain
"string"

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

GET /_/api/v1/public/note/{public_id} Read a shared note by its public id getPublicNote no account

Read a shared note by its public id

Parameters

nameinrequiredtypenotes
public_idpathyesstringThe uuid the share link carries. The address IS the capability: no principal is asked for.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200The shared note's text. Its attachments are not shared.object
404No live share answers to this id: it was never shared, it was revoked, or it lapsed.object

Example

Read a shared note by its public id.

GET /_/api/v1/public/note/{public_id}
curl -X GET 'https://zpe.vc/notes/_/api/v1/public/note/string'
200 application/json
{
  "content": "string",
  "updated_at": 0,
  "files": [
    {
      "id": "string",
      "name": "string",
      "size": 0,
      "type": "string"
    }
  ]
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

GET /_/api/v1/search Search the account's notes searchNotes

Search the account's notes

Parameters

nameinrequiredtypenotes
endTimestampquerynointegerUnix seconds, exclusive. Used together with `startTimestamp`.
favoritesquerynoboolean`true` limits the answer to favorited notes.
pagequerynointeger1-based page of ten notes. A page below one is read as one.
qquerynostringA prefix match over the note text. Under two characters the answer is empty rather than a full scan; empty falls back to the listing.
startTimestampquerynointegerUnix seconds. Used together with `endTimestamp`; alone it is ignored.
tagquerynostringOnly notes carrying this tag, lowercased by the writer.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200One page of matching notes.object
401No door session, or a session the door could not name.object
503The door did not answer.object

Example

Search the account's notes, with a token from the door.

GET /_/api/v1/search
curl -X GET 'https://zpe.vc/notes/_/api/v1/search?endTimestamp=0&favorites=false&page=1&q=string&startTimestamp=0&tag=string' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
{
  "notes": [
    {
      "id": 0,
      "account_id": "string",
      "content": "string",
      "files": [
        {
          "id": "string",
          "name": "string",
          "size": 0,
          "type": "string"
        }
      ],
      "created_at": 0,
      "updated_at": 0,
      "is_pinned": 0,
      "is_favorited": 0,
      "is_archived": 0,
      "pics": null,
      "videos": "string"
    }
  ],
  "hasMore": false
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

GET /_/api/v1/settings Read the account's settings document getSettings

Read the account's settings document

Parameters

No parameters.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200The stored document, or the defaults when the account has never saved one.object
401No door session, or a session the door could not name.object
503The door did not answer.object

Example

Read the account's settings document, with a token from the door.

GET /_/api/v1/settings
curl -X GET 'https://zpe.vc/notes/_/api/v1/settings' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
{}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

PUT /_/api/v1/settings Replace the account's settings document putSettings

Replace the account's settings document

Parameters

No parameters.

Request body application/json · required

The document declares no properties for this body.

Responses

statusmeaningbody
200Saved.object
400The body is not a JSON object.object
401No door session, or a session the door could not name.object
503The door did not answer.object

Example

Replace the account's settings document, with a token from the door.

PUT /_/api/v1/settings
curl -X PUT 'https://zpe.vc/notes/_/api/v1/settings' \
  -H 'Authorization: Bearer $ZPE_TOKEN' \
  -H 'content-type: application/json' \
  -d '{}'
200 application/json
{
  "success": false
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

GET /_/api/v1/stats Note, tag and age counts for the account noteStats

Note, tag and age counts for the account

Parameters

No parameters.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200Three counts over the account's own rows.object
401No door session, or a session the door could not name.object
503The door did not answer.object

Example

Note, tag and age counts for the account, with a token from the door.

GET /_/api/v1/stats
curl -X GET 'https://zpe.vc/notes/_/api/v1/stats' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
{
  "memos": 0,
  "tags": 0,
  "oldestNoteTimestamp": null
}

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.

GET /_/api/v1/tags The account's tags, most used first listTags

The account's tags, most used first

Parameters

nameinrequiredtypenotes
cursorquerynostringThe `x-next-cursor` value from the previous page. A keyset cursor, not an offset, so a write during the walk neither repeats nor skips a row.
limitquerynointegerHow many rows this page carries. Default 100 for tags, 200 for the docs tree; the most a page returns is 500.

Request body

None: this operation takes its arguments in the path and the query.

Responses

statusmeaningbody
200One page of the tags this account has used, most used first, then by name.array of object
401No door session, or a session the door could not name.object
503The door did not answer.object

Example

The account's tags, most used first, with a token from the door.

GET /_/api/v1/tags
curl -X GET 'https://zpe.vc/notes/_/api/v1/tags?cursor=string&limit=0' \
  -H 'Authorization: Bearer $ZPE_TOKEN'
200 application/json
[
  {
    "name": "string",
    "count": 0
  }
]

The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.