post
https://{server}/api/v2.1/via-repo-token/file/
Create, rename, move, copy or revert a file within the token's library. Requires a token with rw permission.
create: creates an empty file atpath. For.docx,.xlsxand.pptxan empty Office document is created. For.sdocfiles the response additionally containsdoc_uuid.rename: renames the file tonewname.newnamemust differ from the current name.move/copy: moves or copies the file to the directorydst_dir(only within the same library). Locked files cannot be moved.revert: restores the file content from the commitcommit_id.
If the target name already exists, the file is renamed automatically (e.g. file (1).md).
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
400Invalid path, operation, newname, dst_dir or commit_id
403Permission denied (token without rw permission) or file is locked
404Library, file or folder not found
447The number of files in the library exceeds the limit