Skip to content

List



POST /api/v1/notes_v2/list

Overview

List the new version notes visible to the account to which the current API Key belongs.

Body Request Parameters

Parameter Name Type Required Description
pageIndex integer Page number
Allow empty: False
pageSize integer Number of items per page
Allow empty: False
search string Search term for title and body
Allow empty: False
query string Search term for title and body, takes precedence over search
Allow empty: False
tags array Global tag filtering, multiple tags default to OR matching
Allow empty: False
tagKV json Key-value tag filtering, e.g., {"host":"127.0.0.1"}
Allow empty: False
tagKVQuery string Key-value tag expression filtering, e.g., host:"127.0.0.1"
Allow empty: False
tagMode string Tag matching mode, when not provided, tags default to OR matching
Allow empty: False
Optional values: ['and', 'or']
createdSource string Creation source filtering, e.g., manual or ai
Allow empty: False

Parameter Supplementary Instructions

Use this interface to obtain summaries of the new version notes accessible by the current API Key in the current workspace.

  • When pagination is needed, pass both pageIndex and pageSize.
  • To search by title or body, pass search, or you can pass query; if both exist, query takes precedence.
  • To filter by tags, pass tags, tagKV, or tagKVQuery, e.g., tagKVQuery: "host:\"127.0.0.1\""; when multiple values are passed for tags and tagMode is not provided, OR matching is applied.
  • The list response does not include the Markdown body; to read the body, call the detail interface.
  • Subsequent retrieval, modification, and deletion all use the noteUUID from the response.

Request Example

curl 'https://openapi.guance.com/api/v1/notes_v2/list' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"pageIndex":1,"pageSize":20,"search":"host","tagKVQuery":"host:\"127.0.0.1\""}'

Response

{
    "code": 200,
    "content": {
        "data": [
            {
                "noteUUID": "nbnote_xxx",
                "title": "A",
                "name": "A",
                "tags": [
                    "ops"
                ],
                "tagKV": {
                    "host": "127.0.0.1"
                },
                "isPublic": 1,
                "createdSource": "manual",
                "etag": "etag_xxx",
                "version": 1,
                "createAt": 1782370000,
                "updateAt": 1782370100
            }
        ],
        "pageInfo": {
            "pageIndex": -1,
            "pageSize": 20,
            "totalCount": 1
        }
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-XXXX"
}

Feedback

Is this page helpful? ×