Skip to content

Modify



POST /api/v1/notes_v2/{note_uuid}/modify

Overview

Modify a new version note.

Route Parameters

Parameter Name Type Required Description
note_uuid string Y Studio new version note UUID

Body Request Parameters

Parameter Name Type Required Description
title string Note title
Allow empty: False
content string Markdown content
Allow empty: False
tags array Tag list
Allow empty: False
tagKV json Key-value tags
Allow empty: False
isPublic int Whether public, 1 public, 0 private
Allow empty: False
ifMatch string Optional ETag, forwarded to NbookDB If-Match when provided
Allow empty: False
extend json Studio business extension fields
Allow empty: False

Parameter Supplementary Description

Use the note_uuid in the URL to modify the note. The request body can include one or more fields among title, content, tags, tagKV, isPublic, and extend.

  • It is recommended to pass the etag from the details or the last save response as ifMatch.
  • content can be omitted when only modifying the title, tags, or public status.
  • After successful modification, please use the new etag from the response to update the local editing state.
  • Private notes can only be modified by the creator; public notes require the current API Key to have write permissions.

Request Example

curl 'https://openapi.guance.com/api/v1/notes_v2/nbnote_xxx/modify' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"title":"A v2","content":"# A v2","ifMatch":"etag_xxx"}'

Response

{
    "code": 200,
    "content": {
        "noteUUID": "nbnote_xxx",
        "title": "A v2",
        "tags": [
            "ops"
        ],
        "tagKV": {
            "host": "127.0.0.2"
        },
        "isPublic": 1,
        "createdSource": "manual",
        "etag": "etag_new",
        "version": -1
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-XXXX"
}

Feedback

Is this page helpful? ×