Get Started
Documentation
More information
|
Command serviceFor the interaction with the document command service the POST requests are used. The request parameters are entered in JSON format in the request body. The requests are sent to the https://documentserver/coauthoring/CommandService.ashx address where the documentserver is the name of the server with the ONLYOFFICE Document Server installed. In ONLYOFFICE Document Server prior to version 4.2 the GET request with the parameters in the QueryString were used.
Parameters and their description:
Sample of JSON object sent to document command service used to disconnect the user with the 6d5a81d0 identifier from the document editing service
{ "c": "drop", "key": "Khirz6zTPdfd7", "users": [ "6d5a81d0" ] } The request result is returned in JSON form. Sample of the response
{ "error": 0, "key": "Khirz6zTPdfd7" } Sample of JSON object sent to document command service used for force saving the document with the 6d5a81d0 identifier being edited without closing it
{ "c": "forcesave", "key": "Khirz6zTPdfd7", "userdata": "sample userdata" } The request result is returned in JSON form. Sample of the response
{ "error": 0, "key": "Khirz6zTPdfd7" } Sample of JSON object sent to document command service used to receive the status of the document with the Khirz6zTPdfd7 identifier
{ "c": "info", "key": "Khirz6zTPdfd7" } The request result is returned in JSON form. Sample of the response
{ "error": 0, "key": "Khirz6zTPdfd7" } Sample of JSON object sent to document command service used to update the name of the document with the Khirz6zTPdfd7 identifier
{ "c": "meta", "key": "Khirz6zTPdfd7", "meta": { "title": "Example Document Title.docx" } } The request result is returned in JSON form. Sample of the response
{ "error": 0, "key": "Khirz6zTPdfd7" } Sample of JSON object sent to document command service used to receive the current version number of Document Server
{ "c": "version" } The request result of version is returned in JSON form. Sample of the response
{ "error": 0, "version": "4.3.1.4" } Sample of JSON object contains the JSON Web Token sent to document command service used to receive the status of the document with the Khirz6zTPdfd7 identifier
{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjIjoiaW5mbyIsImtleSI6IktoaXJ6NnpUUGRmZDcifQ.r_6sThjFABsHMNHhkVdHDSz4jwkbXRQNYdvawkBGJgg" } The document editing service informs the document storage service about the result caused by command using the callback handler. Possible error codes and their description
|
||||||||||||||||||||||||||||||||||||||||||||||||
© Ascensio System SIA 2021. All rights reserved
|