Skip to content

Export



GET /api/v1/notes/{notes_uuid}/export

Overview

Exports a legacy note and its chart definitions for later import.

Prerequisites and Usage Steps

Get the note UUID from the Note List. Keep content in the response as the template. You can create an empty note in the target workspace and then apply the template through Import Note. If you only need to change the exported name, pass name.

Path Parameters

Parameter Type Required Description
notes_uuid string Y UUID of the target legacy note.
Example: note_example
How to get or fill: 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 of the workspace.
Example: <DF-API-KEY>
How to get or fill: Obtain an OpenAPI Key with the required permission from API Key Management in the target workspace.

Query Parameters

Parameter Type Required Description
name string Optional. Replaces the name in the exported content; it is not saved to the source note.
Example: Inspection Template
How to get or fill: Enter the name to use for the template and URL-encode it as a normal query parameter.

Additional Parameter Notes

Returns the template JSON; save content and use it as templateInfo later.

Request Example

curl --get 'https://openapi.guance.com/api/v1/notes/note_example/export' \
  -H 'DF-API-KEY: <DF-API-KEY>'

Response

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

Field Type Description
content.name string Note name in the template.
content.extend object Note extension configuration.
content.main object Note content definition.
content.main.charts array<object> Chart definitions exported in the order saved in the note.
content.main.charts[].name string Name of the exported chart.
content.main.charts[].type string Type of the exported chart.
content.main.charts[].queries array<object> Chart queries or content definitions.
content.main.charts[].extend object Chart extension configuration.
content.declaration object or null Public declaration of the workspace.
{
  "code": 200,
  "content": {
    "name": "Production Inspection Note",
    "extend": {},
    "main": {
      "charts": [
        {
          "name": "Inspection Description",
          "type": "text",
          "queries": [
            {
              "query": {
                "content": "Verify production status against the dashboard."
              }
            }
          ],
          "extend": {}
        }
      ]
    },
    "declaration": {}
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Response

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

If the target does not exist or does not belong to the current workspace, the request may return success with an empty object; when name is passed, the response may also contain only the template name and declaration. Verify that main.charts is returned before using the template.

Feedback

Is this page helpful?