/vault

v0.12+

These routes deal with handling an Obsidian vault. Their URLs start with obsidian://actions-uri/vault.

 

Root, i.e. /vault

Does nothing but say hello.

Parameters

Only supports the base parameters (see section “Parameters required in/ accepted by all calls”).

Return values

These parameters will be added to the callbacks used for getting data back from Actions URI.

On success:

Parameter Description
result-message A short summary of what was done.

 

/vault/open

Opens a specific vault. For this to work, the vault must be in the list of vaults that Obsidian knows about and Actions URI needs to be active in that vault.

Parameters

Only supports the base parameters (see section “Parameters required in/ accepted by all calls”).

Return values

These parameters will be added to the callbacks used for getting data back from Actions URI.

On success:

Parameter Description
/  

On failure:

Parameter Description
errorCode A HTTP status code.
errorMessage A short summary of what went wrong.

 

/vault/close

Desktop only Closes a specific vault. For this to work, the vault must be in the list of vaults that Obsidian knows about and Actions URI needs to be active in that vault.

Parameters

Only supports the base parameters (see section “Parameters required in/ accepted by all calls”).

Return values

These parameters will be added to the callbacks used for getting data back from Actions URI.

On success:

Parameter Description
/  

On failure:

Parameter Description
errorCode A HTTP status code.
errorMessage A short summary of what went wrong.

 

/vault/info

v0.13+ Returns the full filesystem paths for the vault, its media folder and the “new note” folder.

Parameters

Only supports the base parameters (see section “Parameters required in/ accepted by all calls”).

Return values

These parameters will be added to the callbacks used for getting data back from Actions URI.

On success:

Parameter Description
result-base-path The full filesystem path to the vault.
result-attachment-folder-path The full filesystem path to the vault’s media folder.
result-new-file-folder-path The full filesystem path to the vault’s “new note” folder.

On failure:

Parameter Description
errorCode A HTTP status code.
errorMessage A short summary of what went wrong.

 

/vault/list-all-files

v0.14+ Returns a list of all files in the vault.

Parameters

Only supports the base parameters (see section “Parameters required in/ accepted by all calls”).

Return values

These parameters will be added to the callbacks used for getting data back from Actions URI.

On success:

Parameter Description
result-paths Array containing all file paths encoded as JSON string.

On failure:

Parameter Description
errorCode A HTTP status code.
errorMessage A short summary of what went wrong.

 

/vault/list-non-notes-files

v0.14+ Returns a list of all non Markdown files in the vault.

Parameters

Only supports the base parameters (see section “Parameters required in/ accepted by all calls”).

Return values

These parameters will be added to the callbacks used for getting data back from Actions URI.

On success:

Parameter Description
result-paths Array containing all file paths encoded as JSON string.

On failure:

Parameter Description
errorCode A HTTP status code.
errorMessage A short summary of what went wrong.