Skip to content

Modify



POST /api/v1/notes/{notes_uuid}/modify

Overview

Update the name and specified configuration of a legacy note.

Before Calling and Usage Steps

First use Note Details to confirm the target and current name. The request must still include name; you can pass the original value. If chartUUIDs is omitted, the original references are retained. Passing the complete array replaces the order and soft-deletes old charts that are removed. Passing [] removes all original references. To rebuild charts, use the import endpoint. Export a backup before sending.

Path Parameters

Parameter Type Required Description
notes_uuid string Y UUID of the target legacy note.
Example: note_example
How to obtain or enter: Obtain it from content.data[].uuid in the Note List, or use content.uuid from the create response.

Request Headers

Parameter Type Required Description
DF-API-KEY string Y OpenAPI authentication credential for the Workspace.
Example: <DF-API-KEY>
How to obtain or enter: Obtain an OpenAPI Key with permission for this operation from API Key Management in the target Workspace.

Body Request Parameters

Parameter Type Required Description
name string Y Required. Updated note name, up to 128 characters.
Allows null: False
Maximum length: 128
Example: 生产巡检笔记 v2
How to obtain or enter: If you do not rename the note, get content.name from Note Details and submit it as is.
chartUUIDs array Maximum total: 32. Pass only when you need to modify chart references.
Allows null: False
Maximum length: 32
Example: ["chrt_example"]
How to obtain or enter: Obtain it from content.charts[].uuid in Note Details for the target note, and submit the complete list in the desired order.
extend json When submitted, replaces the entire extension object; when omitted, the original value is retained.
Allows null: False
Example: {}
How to obtain or enter: Preferably copy the existing configuration from content.extend in Note Details or extend in the template.

Additional Parameter Notes

The update response returns the old name in oldName. To verify the current chart list, query Note Details again.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/notes/note_example/modify' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"name":"生产巡检笔记 v2"}'

Response

HTTP 200, application/json. The example below shows the main fields that can be read directly.

Field Type Description
content.id integer Note record ID.
content.uuid string Note UUID, used for querying, modifying, importing, and deleting.
content.name string Note name.
content.workspaceUUID string Workspace it belongs to.
content.isPublic integer Visibility. 1 is public, 0 is creator identity only.
content.extend object Note extension configuration.
content.status integer Current note status.
content.creator string Creator identity ID.
content.updator string Identity ID of the most recent updater; can be empty if the note has not been updated.
content.createAt number Creation time, in Unix seconds.
content.updateAt number Last update time, in Unix seconds. Can be -1 if the note has not been updated.
content.deleteAt number Deletion time, in Unix seconds. -1 if the note has not been deleted.
content.oldName string Name before modification.
content.declaration object or null Public declaration of the Workspace.
{
  "code": 200,
  "content": {
    "id": 11,
    "uuid": "note_example",
    "name": "生产巡检笔记 v2",
    "workspaceUUID": "wksp_example",
    "isPublic": 1,
    "extend": {},
    "status": 0,
    "creator": "wsak_example",
    "updator": "wsak_example",
    "createAt": 1785427200,
    "updateAt": 1785427320,
    "deleteAt": -1,
    "oldName": "生产巡检笔记",
    "declaration": {}
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Responses

For authentication, rate limiting, and common request errors, see Common Error Definitions.

HTTP Status errorCode Trigger Condition Message or Response Description Resolution
406 ft.ParameterValidationFailed A request field is missing, or a field value violates the declared validation conditions Parameter parsing failed Check the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError The request JSON syntax is invalid Request JSON format error Correct the JSON according to content.reason, line, and column.
400 ft.JsonFormatError The JSON syntax is valid, but the request top level is not an object Some JSON file format errors Put the parameters into a JSON object, then retry.
404 ft.NotFoundNote The UUID has been deleted, does not exist, or is not in the Workspace of the current API Key Specified note not found Verify the UUID using the note list in the same Workspace.

Feedback

Is this page helpful?