Skip to main content

ONLYOFFICE DocSpace Security API

The browsable version of this reference, with a request builder and code samples, is published at https://api.onlyoffice.com/docspace/api-backend/usage-api/.

All URIs are relative to https://yourportal.onlyoffice.com, where the host is the address of your DocSpace instance.

Access to DevTools​

MethodHTTP requestDescription
setTenantDevToolsAccessSettingsPOST /api/2.0/settings/devtoolsaccessSet the Developer Tools access settings

Active connections​

MethodHTTP requestDescription
getAllActiveConnectionsGET /api/2.0/security/activeconnectionsGet active connections
logOutActiveConnectionPUT /api/2.0/security/activeconnections/logout/{loginEventId}Log out one connection
logOutAllActiveConnectionsChangePasswordPUT /api/2.0/security/activeconnections/logoutallchangepasswordLog out and reset password
logOutAllActiveConnectionsForUserPUT /api/2.0/security/activeconnections/logoutall/{userId}Log out a user everywhere
logOutAllExceptThisConnectionPUT /api/2.0/security/activeconnections/logoutallexceptthisLog out other connections

Audit trail data​

MethodHTTP requestDescription
createAuditTrailReportPOST /api/2.0/security/audit/events/reportStart audit trail report
getAuditEventsByFilterGET /api/2.0/security/audit/events/filterGet filtered audit events
getAuditSettingsGET /api/2.0/security/audit/settings/lifetimeGet audit lifetime settings
getAuditTrailMappersGET /api/2.0/security/audit/mappersGet audit trail mappers
getAuditTrailReportGET /api/2.0/security/audit/events/reportGet audit trail report status
getAuditTrailTypesGET /api/2.0/security/audit/typesGet audit trail types
getLastAuditEventsGET /api/2.0/security/audit/events/lastGet recent audit events
setAuditSettingsPOST /api/2.0/security/audit/settings/lifetimeSet audit lifetime settings
terminateAuditTrailReportDELETE /api/2.0/security/audit/events/reportTerminate audit trail report

Banners visibility​

MethodHTTP requestDescription
setTenantBannerSettingsPOST /api/2.0/settings/bannerSet the banners visibility

CSP​

MethodHTTP requestDescription
configureCspPOST /api/2.0/security/cspConfigure CSP settings
getCspSettingsGET /api/2.0/security/cspGet CSP settings

Firebase​

MethodHTTP requestDescription
docRegisterPusnNotificationDevicePOST /api/2.0/settings/push/docregisterdeviceRegister a push device
subscribeDocumentsPushNotificationPUT /api/2.0/settings/push/docsubscribeSet push subscription

Login history​

MethodHTTP requestDescription
createLoginHistoryReportPOST /api/2.0/security/audit/login/reportStart login history report
getLastLoginEventsGET /api/2.0/security/audit/login/lastGet recent login events
getLoginEventsByFilterGET /api/2.0/security/audit/login/filterGet filtered login events
getLoginHistoryReportGET /api/2.0/security/audit/login/reportGet login history report status
terminateLoginHistoryReportDELETE /api/2.0/security/audit/login/reportTerminate login history report

OAuth2​

MethodHTTP requestDescription
generateJwtTokenGET /api/2.0/security/oauth2/tokenGenerate JWT token

SMTP settings​

MethodHTTP requestDescription
getSmtpOperationStatusGET /api/2.0/smtpsettings/smtp/test/statusGet SMTP test status
getSmtpSettingsGET /api/2.0/smtpsettings/smtpGet SMTP settings
resetSmtpSettingsDELETE /api/2.0/smtpsettings/smtpReset SMTP settings
saveSmtpSettingsPOST /api/2.0/smtpsettings/smtpSave SMTP settings
testSmtpSettingsGET /api/2.0/smtpsettings/smtp/testTest SMTP settings

Authorization​

cookieAuth​

  • Type: API key
  • API key parameter name: asc_auth_key
  • Location:

bearerAuth​

  • Type: HTTP Bearer Token authentication

asc_auth_key​

  • Type: API key
  • API key parameter name: asc_auth_key
  • Location:

Basic​

  • Type: HTTP basic authentication

Bearer​

  • Type: HTTP Bearer Token authentication (JWT)

ApiKeyBearer​

  • Type: API key
  • API key parameter name: ApiKeyBearer
  • Location: HTTP header

OAuth2​

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL:
  • Scopes:
    • read: Read access to protected resources
    • write: Write access to protected resources

OpenId​

x-signature​

  • Type: API key
  • API key parameter name: x-signature
  • Location: