Skip to main content

testExternalDatabaseConnection

ConnectionTestResultWrapper testExternalDatabaseConnection(ExternalDatabaseConnectionRequestDto)

POST /api/2.0/settings/authservice/externaldb/test

Test external database connection

Probes connectivity to an external database using the settings supplied in the request, without saving them or affecting the portal's own configuration. Requires Owner or DocSpaceAdmin (the EditPortalSettings permission). SQLite is only accepted as a target on a Standalone (self-hosted) installation; requesting it on SaaS is reported as a failed connection rather than an error. This is a read-only call, safe to retry. A failed connection is not an HTTP error: the response always comes back as a normal success with success=false and an error message describing what went wrong.

Parameters​

NameInTypeDescriptionNotes
ExternalDatabaseConnectionRequestDtobodyExternalDatabaseConnectionRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200Connection test result: a success flag and, on failure, an error messageConnectionTestResultWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403The caller has no portal-settings right--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
400Bad Request.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

ConnectionTestResultWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json