{% note tip "" %}
Choose a tool for developing with an AI agent:
- use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
- use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation
{% endnote %}
You can store text documents, spreadsheets, presentations, images, and other information on Drive. Users can upload, edit, copy files, and configure access permissions for them.
Quick navigation: all methods
- Retrieve the folder to upload to using the disk.folder.get or disk.storage.getChildren method
- Upload the file using the disk.folder.uploadFile method
- Retrieve the file parameters using the disk.file.get method
- If necessary, move, copy, rename, or delete the file
A new file should be uploaded using the disk.folder.uploadFile method to a folder by its identifier.
You can change the location of files within the Drive structure: move them using the disk.file.moveTo method or copy them to other folders using the disk.file.copyTo method.
You can retrieve file field values using the disk.file.get method. For example, to check if a file has been moved to the trash.
You can rename a file using the disk.file.rename method.
You can search for files and folders by name or by text inside a document using the disk.file.search method. The search can be limited to a single storage or folder.
{% note tip "User Documentation" %}
- Documents Online: Getting Started
- How to Work with Documents on Bitrix24 Drive
- How to Lock a Document on Drive
{% endnote %}
You can obtain a list of file versions using the disk.file.getVersions method. This method uses the file identifier as a parameter.
To get information about a version, use the disk.version.get method. This method takes a parameter with the version identifier, not the file identifier.
Drive tools allow you to restore the desired version of a file. This is done using the disk.file.restoreFromVersion method.
You can upload a new version of a file using the disk.file.uploadVersion method.
{% note tip "User Documentation" %}
{% endnote %}
To provide access to a file for an external user, you need to create a public link. This will allow you to share the file with people who do not have access to Bitrix24. You can obtain a public link for a file using the disk.file.getExternalLink method.
{% note tip "User Documentation" %}
{% endnote %}
Files can be moved to the trash using the disk.file.markDeleted method. Deleted files can be restored using the disk.file.restore method within 30 days.
To permanently delete a file without the possibility of recovery, you need to use the disk.file.delete method. This will destroy the file forever.
{% note tip "User Documentation" %}
{% endnote %}
Scope:
diskWho can execute the method: any user
#| || Method | Description || || disk.file.getFields | Returns the description of file fields || || disk.file.get | Returns the file by identifier || || disk.file.search | Finds files and folders by a text query || || disk.file.rename | Renames the file || || disk.file.copyTo | Copies the file to the specified folder || || disk.file.moveTo | Moves the file to the specified folder || || disk.file.delete | Deletes the file forever || || disk.file.markDeleted | Moves the file to the trash || || disk.file.restore | Restores the file from the trash || || disk.file.uploadVersion | Uploads a new version of the file || || disk.file.getVersions | Returns the list of file versions || || disk.file.restoreFromVersion | Restores the file from a specific version || || disk.file.getExternalLink | Returns a public link to the file || |#