Skip to main content
Root Cause AnalysisGet AI-powered Root Cause Analysis for test failures.
TestMu AI
StatusCommunityBlog
Root Cause Analysis

Get AI-powered Root Cause Analysis for test failures.

This endpoint retrieves the AI-powered Root Cause Analysis (RCA) for the specified test, job, task, or stage IDs. The RCA returned by this API matches the same test-level AI RCA displayed on the UI dashboard. At least one of test_ids, job_ids, task_ids, or stage_ids must be provided.

GET
/rca
Get AI-powered Root Cause Analysis for test failures.
curl --request GET \
--url "https://api.lambdatest.com/insights/api/v3/public/rca" \
--header "Authorization: Basic <encoded-value>"
{
"status": "success",
"data": [
{
"test_id": "RMAA-AND-160849-XXXX",
"job_id": "e3251d99-805a-4b3f-a3f5-c0ea9b1d2e3f",
"stage_id": "stage-xyz-67890",
"task_id": "task-abc-12345",
"build_id": "290136414",
"rca_category": "Test Data Issue",
"create_timestamp": "2026-03-05T11:13:32Z",
"rca_detail": {
"root_cause_category": "Test Data Issue",
"parent_failure_category": "Infrastructure Issue",
"failure_summary": "App could not reach backend server, so the expected button was not displayed and the test failed.",
"stack_trace": "org.openqa.selenium.NoSuchElementException: no such element...",
"root_cause_failure_stack_trace": "java.net.ConnectException: Connection refused (Connection refused)...",
"analysis": [
"Device logs show the app could not connect to the backend server.",
"Because the server call failed, the expected UI element was never loaded."
],
"steps_to_fix": [
{
"issue": "Backend server not reachable from the test device.",
"module": "Mobile app backend connection",
"suggested_fix": "Ensure the backend server is accessible from the test environment."
}
],
"error_timeline": [
{
"step_name": "App connects to backend",
"timestamp": "2026-03-05T11:17:22Z",
"source_log": "Device Logs",
"summary": "Connection to backend server timed out."
}
]
}
}
],
"pagination": {
"limit": 10,
"page": 1,
"total": 1
}
}

Authorizations

Authorizationstringheaderrequired

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Query Parameters

test_idsstring

Comma-separated list of test IDs to fetch RCA for.

job_idsstring

Comma-separated list of job IDs to fetch RCA for.

task_idsstring

Comma-separated list of task IDs to fetch RCA for.

stage_idsstring

Comma-separated list of stage IDs to fetch RCA for.

pageinteger

Page number for paginated results. Default is 1.

limitinteger

Maximum number of records to return per page. Default is 10.

Response

application/json

Successful operation

statusstring
dataobject[]
data.test_idstring
Example: "RMAA-AND-160849-XXXX"
data.job_idstring
Example: "e3251d99-805a-4b3f-a3f5-c0ea9b1d2e3f"
data.stage_idstring
Example: "stage-xyz-67890"
data.task_idstring
Example: "task-abc-12345"
data.build_idstring
Example: "290136414"
data.rca_categorystring
Example: "Test Data Issue"
data.create_timestampstring
Example: "2026-03-05T11:13:32Z"
data.rca_detailobject
paginationobject
pagination.limitnumber
Example: 10
pagination.pagenumber
Example: 1
pagination.totalnumber
Example: 1
Get AI-powered Root Cause Analysis for test failures.
curl --request GET \
--url "https://api.lambdatest.com/insights/api/v3/public/rca" \
--header "Authorization: Basic <encoded-value>"
{
"status": "success",
"data": [
{
"test_id": "RMAA-AND-160849-XXXX",
"job_id": "e3251d99-805a-4b3f-a3f5-c0ea9b1d2e3f",
"stage_id": "stage-xyz-67890",
"task_id": "task-abc-12345",
"build_id": "290136414",
"rca_category": "Test Data Issue",
"create_timestamp": "2026-03-05T11:13:32Z",
"rca_detail": {
"root_cause_category": "Test Data Issue",
"parent_failure_category": "Infrastructure Issue",
"failure_summary": "App could not reach backend server, so the expected button was not displayed and the test failed.",
"stack_trace": "org.openqa.selenium.NoSuchElementException: no such element...",
"root_cause_failure_stack_trace": "java.net.ConnectException: Connection refused (Connection refused)...",
"analysis": [
"Device logs show the app could not connect to the backend server.",
"Because the server call failed, the expected UI element was never loaded."
],
"steps_to_fix": [
{
"issue": "Backend server not reachable from the test device.",
"module": "Mobile app backend connection",
"suggested_fix": "Ensure the backend server is accessible from the test environment."
}
],
"error_timeline": [
{
"step_name": "App connects to backend",
"timestamp": "2026-03-05T11:17:22Z",
"source_log": "Device Logs",
"summary": "Connection to backend server timed out."
}
]
}
}
],
"pagination": {
"limit": 10,
"page": 1,
"total": 1
}
}