### Launch Obsidian URI via Terminal (Linux) Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Getting started.md Utilizes the `xdg-open` command on Linux to launch an Obsidian Advanced URI. ```bash xdg-open "obsidian://adv-uri?filepath=Home%20Index%2Ftoday" ``` -------------------------------- ### Launch Obsidian URI from Obsidian Link Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Getting started.md Shows how to embed an Obsidian Advanced URI within a Markdown link to launch it directly from within Obsidian. ```md [This here is shown](obsidian://adv-uri?filepath=Home%20Index%2Ftoday) ``` -------------------------------- ### Launch Obsidian URI via Terminal (Windows PowerShell) Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Getting started.md Uses the `Start-Process` cmdlet in Windows PowerShell to launch an Obsidian Advanced URI. ```powershell Start-Process "obsidian://adv-uri?filepath=test" ``` -------------------------------- ### Create Obsidian Advanced URI Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Getting started.md Constructs a basic Obsidian Advanced URI to open a specific file, demonstrating the need for encoding special characters in file paths. ```uri obsidian://adv-uri?filepath=Home%20Index%2Ftoday ``` -------------------------------- ### Launch Obsidian URI via Terminal (macOS) Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Getting started.md Demonstrates launching an Obsidian Advanced URI using the `open` command on macOS, with the `--background` flag to keep the application running in the background. ```bash open --background "obsidian://adv-uri?vault=my-vault&filename=my-file&data=my-data" ``` -------------------------------- ### Open Bookmark URI Example - URI Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/i18n/zh-CN/actions/bookmarks.md This example demonstrates how to construct a URI to open a specific bookmark within Obsidian. It requires the vault name, the bookmark title, and optionally an open mode. ```uri obsidian://adv-uri?vault=&bookmark=&openmode=tab ``` -------------------------------- ### YAML Frontmatter Example Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Frontmatter.md Demonstrates the standard YAML frontmatter structure enclosed by triple hyphens, used for storing metadata like titles and tags. ```yaml --- title: My Title tags: [tag1, tag2] --- ``` -------------------------------- ### Obsidian Advanced URI - Update Plugins Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Miscellaneous.md Updates all community plugins installed in Obsidian. ```APIDOC ## GET / ### Description Updates all community plugins installed in Obsidian. ### Method GET ### Endpoint / ### Parameters #### Query Parameters - **updateplugins** (boolean) - Required - Set to `true` to trigger the plugin update. ### Response #### Success Response (200) - **Result** (string) - A confirmation message indicating that plugins are being updated. ### Response Example ``` Updating plugins... ``` ``` -------------------------------- ### Basic Advanced URI Structure Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Concepts/Schema.md Illustrates the fundamental format of an Obsidian Advanced URI, starting with 'obsidian://adv-uri' and using query parameters separated by '&'. Values must be properly encoded. ```url obsidian://adv-uri?key1=value1&key2=value2 ``` -------------------------------- ### Close Specific Tab by Filepath using Obsidian Advanced URI Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Commands.md This example demonstrates how to close a specific tab in Obsidian using its filepath. It utilizes the 'commandid' parameter to execute the 'workspace:close' command, targeting the tab identified by the 'filepath' parameter. ```uri obsidian://adv-uri?vault=&filepath=&commandid=workspace%3Aclose ``` -------------------------------- ### Open Mode Configuration Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Concepts/Navigation Parameters.md Determines how a file is opened, whether in a new pane, the current pane, a split, a tab, or silently. Also includes options for popover and window. ```APIDOC ## Open mode Every action opening a pane supports the parameter `openmode`. Accepted values: - `true` opens file in new pane if not already opened - `false` opens file in current pane if not already opened - `window` - `split` - `tab` - `silent` doesn't open the file - `popover` which requires the [Hover Editor plugin](obsidian://show-plugin?id=obsidian-hover-editor) to be installed and enabled If the file is already opened in another pane, it gets focused. You can set a default value in the plugin's settings. The value from the setting gets overwritten by specifying it in the URI. ``` -------------------------------- ### Insert Templater Templates via URI Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Tips/Tips and Tricks.md This snippet shows how to insert templates using the Templater plugin via the Advanced URI command. It requires the 'obsidian-hotkeys-for-templates' plugin and specifies the command ID format for Templater templates. ```text obsidian-hotkeys-for-templates:templater: ``` -------------------------------- ### Clipboard Integration and Special Parameters Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Writing.md Utilize clipboard content for file operations and leverage special parameters like `daily`, `clipboard`, `heading`, and `line` for advanced actions. ```APIDOC ## Operations with Clipboard and Daily Notes ### Description These operations demonstrate using the `clipboard=true` parameter to read data from the system clipboard and the `daily=true` parameter to target the current day's note. ### Method POST ### Endpoint obisidian://adv-uri ### Parameters #### Query Parameters - **vault** (string) - Required - The name of the Obsidian vault. - **daily** (boolean) - Optional - If `true`, targets the daily note. - **clipboard** (boolean) - Required - If `true`, uses clipboard content as data. - **data** (string) - Required if `clipboard` is false - The content to write. - **mode** (string) - Optional - `append`, `prepend`, `overwrite`. ### Request Example (Append from clipboard to daily note) ```uri obisidian://adv-uri?vault=&daily=true&clipboard=true&mode=append ``` ## Custom Separators ### Description Customize the separator used when appending or prepending content to existing files. ### Method POST ### Endpoint obisidian://adv-uri ### Parameters #### Query Parameters - **vault** (string) - Required - The name of the Obsidian vault. - **filepath** (string) - Required - The path to the file. - **data** (string) - Required - The content to append/prepend. - **mode** (string) - Required - `append` or `prepend`. - **separator** (string) - Optional - The custom separator character(s). ### Request Example (Append with comma separator) ```uri obisidian://adv-uri?vault=&filepath=my-file&data=new_data&mode=append&separator=, ``` ## Targeting Headings or Lines ### Description **Note**: More information regarding `heading` and `line` parameters can be found in the [Navigation](Actions/Navigation) documentation. These parameters allow for more granular control over where content is added within a file. ### Method POST ### Endpoint obisidian://adv-uri ### Parameters #### Query Parameters - **vault** (string) - Required - The name of the Obsidian vault. - **filepath** (string) - Required - The path to the file. - **data** (string) - Required - The content to add. - **mode** (string) - Required - `append` or `prepend`. - **heading** (string) - Optional - Specifies a heading to append/prepend to. - **line** (integer) - Optional - Specifies a line number to append/prepend to. ### Request Example (Prepend to a specific line) ```uri obisidian://adv-uri?vault=&filepath=my-file&data=content_to_prepend&mode=prepend&line=5 ``` ``` -------------------------------- ### Workspace Operations Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Navigation.md Load, save, or copy URIs for Obsidian workspaces. ```APIDOC ## Workspace Operations ### Description Provides endpoints for managing workspaces within Obsidian, including loading, saving, and copying workspace URIs. ### Load Workspace **Method**: GET **Endpoint**: `obsidian://adv-uri?vault=&workspace=` ### Copy URI for Current Workspace **Method**: GET **Endpoint**: `obsidian://adv-uri?vault=&workspace=&clipboard=true` ### Save Current Workspace **Method**: GET **Endpoint**: `obsidian://adv-uri?vault=&saveworkspace=true` ### Parameters #### Query Parameters - **workspace** (string) - Optional - The name of the workspace to load. - **clipboard** (boolean) - Optional - If set to `true`, copies the URI for the current workspace to the clipboard. - **saveworkspace** (boolean) - Optional - If set to `true`, saves the current workspace. ``` -------------------------------- ### Settings Tab Navigation Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Navigation.md Open specific settings tabs provided by Obsidian and its plugins. ```APIDOC ## Settings Tab Navigation ### Description Opens a specified settings tab within Obsidian, supporting all installed plugins. ### Open Settings Tab **Method**: GET **Endpoint**: `obsidian://adv-uri?vault=&settingid=` ### Parameters #### Query Parameters - **settingid** (string) - Required - The unique identifier for the settings tab to open. Refer to Obsidian documentation or plugin-specific documentation for available `settingid` values. ``` -------------------------------- ### View and Open Mode Parameters Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Navigation.md Control how files are displayed and opened using view mode and open mode parameters. ```APIDOC ## View and Open Mode Parameters ### Description These parameters allow control over the display mode (reading vs. live preview) and how files are opened (new tab vs. new window). ### View Mode **Description**: Switches the view mode of the opened file. Use `viewmode=preview` for reading mode or `viewmode=live-preview` for live preview mode. ### Open Mode **Description**: Determines how the file is opened. Use `openmode=new` to always open in a new tab, or `openmode=window` to open in a new window. ``` -------------------------------- ### Navigate to Community Plugin Settings Page Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Settings navigation.md Opens the settings configuration page for a specific community plugin. The '' must correspond to the plugin's unique identifier found in its manifest.json file. ```uri obsidian://adv-uri?vault=Manifold-Grace&settingid= ``` -------------------------------- ### View Mode Configuration Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Concepts/Navigation Parameters.md Controls how the editor is displayed when opening or focusing a pane. Supports 'source', 'live', and 'preview' modes. ```APIDOC ## View mode Every action opening or focusing a pane supports the parameter `viewmode`. Accepted values: - `source`: Sets the editor to editing:source mode - `live`: Sets the editor to editing:live preview - `preview`: Sets the editor to reading mode ``` -------------------------------- ### File Navigation Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Navigation.md Open files and navigate to specific locations within them. ```APIDOC ## File Navigation ### Description Allows opening files and navigating to specific lines, columns, offsets, headings, or blocks within those files. ### Open File **Method**: GET **Endpoint**: `obsidian://adv-uri?vault=&filepath=` ### Open File with Line/Column **Method**: GET **Endpoint**: `obsidian://adv-uri?vault=&filepath=&line=&column=` ### Open File with Offset **Method**: GET **Endpoint**: `obsidian://adv-uri?vault=&filepath=&offset=` ### Open File by Heading **Method**: GET **Endpoint**: `obsidian://adv-uri?vault=&filepath=&heading=` ### Open File by Block Reference **Method**: GET **Endpoint**: `obsidian://adv-uri?vault=&filepath=&block=` ### Global Block Reference Search **Method**: GET **Endpoint**: `obsidian://adv-uri?vault=&block=` ### Parameters #### Query Parameters - **filepath** (string) - Required - The path to the file (e.g., `my-file.md`). - **line** (integer) - Optional - The line number to navigate to (1-indexed). - **column** (integer) - Optional - The column number to navigate to (1-indexed). - **offset** (integer) - Optional - The character offset from the start of the file. - **heading** (string) - Optional - The text of the heading to navigate to. - **block** (string) - Optional - The ID of the block to navigate to. Can be used globally to search the entire vault. ``` -------------------------------- ### Open Bookmark Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/i18n/zh-CN/actions/bookmarks.md Allows opening any bookmarked item (search, folder, or file) within Obsidian. You can specify the bookmark title and the desired open mode. ```APIDOC ## GET /obsidian ### Description Opens a bookmarked item in Obsidian using its title. Supports opening in the current tab or a new tab. ### Method GET ### Endpoint `/obsidian` ### Parameters #### Query Parameters - **vault** (string) - Required - The name of the vault to open the bookmark in. - **bookmark** (string) - Required - The title of the bookmark to open. - **openmode** (string) - Optional - The mode in which to open the bookmark. Common values include `tab` (new tab) or leave blank for current tab. ### Request Example ```uri obisidian://adv-uri?vault=&bookmark=&openmode=tab ``` ### Response #### Success Response (200) This endpoint does not return a JSON response. It triggers an action within Obsidian. #### Response Example N/A ``` -------------------------------- ### Open Specific Heading in a File via URI Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/README.md Opens a specified file in Obsidian and navigates directly to a particular heading within that file. This is useful for quick access to specific sections of notes. ```uri obsidian://adv-uri?vault=&filepath=my-file&heading=Goal ``` -------------------------------- ### Specifying Target Vault in URI Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/i18n/zh-CN/concepts/schema.md Shows how to use the 'vault' parameter to specify which Obsidian vault the URI should target. If omitted, the most recently used vault will be selected. ```uri obsidian://adv-uri?vault=myVault&key1=value1 ``` ```uri obsidian://adv-uri?key1=value1 ``` -------------------------------- ### Open Daily Note with Heading (Obsidian URI) Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Concepts/File identifiers.md Opens the daily note for the current day and places the cursor under a specified heading if it exists. Requires the 'daily=true' parameter. ```uri obsidian://adv-uri?daily=true&heading=Inbox ``` -------------------------------- ### Open File with Block Reference Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Navigation.md Opens a specific file and navigates to a block identified by its ID. The block ID should be provided without any markdown syntax. ```uri obsidian://adv-uri?vault=&filepath=my-file&block=12345 ``` -------------------------------- ### Prepend Data to List in Frontmatter Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Frontmatter.md Explains how to prepend data to a list within the frontmatter using the Advanced URI. A negative index (e.g., -1) in 'frontmatterkey' signifies prepending. ```uri obsidian://adv-uri?vault=&filepath=MyFile&frontmatterkey=[my_item,second_item,-1]&data=prepended_data ``` -------------------------------- ### Export File to PDF using Command ID via URI Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/README.md Exports a specified file to PDF format by invoking the 'Export to PDF' command via its command ID. This allows for automated document generation from Obsidian notes. ```uri obsidian://adv-uri?vault=&filepath=&commandid=workspace%3Aexport-pdf ``` -------------------------------- ### Open Workspace Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Navigation.md Opens a specified workspace in Obsidian. Requires the vault name and the workspace name as parameters. ```uri obsidian://adv-uri?vault=&workspace=main ``` -------------------------------- ### Open Bookmark Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Bookmarks.md Opens a bookmarked item (search, folder, or file) in Obsidian. You can specify the bookmark title and the desired open mode. ```APIDOC ## GET /obsidian-uri ### Description Opens a bookmarked item in Obsidian. Supports specifying the bookmark title and the open mode (e.g., current tab, new tab). ### Method GET ### Endpoint /obsidian-uri ### Parameters #### Query Parameters - **vault** (string) - Required - The name of the vault to open. - **bookmark** (string) - Required - The title of the bookmark to open. - **openmode** (string) - Optional - The mode in which to open the bookmark. Common values include 'tab' for a new tab. ### Request Example ```uri obisidian://adv-uri?vault=&bookmark=&openmode=tab ``` ### Response #### Success Response (200) This endpoint does not return a response body, but rather triggers an action within the Obsidian application. #### Response Example N/A ``` -------------------------------- ### Open Starred Note in New Pane via URI Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Tips/Tips and Tricks.md This snippet illustrates how to open a starred note in a new pane using the Advanced URI command. It utilizes the 'obsidian-shortcuts-for-starred-files' plugin and a command ID format that specifies opening the file in a new pane. ```text obsidian-shortcuts-for-starred-files:open-file-in-new-pane- ``` -------------------------------- ### Navigate to Specific Obsidian Setting Section Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Settings navigation.md Opens a specific settings tab and scrolls to a particular section within that tab. Both 'settingid' and 'settingsection' parameters must be exact and case-sensitive. ```uri obsidian://adv-uri?vault=&settingid=editor&settingsection=Behavior ``` -------------------------------- ### Obsidian Advanced URI - Enable Custom Plugin Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Miscellaneous.md Enables a specified custom plugin in Obsidian. ```APIDOC ## GET / ### Description Enables a specified custom plugin in Obsidian. ### Method GET ### Endpoint / ### Parameters #### Query Parameters - **enable-plugin** (string) - Required - The name of the plugin to enable. ### Response #### Success Response (200) - **Result** (string) - A confirmation message indicating that the plugin has been enabled. ### Response Example ``` Plugin 'your-plugin-name' enabled. ``` ``` -------------------------------- ### Create new file (URI) Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Writing.md Creates a new file with the specified filepath and data. If the filepath exists, an incrementing number is appended. Requires vault, filepath, data, and mode=new. ```uri obsidian://adv-uri?vault=&filepath=new-file&data=initial content&mode=new ``` -------------------------------- ### Executing Obsidian Commands by Name or ID Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/i18n/zh-CN/actions/commands.md Demonstrates how to execute Obsidian commands using either their display name or their internal ID. The command can be executed directly or after opening a specific file. Optional parameters allow for precise cursor placement (line number) or specific file manipulation modes (append, prepend, overwrite). ```uri obsidian://advanced-uri?command= ``` ```uri obsidian://advanced-uri?command=&filepath= ``` ```uri obsidian://advanced-uri?command=&filepath=&line=myline ``` ```uri obsidian://advanced-uri?command=&filepath=&mode=append ``` ```uri obsidian://advanced-uri?command=&filepath=&mode=prepend ``` ```uri obsidian://advanced-uri?command=&filepath=&mode=overwrite ``` -------------------------------- ### Append Clipboard to Daily Note via URI Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/README.md Appends content directly from the clipboard to the current day's daily note in Obsidian. This URI action simplifies content integration into daily logs. ```uri obsidian://adv-uri?vault=&daily=true&clipboard=true&mode=append ``` -------------------------------- ### Write Frontmatter Data via Advanced URI Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Frontmatter.md Illustrates how to use an Advanced URI to write data to a file's frontmatter. The 'frontmatterkey' parameter targets the location, and the 'data' parameter provides the value. ```uri obsidian://adv-uri?vault=&filepath=MyFile&frontmatterkey=[my_item,second_item,1]&data=NewValue ``` -------------------------------- ### Navigate to Obsidian Settings Tab Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Settings navigation.md Opens the specified settings tab within Obsidian. The 'settingid' parameter accepts predefined IDs for various Obsidian settings categories. ```uri obsidian://adv-uri?vault=&settingid=editor ``` -------------------------------- ### Open Starred Note in Current Pane via URI Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Tips/Tips and Tricks.md This snippet demonstrates how to open a starred note in the current pane using the Advanced URI command. It relies on the 'obsidian-shortcuts-for-starred-files' plugin and uses a specific command ID format indicating the file index. ```text obsidian-shortcuts-for-starred-files:open-file- ``` -------------------------------- ### Prepend data to file (URI) Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Writing.md Prepends data to a file. Requires vault, filepath, data, and mode=prepend. Data should be URL-encoded. Default separator is a newline. ```uri obsidian://adv-uri?vault=&filepath=my-file&data=new_data&mode=prepend ``` -------------------------------- ### Open Note by File Path (Obsidian URI) Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Concepts/File identifiers.md Opens a note in Obsidian using its relative file path. The file extension '.md' can be omitted. If the note does not exist, it will be created. ```uri obsidian://adv-uri?filepath=Inbox ``` -------------------------------- ### Obsidian Advanced URI - File Existence Check Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Miscellaneous.md Checks if a file exists within Obsidian and copies a boolean (1 for exists, 0 for not exists) to the clipboard. ```APIDOC ## GET / ### Description Checks if a file exists within Obsidian and copies a boolean (1 for exists, 0 for not exists) to the clipboard. ### Method GET ### Endpoint / ### Parameters #### Query Parameters - **** (string) - Required - The identifier for the file to check. - **exists** (boolean) - Required - Set to `true` to perform the existence check. ### Response #### Success Response (200) - **Result** (integer) - `1` if the file exists, `0` if it does not. This value is also copied to the clipboard. ### Response Example ``` 1 ``` ``` -------------------------------- ### Search Vault for Block Reference Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Navigation.md Searches the entire Obsidian vault for a block with the specified ID and opens the file containing that block. The block ID should be provided without any markdown syntax. This is most effective when the block ID is unique across the vault. ```uri obsidian://adv-uri?vault=&block=12345 ``` -------------------------------- ### Identify File by UID (Obsidian URI) Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Concepts/File identifiers.md Navigates to a note using a unique identifier (UID) stored in the frontmatter. This allows file renaming without breaking links. The UID can be automatically generated and written to the frontmatter. ```uri obsidian://adv-uri?uid=d43f7a17-058c-4aea-b8dc-515ea646825a ``` -------------------------------- ### Read Frontmatter Data via Advanced URI Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Frontmatter.md Shows how to construct an Advanced URI to read specific values from a file's frontmatter. It utilizes the 'frontmatterkey' parameter to specify the path to the desired data. ```uri obsidian://adv-uri?vault=&filepath=MyFile&frontmatterkey=[my_item,second_item,1] ``` -------------------------------- ### Per File Search and Replace Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Search.md Perform search and replace operations within the current Obsidian file or a specified file, supporting plain text and regular expressions. ```APIDOC ## POST /replace ### Description Replaces all occurrences of a search term with a replacement term in the current Obsidian file. ### Method POST ### Endpoint /replace ### Query Parameters - **search** (string) - Required - The term to search for. - **replace** (string) - Required - The term to replace with. ### Request Example ``` obsidian://advanced-uri?vault=MyVault&filepath=MyNote.md&data={"search":"old text", "replace":"new text"} ``` ## POST /{identification}/replace ### Description Replaces all occurrences of a search term with a replacement term in a specified Obsidian file. ### Method POST ### Endpoint /{identification}/replace ### Query Parameters - **search** (string) - Required - The term to search for. - **replace** (string) - Required - The term to replace with. - **identification** (string) - Required - The identifier for the file (e.g., filepath or URI). ### Request Example ``` obsidian://advanced-uri?vault=MyVault&filepath=MyNote.md&data={"search":"old text", "replace":"new text", "file":"path/to/your/note.md"} ``` ## POST /regex-replace ### Description Replaces all occurrences matching a regular expression with a replacement term in the current Obsidian file. ### Method POST ### Endpoint /regex-replace ### Query Parameters - **searchregex** (string) - Required - The regular expression to search for. - **replace** (string) - Required - The term to replace with. ### Request Example ``` obsidian://advanced-uri?vault=MyVault&filepath=MyNote.md&data={"search":"(?i)old", "replace":"new"} ``` ## POST /{identification}/regex-replace ### Description Replaces all occurrences matching a regular expression with a replacement term in a specified Obsidian file. ### Method POST ### Endpoint /{identification}/regex-replace ### Query Parameters - **searchregex** (string) - Required - The regular expression to search for. - **replace** (string) - Required - The term to replace with. - **identification** (string) - Required - The identifier for the file (e.g., filepath or URI). ### Request Example ``` obsidian://advanced-uri?vault=MyVault&filepath=MyNote.md&data={"search":"(?i)old", "replace":"new", "file":"path/to/your/note.md"} ``` ``` -------------------------------- ### Focus Canvas Nodes via URI Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Canvas.md Zooms to and selects a list of canvas nodes. Requires node IDs separated by commas. The file identification is optional; if omitted, the currently opened canvas is used. ```uri obsidian://adv-uri?vault=&canvasnodes=abc%2Cxyz ``` -------------------------------- ### Complex Frontmatter Structures Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Frontmatter.md Illustrates the interpretation of complex nested structures within YAML frontmatter, including how to access values in lists using numerical indices. ```yaml my_item: second_item: - A - B ``` ```yaml my_item: second_item: - A - data: - 2 - 3 ``` -------------------------------- ### Focus Nodes in Canvas Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Canvas.md Zooms to and selects a list of specified canvas nodes. The file identification is optional; if omitted, the currently opened canvas is used. ```APIDOC ## GET /obsidian-advanced-uri ### Description Zooms to and selects a list of canvas nodes within an Obsidian vault. The target canvas can be specified via an optional file identification parameter, or defaults to the currently open canvas. ### Method GET ### Endpoint obisidian://adv-uri ### Parameters #### Query Parameters - **vault** (string) - Required - The name of the Obsidian vault. - **canvasnodes** (string) - Required - A comma-separated list of node IDs to focus. Example: `abc,xyz` - **identification** (string) - Optional - The identification of the canvas file to target. If omitted, the currently opened canvas is used. ### Request Example ```uri obisidian://adv-uri?vault=&canvasnodes=abc%2Cxyz ``` ### Response #### Success Response (200) This endpoint typically triggers an action within Obsidian and does not return a JSON response body. The success is indicated by the UI update in Obsidian. #### Response Example (No response body) ``` -------------------------------- ### Write file if not present (URI) Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Writing.md Writes data to a file only if the file does not already exist. Requires vault and filepath. Data should be URL-encoded. ```uri obsidian://adv-uri?vault=&filepath=my-file&data=Hello%20World ``` -------------------------------- ### Open Note by Filename Alias (Obsidian URI) Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Concepts/File identifiers.md Opens a note in Obsidian using its alias. This is useful when the note's primary name differs from its linked name. URL-encoded spaces are supported. ```uri obsidian://adv-uri?filename=Brain%20Dumps ``` -------------------------------- ### Append to daily note (URI) Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Writing.md Appends data to the current day's daily note. Requires vault, daily=true, and mode=append. Data should be URL-encoded. ```uri obsidian://adv-uri?vault=&daily=true&data=Hello%20World&mode=append ``` -------------------------------- ### Advanced URI Using Last Used Vault Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Concepts/Schema.md Shows how to construct an Advanced URI that will execute in the last used Obsidian vault by omitting the 'vault' parameter. ```uri obsidian://adv-uri?key1=value1 ``` -------------------------------- ### Advanced URI with Specific Vault Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Concepts/Schema.md Demonstrates how to specify a particular Obsidian vault to execute the URI within. This is achieved using the 'vault' parameter. ```uri obsidian://adv-uri?vault=myVault&key1=value1 ``` -------------------------------- ### File Write Operations Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Writing.md Perform write operations on files within Obsidian. Supports writing new files, overwriting existing ones, appending content, and prepending content. ```APIDOC ## POST /write ### Description Writes `data` to the specified file only if the file does not already exist. ### Method POST ### Endpoint obisidian://adv-uri ### Parameters #### Query Parameters - **vault** (string) - Required - The name of the Obsidian vault. - **filepath** (string) - Required - The path to the file (without extension). - **data** (string) - Required - The content to write to the file. ### Request Example ```uri obisidian://adv-uri?vault=&filepath=my-file&data=Hello%20World ``` ## POST /overwrite ### Description Writes `data` to the specified file, overwriting its content even if the file already exists. ### Method POST ### Endpoint obisidian://adv-uri ### Parameters #### Query Parameters - **vault** (string) - Required - The name of the Obsidian vault. - **filepath** (string) - Required - The path to the file (without extension). - **data** (string) - Required - The content to write to the file. - **mode** (string) - Optional - Set to `overwrite` to enable overwriting. ### Request Example ```uri obisidian://adv-uri?vault=&filepath=my-file&data=This%20text%20is%20overwritten&mode=overwrite ``` ## POST /append ### Description Appends `data` to the specified file. By default, a newline character is used as a separator. Supports daily notes via the `daily=true` parameter. ### Method POST ### Endpoint obisidian://adv-uri ### Parameters #### Query Parameters - **vault** (string) - Required - The name of the Obsidian vault. - **filepath** (string) - Optional - The path to the file (without extension). - **daily** (boolean) - Optional - If `true`, appends to the daily note. - **data** (string) - Required - The content to append to the file. - **mode** (string) - Optional - Set to `append` to enable appending. - **separator** (string) - Optional - Custom separator between existing and new content. ### Request Example ```uri obisidian://adv-uri?vault=&daily=true&data=Hello%20World&mode=append ``` ```uri obisidian://adv-uri?vault=&filepath=my-file&data=new_data&mode=append&separator=, ``` ## POST /prepend ### Description Prepends `data` to the specified file. By default, a newline character is used as a separator. Supports daily notes via the `daily=true` parameter. ### Method POST ### Endpoint obisidian://adv-uri ### Parameters #### Query Parameters - **vault** (string) - Required - The name of the Obsidian vault. - **filepath** (string) - Optional - The path to the file (without extension). - **daily** (boolean) - Optional - If `true`, prepends to the daily note. - **data** (string) - Required - The content to prepend to the file. - **mode** (string) - Optional - Set to `prepend` to enable prepending. - **separator** (string) - Optional - Custom separator between existing and new content. ### Request Example ```uri obisidian://adv-uri?vault=&filepath=my-file&data=new_data&mode=prepend&separator=| ``` ## POST /new ### Description Creates a new file with the specified `filepath` and `data`. If the `filepath` already exists, an incrementing number is appended to the filename. ### Method POST ### Endpoint obisidian://adv-uri ### Parameters #### Query Parameters - **vault** (string) - Required - The name of the Obsidian vault. - **filepath** (string) - Required - The path for the new file (without extension). - **data** (string) - Required - The content for the new file. - **mode** (string) - Optional - Set to `new` to ensure a new file is created. ### Request Example ```uri obisidian://adv-uri?vault=&filepath=new-document&data=Initial%20content&mode=new ``` ``` -------------------------------- ### Obsidian URI: Search and Replace in a file Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Search.md Replaces all occurrences of a search term with a replacement term within the current or a designated file in Obsidian. Supports both plain text and regular expressions for searching. Parameters include 'search', 'replace', and optionally 'searchregex' for regex-based replacement. An optional file identifier can be provided to target a specific file. ```URI obsidian://advanced-uri?filepath=&search=&replace= ``` ```URI obsidian://advanced-uri?filepath=&search=&replace=&useSvelteTheme=true ``` ```URI obsidian://advanced-uri?filepath=&searchregex=&replace= ``` ```URI obsidian://advanced-uri?filepath=&searchregex=&replace=&useSvelteTheme=true ``` -------------------------------- ### Per File Search Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Search.md Perform searches within the current Obsidian file or a specified file. ```APIDOC ## GET /search ### Description Searches for a specified term within the current Obsidian file. ### Method GET ### Endpoint /search ### Query Parameters - **search** (string) - Required - The term to search for. ### Request Example ``` obsidian://advanced-uri?vault=MyVault&filepath=MyNote.md&data={"query":"my search term"} ``` ## GET /{identification}/search ### Description Opens a specific Obsidian file and searches for a specified term within it. ### Method GET ### Endpoint /{identification}/search ### Query Parameters - **search** (string) - Required - The term to search for. - **identification** (string) - Required - The identifier for the file (e.g., filepath or URI). ### Request Example ``` obsidian://advanced-uri?vault=MyVault&filepath=MyNote.md&data={"query":"my search term", "file":"path/to/your/note.md"} ``` ``` -------------------------------- ### Append with custom separator (URI) Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Writing.md Appends data to a file using a custom separator. Requires vault, filepath, data, mode=append, and the separator parameter. ```uri obsidian://adv-uri?vault=&filepath=my-file&data=new_data&mode=append&separator=, ``` -------------------------------- ### Obsidian URI: Search within a file Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Search.md Initiates a search for a specified term within the current or a designated file in Obsidian. Requires the 'search' parameter. An optional file identifier can be provided to target a specific file. ```URI obsidian://advanced-uri?filepath=&search= ``` ```URI obsidian://advanced-uri?filepath=&search=&useSvelteTheme=true ``` -------------------------------- ### Overwrite file (URI) Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Writing.md Writes data to a file, overwriting existing content if the file is present. Requires vault, filepath, and mode=overwrite. Data should be URL-encoded. ```uri obsidian://adv-uri?vault=&filepath=my-file&data=This%20text%20is%20overwritten&mode=overwrite ``` -------------------------------- ### Set Canvas Viewport via URI Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Canvas.md Sets the x, y, and zoom of the canvas view. Values are separated by commas. A hyphen '-' can be used to leave a value unchanged. The file identification is optional; if omitted, the currently opened canvas is used. ```uri obsidian://adv-uri?vault=&canvasviewport=100%2C-300%2C0.5 ``` ```uri obsidian://adv-uri?vault=&canvasviewport=-%2C-300%2C- ``` -------------------------------- ### Obsidian Advanced URI - Execute Arbitrary Code Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Miscellaneous.md Executes arbitrary JavaScript code within Obsidian. This feature requires an extra setting to be enabled for security reasons. ```APIDOC ## GET / ### Description Executes arbitrary JavaScript code within Obsidian. This feature requires an extra setting to be enabled for security reasons. ### Method GET ### Endpoint / ### Parameters #### Query Parameters - **eval** (string) - Required - The JavaScript code to execute. Must be URL-encoded. ### Response #### Success Response (200) - **Result** (any) - The output or result of the executed JavaScript code. ### Response Example ```javascript console.log('Hello from eval!'); ``` ``` -------------------------------- ### Set Canvas Viewport Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Canvas.md Sets the exact x, y coordinates and zoom level of the canvas view. Individual values can be left unchanged by using a hyphen. ```APIDOC ## GET /obsidian-advanced-uri ### Description Sets the viewport (x, y coordinates and zoom level) of an Obsidian canvas. You can specify all three values or leave some unchanged using a hyphen ('-'). ### Method GET ### Endpoint obisidian://adv-uri ### Parameters #### Query Parameters - **vault** (string) - Required - The name of the Obsidian vault. - **canvasviewport** (string) - Required - A comma-separated string containing x, y, and zoom values. Use '-' to keep a value unchanged. Example: `100,-300,0.5` or `-%2C-300%2C-` - **identification** (string) - Optional - The identification of the canvas file to target. If omitted, the currently opened canvas is used. ### Request Example ```uri # Set x=100, y=-300, zoom=0.5 obisidian://adv-uri?vault=&canvasviewport=100%2C-300%2C0.5 # Only set y=-300 and leave other values untouched obisidian://adv-uri?vault=&canvasviewport=-%2C-300%2C- ``` ### Response #### Success Response (200) This endpoint typically triggers an action within Obsidian and does not return a JSON response body. The success is indicated by the UI update in Obsidian. #### Response Example (No response body) ``` -------------------------------- ### Append Data to List in Frontmatter Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Frontmatter.md Details how to append data to a list within the frontmatter using the Advanced URI. An index greater than the maximum existing index in 'frontmatterkey' achieves this. ```uri obsidian://adv-uri?vault=&filepath=MyFile&frontmatterkey=[my_item,second_item,3]&data=appended_data ``` -------------------------------- ### Write Nested Frontmatter Data via Advanced URI Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Frontmatter.md Demonstrates writing complex data structures, such as JSON objects or arrays, to nested frontmatter fields using the Advanced URI. The 'data' parameter must be properly URL-encoded. ```uri obsidian://adv-uri?vault=&filepath=MyFile&frontmatterkey=[my_item,second_item,1]&data=%7B%22data%22%3A[2,3]%7D ``` -------------------------------- ### Change Canvas Viewport via URI Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Canvas.md Increases or decreases the x, y, and/or zoom of the canvas view. Values are prefixed with '++' to add or '--' to subtract. A hyphen '-' can be used to leave a value unchanged. The file identification is optional; if omitted, the currently opened canvas is used. ```uri obsidian://adv-uri?vault=&canvasviewport=++100%2C--300%2C++0.5 ``` -------------------------------- ### Obsidian Advanced URI - Disable Custom Plugin Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Miscellaneous.md Disables a specified custom plugin in Obsidian. ```APIDOC ## GET / ### Description Disables a specified custom plugin in Obsidian. ### Method GET ### Endpoint / ### Parameters #### Query Parameters - **disable-plugin** (string) - Required - The name of the plugin to disable. ### Response #### Success Response (200) - **Result** (string) - A confirmation message indicating that the plugin has been disabled. ### Response Example ``` Plugin 'your-plugin-name' disabled. ``` ``` -------------------------------- ### Modify Canvas Viewport Source: https://github.com/vinzent03/obsidian-advanced-uri/blob/master/docs/Actions/Canvas.md Increases or decreases the x, y coordinates and/or zoom level of the canvas view. Values are prefixed with '++' to add or '--' to subtract. ```APIDOC ## GET /obsidian-advanced-uri ### Description Adjusts the viewport (x, y coordinates and zoom level) of an Obsidian canvas by adding or subtracting values. Use '++' to increase and '--' to decrease a value. ### Method GET ### Endpoint obisidian://adv-uri ### Parameters #### Query Parameters - **vault** (string) - Required - The name of the Obsidian vault. - **canvasviewport** (string) - Required - A comma-separated string containing x, y, and zoom values. Prefix values with `++` to add or `--` to subtract. Example: `++100%2C--300%2C++0.5` - **identification** (string) - Optional - The identification of the canvas file to target. If omitted, the currently opened canvas is used. ### Request Example ```uri # Increase x by 100, subtract y by 300, increase zoom by 0.5 obisidian://adv-uri?vault=&canvasviewport=++100%2C--300%2C++0.5 ``` ### Response #### Success Response (200) This endpoint typically triggers an action within Obsidian and does not return a JSON response body. The success is indicated by the UI update in Obsidian. #### Response Example (No response body) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.