Test a datasource connection
POST
/v1/admin/datasources/{id}/test-connection
const url = 'https://localhost:8080/v1/admin/datasources/example/test-connection';const options = {method: 'POST', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://localhost:8080/v1/admin/datasources/example/test-connection \ --header 'Authorization: <Authorization>'Runs a synchronous connectivity check for a single datasource and returns the result immediately, instead of waiting for the next scheduled health probe sweep
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Datasource ID
Responses
Section titled “Responses”OK
Media typeapplication/json
object
data
object
datasource_id
string
datasource_name
string
datasource_type
string
error_message
string
last_checked
string
last_success
string
status
string
success
boolean
Example
{ "data": { "status": "healthy" }}Unauthorized
Media typeapplication/json
object
error
string
message
string
success
boolean
Example
{ "error": "", "message": "Success", "success": true}Forbidden
Media typeapplication/json
object
error
string
message
string
success
boolean
Example
{ "error": "", "message": "Success", "success": true}Not Found
Media typeapplication/json
object
error
string
message
string
success
boolean
Example
{ "error": "", "message": "Success", "success": true}Internal Server Error
Media typeapplication/json
object
error
string
message
string
success
boolean
Example
{ "error": "", "message": "Success", "success": true}Service Unavailable
Media typeapplication/json
object
error
string
message
string
success
boolean
Example
{ "error": "", "message": "Success", "success": true}