# document-server-integration **Repository Path**: jenkin-git/document-server-integration ## Basic Information - **Project Name**: document-server-integration - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: develop - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-01-15 - **Last Updated**: 2023-04-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## Document Server integration example These examples show the way to integrate [ONLYOFFICE Document Server][2] into your own website or application using one of the programming languages. The package contains examples written in .Net (C# MVC), .Net (C#), Java, Node.js, PHP and Ruby. You should change `http://documentserver` to your server address in these files: * .Net (C# MVC) - `web/documentserver-example/csharp-mvc/web.appsettings.config` * .Net (C#) - `web/documentserver-example/csharp/settings.config` * Java - `web/documentserver-example/java/src/main/resources/settings.properties` * Node.js - `web/documentserver-example/nodejs/config/default.json` * PHP - `web/documentserver-example/php/config.php` * Ruby - `web/documentserver-example/ruby/config/application.rb` More information on how to use these examples can be found here: [http://api.onlyoffice.com/editors/demopreview](http://api.onlyoffice.com/editors/demopreview "http://api.onlyoffice.com/editors/demopreview") ## API methods for test examples The methods described below are available for all of the test examples. ### POST `/upload` | | | | ---------------------- | ------------------------------------------------------------ | | **Summary** | Upload file to test example via request | | **URL** | /upload | | **Method** | POST | | **Request
Headers** | `Content-Type: multipart/form-data` | | **Request
Body** | `uploadedFile=@`
`filepath` - file for uploading
Multipart body with the file binary contents | | **Response** | **Code:** 200 OK
**Content on success:**
`{ "filename": }`
**Content on error:**
`{ "error": "Uploaded file not found" }`
Or
`{ "error": "File size is incorrect" }` | | **Sample** | `curl -X POST -F uploadedFile=@filename.docx http://localhost/upload` | ### DELETE `/file` | | | | ------------------ | ------------------------------------------------------------ | | **Summary** | Delete one file or all files | | **URL** | /file | | **Method** | DELETE | | ****URL Params**** | **Optional:**
`filename=[string]` - file for deleting.
*WARNING! Without this parameter, all files will be deleted* | | **Response** | **Code:** 200 OK
**Success:**
`{ "success": true }` | | **Sample** | **Delete one file:**
`curl -X DELETE http://localhost/file?filename=filename.docx`
**Delete all files:**
`curl -X DELETE http://localhost/file`
| ### GET `/files` | | | | ------------------ | ------------------------------------------------------------ | | **Summary** | Get information about all files | | **URL** | /files | | **Method** | GET | | **Response** | **Code:** 200 OK
**Success:**
`[{ "version": , "id": , "contentLength": , "pureContentLength": , "title": , "updated": }, ..., {...}]` | | **Sample** | `curl -X GET http://localhost/files/` | ### GET `/files/file/{fileId}` | | | | ------------------ | ------------------------------------------------------------ | | **Summary** | Get information about a file by file id | | **URL** | /files/file/{fileId} | | **Method** | GET | | **Response** | **Code:** 200 OK
**Content on success:**
`[{ "version": , "id": , "contentLength": , "pureContentLength": , "title": , "updated": }]`
**Content on error:**
`"File not found"` | | **Sample** | `curl -X GET http://localhost/files/{fileId}` | ## Project Information Official website: [https://www.onlyoffice.com](https://www.onlyoffice.com/?utm_source=github&utm_medium=cpc&utm_campaign=GitHubIntegrationEx) Code repository: [https://github.com/ONLYOFFICE/document-server-integration](https://github.com/ONLYOFFICE/document-server-integration "https://github.com/ONLYOFFICE/document-server-integration") ONLYOFFICE for developers: [https://www.onlyoffice.com/developer-edition.aspx](https://www.onlyoffice.com/developer-edition.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubIntegrationEx) ## User Feedback and Support If you have any problems with or questions about [ONLYOFFICE Document Server][2], please visit our official forum to find answers to your questions: [dev.onlyoffice.org][1] or you can ask and answer ONLYOFFICE development questions on [Stack Overflow][3]. [1]: http://dev.onlyoffice.org [2]: https://github.com/ONLYOFFICE/DocumentServer [3]: http://stackoverflow.com/questions/tagged/onlyoffice ## License document-server-integration is released under the MIT License. See the LICENSE.txt file for more information.