Create¶
POST /api/v1/notes_v2/create
Overview¶
Create a new-version note.
Body Request Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| title | string | Y | Note title Allow Empty: False |
| content | string | Y | Markdown content Allow Empty: False |
| tags | array | List of tags Allow Empty: False |
|
| tagKV | json | Key-value tags Allow Empty: False |
|
| isPublic | int | Whether the note is public: 1 for public, 0 for private, default 1 Allow Empty: False |
|
| extend | json | Studio business extension field Allow Empty: False |
|
| noteType | string | Note type: normal for regular notes, runbook for runbooks, statuspages for status page notes, default normal Allow Empty: False Valid values: ['normal', 'runbook', 'statuspages'] |
Additional Parameter Notes¶
Use this API to create a new-version note. The request body must include at least title and content; tags, tagKV, isPublic, and extend are optional.
- Do not pass the note storage path, and do not pass
noteUUID; after a successful creation, readnoteUUIDfrom the response. - If
isPublicis not passed, the note is public by default; pass0for a private note. - After successful creation, use the
noteUUIDfrom the response for subsequent retrieval, modification, and deletion. - The
etagin the response can be used asifMatchfor the first edit or deletion.
Request Example¶
curl 'https://openapi.guance.com/api/v1/notes_v2/create' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"title":"A","content":"# A","tags":["ops"],"tagKV":{"host":"127.0.0.1"}}'