Skip to content

List



POST /api/v1/notes_v2/list

Overview

List the new notes visible to the account of the current API Key.

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 content
Allow empty: False
query string Search term for title and content, with higher priority than search
Allow empty: False
tags array Global tag filtering. When multiple tags are passed, the default matching logic is OR
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 defaults to OR matching
Allow empty: False
Optional values: ['and', 'or']
createdSource string Creation source filtering, e.g., manual or ai
Allow empty: False
noteType string Note type filtering. normal for regular notes, runbook for runbooks
Allow empty: False
Optional values: ['normal', 'runbook']

Additional Parameter Notes

Use this endpoint to retrieve a summary of new notes accessible by the current API Key in the current workspace.

  • For pagination, provide both pageIndex and pageSize.
  • To search by title or content, pass search or query. When both are provided, 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 to tags and tagMode is not provided, the matching logic defaults to OR.
  • The list response does not include Markdown content. To read the full content, call the detail endpoint.
  • Subsequent operations (retrieve, modify, delete) 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",
                "noteType": "normal",
                "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? ×