WebDAV MOVE
Verb & Operation
#190
Replies: 2 comments
-
I think that sounds really elegant, actually, @josephholsten! I think we could even make use of some of the other WEBDAV verbs like Before you go in that direction, there's one other thing to check, though -- maybe you could look to make sure the online docs tooling (see |
Beta Was this translation helpful? Give feedback.
-
I converted the PATCH move operation from PR #177 (via PR #191) to MOVE operation; the change has been pushed to PR #191. However, like @coddingtonbear anticipated, Swagger UI won't show any non-standard HTTP methods. At the moment, there's a mention in I asked Claude for alternative solutions and the most interesting suggestion was to use POST instead of MOVE and use X-HTTP-Method-Override to indicate that the "logical" method is MOVE. This still would make POST somewhat overloaded, but IMO POST would be a better place for such things than PATCH, at the very least. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Use case:
I'm using the API via https://github.com/MarkusPfundstein/mcp-obsidian. Since I have twenty years of notes in my vault, it's been really useful to have a robot help me identify ways to organize things.
Unfortunately, it has to do all this by creating new files and deleting old ones. This is particularly terrifying when I foolishly let it perform a large batch and the process hits a token limit.
Proposal:
I'd like to add MOVE operations with WebDAV semantics.
Briefly: https://http.dev/webdav#move
Details: https://datatracker.ietf.org/doc/html/rfc4918#section-9.9
Implementation concerns:
No, I don't have a clue what the implications of the implementation would be, but I've done a bunch of web programming over the years. It's been over a decade since I wrote anything in express, but I'm happy to do the implementation. I want to be sure it'll be warmly received if I bother to send a patch.
I do notice that Express does support the verb out of the box: https://expressjs.com/en/api.html#app.METHOD
I also see that we have https://docs.obsidian.md/Reference/TypeScript+API/Vault/rename available, but also https://docs.obsidian.md/Reference/TypeScript+API/FileManager/renameFile, though we aren't using FileManager for trashFile().
Anyway, this is long. Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions