Skip to main content
Sessioncommand logs of a test session
TestMu AI
StatusCommunityBlog
Session

command logs of a test session

To fetch the all executed commands of a test session in plain json text. Optionally pass annotationId to fetch annotation-specific command logs.

GET
/sessions/{session_id}/log/command
command logs of a test session
curl --request GET \
--url "https://api.lambdatest.com/automation/api/v1/sessions/{session_id}/log/command" \
--header "Authorization: Basic <encoded-value>"
{
"data": [
{
"logType": "requestLog",
"testID": "5HLCQ-HPCWH-UOE2O-2CUFA",
"status": 0,
"timestamp": 1551356385,
"Value": {
"requestId": "82e3b7cd-3b04-4bc8-9d2b-567aff450fe4",
"RequestStartTime": 1551356385,
"requestMethod": "POST",
"requestPath": "/wd/hub/session/2F42BCCC-BF43-426A-A72F-F58F58167496/element/node-DF5D363E-84A2-4CA4-9AC4-0F398C606082/click",
"duration": 8,
"requestBody": "{\"sessionId\": \"2F42BCCC-BF43-426A-A72F-F58F58167496\", \"id\": \"node-DF5D363E-84A2-4CA4-9AC4-0F398C606082\"}",
"responseBody": "{\"status\":0,\"sessionId\":\"2F42BCCC-BF43-426A-A72F-F58F58167496\",\"value\":{}}",
"responseStatus": "200 OK",
"screenshotId": "<string>"
}
}
]
}

Authorizations

Authorizationstringheaderrequired

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

Path Parameters

session_idstringrequired

Session ID

Query Parameters

annotationIdstring

Annotation ID (slug) to fetch command logs for a specific annotation. Take this value from the annotationId field of a placeholder entry in the full command log response (e.g. open-homepage_1). When provided, returns only the command logs for that annotation on the requested page.

pageNumberinteger

Page number of the annotation command log to fetch. Only used when annotationId is set. Defaults to 1. Annotations spanning multiple pages require separate calls per page.

Response

application/json

successful operation

dataobject[]required
data.logTypestring
Example: "requestLog"
data.testIDstring
Example: "5HLCQ-HPCWH-UOE2O-2CUFA"
data.statusnumber
Example: 0
data.timestampnumber
Example: 1551356385
data.Valueobject
command logs of a test session
curl --request GET \
--url "https://api.lambdatest.com/automation/api/v1/sessions/{session_id}/log/command" \
--header "Authorization: Basic <encoded-value>"
{
"data": [
{
"logType": "requestLog",
"testID": "5HLCQ-HPCWH-UOE2O-2CUFA",
"status": 0,
"timestamp": 1551356385,
"Value": {
"requestId": "82e3b7cd-3b04-4bc8-9d2b-567aff450fe4",
"RequestStartTime": 1551356385,
"requestMethod": "POST",
"requestPath": "/wd/hub/session/2F42BCCC-BF43-426A-A72F-F58F58167496/element/node-DF5D363E-84A2-4CA4-9AC4-0F398C606082/click",
"duration": 8,
"requestBody": "{\"sessionId\": \"2F42BCCC-BF43-426A-A72F-F58F58167496\", \"id\": \"node-DF5D363E-84A2-4CA4-9AC4-0F398C606082\"}",
"responseBody": "{\"status\":0,\"sessionId\":\"2F42BCCC-BF43-426A-A72F-F58F58167496\",\"value\":{}}",
"responseStatus": "200 OK",
"screenshotId": "<string>"
}
}
]
}