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
etagfrom the details or the last save response asifMatch. contentcan be omitted when only modifying the title, tags, or public status.- After successful modification, please use the new
etagfrom 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"}'