license

Description

Requests the license from Document Server with information about the server and user quota.

Request example

  1. {
  2. "c": "license"
  3. }

Parameters

NameDescriptionTypePresence
cDefines the command type.stringrequired

Response example

  1. {
  2. "error": 0,
  3. "license": {
  4. "end_date": "2021-07-07T23:59:59.000Z",
  5. "trial": false,
  6. "customization": false,
  7. "connections": 0,
  8. "connections_view": 0,
  9. "users_count": 10,
  10. "users_view_count": 10,
  11. "users_expire": 30
  12. },
  13. "server": {
  14. "resultType": 3,
  15. "packageType": 1,
  16. "buildDate": "2021-05-21T00:00:00.000Z",
  17. "buildVersion": "6.3.0",
  18. "buildNumber": 111
  19. },
  20. "quota": {
  21. "users": [
  22. {
  23. "userid": "uid-0",
  24. "expire": "2021-07-07T23:59:59.000Z"
  25. },
  26. {
  27. "userid": "uid-1",
  28. "expire": "2021-07-09T23:59:59.000Z"
  29. },
  30. ...
  31. ],
  32. "users_view": [
  33. {
  34. "userid": "uid-0",
  35. "expire": "2021-07-07T23:59:59.000Z"
  36. },
  37. {
  38. "userid": "uid-1",
  39. "expire": "2021-07-09T23:59:59.000Z"
  40. },
  41. ...
  42. ]
  43. }
  44. }

Parameters

ParameterDescriptionTypePresence
errorDefines an error code.integerrequired
licenseDefines the document license information:
  • end_date - the license expiration date.
    type: string
    presence: required
  • trial - defines if the license is trial or not.
    type: boolean
    presence: required
  • customization - defines if the customization parameters marked with the * sign are available for editing only in ONLYOFFICE Developer Edition or not.
    type: boolean
    presence: required
  • connections - the number of connections for the connection license.
    type: integer
    presence: optional
  • connections_view - the number of connections for the live viewer.
    type: integer
    presence: optional
  • users_count - the number of users for the user license.
    type: integer
    presence: optional
  • users_view_count - the number of users for the live viewer.
    type: integer
    presence: optional
  • users_expire - the number of days after which the user license expires.
    type: integer
    presence: optional
objectrequired
serverDefines the server characteristics:
  • resultType - the license status (1 - an error occurred, 2 - the license expired, 3 - the license is still available, 6 - the trial license expired).
    type: integer
    presence: required
  • packageType - the product version (0 - an open source product, 1 - the Enterprise Edition, 2 - the Developer Edition).
    type: integer
    presence: required
  • buildDate - the build date.
    type: string
    presence: required
  • buildVersion - the build version.
    type: string
    presence: optional
  • buildNumber - the build number.
    type: integer
    presence: required
objectrequired
quotaDefines the user quota value:
  • users - the user quota for the user license where userid - the id of the user who opened the editor, expire - date of license expiration for this user.
    type: array of objects
    presence: required
  • users_view - the user quota for the live viewer where userid - the id of the user who opened the editor, expire - date of viewing expiration for this user.
    type: array of objects
    presence: required
objectrequired