Obsidian Vault REST API icon

Obsidian Vault REST API

Interact with Obsidian Vault via REST API

Overview

The "Replace Note" operation in the Notes resource allows users to completely replace the content of an existing note identified by its path. This node is useful when you want to update or overwrite a note's entire content and metadata (front matter) in an Obsidian Vault via its REST API.

Typical use cases include:

  • Automating updates to notes with new content or metadata.
  • Synchronizing notes from external sources or other systems.
  • Bulk replacing notes during migrations or content restructuring.

For example, you might replace a note at path projects/todo.md with updated front matter specifying project status and new markdown content describing tasks.

Properties

Name Meaning
Path The file path of the note to replace. This identifies which note will be overwritten.
Front Matter JSON object representing the YAML front matter metadata of the note.
Content The main body content of the note as a string, typically markdown text.

Output

The node outputs JSON data representing the response from the Obsidian Vault REST API after replacing the note. This typically includes confirmation of the replaced note's details or status. There is no binary output.

Dependencies

  • Requires access to an Obsidian Vault REST API endpoint.
  • Needs an API host URL configured in credentials.
  • Uses JSON for front matter and content payloads.
  • Requires network connectivity to the Obsidian Vault server.

Troubleshooting

  • Invalid Path: If the specified path does not exist or is invalid, the API may return an error indicating the note cannot be found or created. Verify the path format and existence.
  • Malformed Front Matter JSON: Ensure the front matter input is valid JSON; otherwise, parsing errors will occur.
  • API Connectivity Issues: Network problems or incorrect host configuration can cause request failures. Check credentials and network access.
  • Permission Denied: If the API requires authentication, ensure the correct API key or token is provided.

Links and References

Discussion