Session › command logs of a test session
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.
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 Authorization string header required
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters session_id string required
Session ID
Query Parameters annotationId string
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.
pageNumber integer
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 200▼
application/json successful operation
data object[] required
▶ Hide child attributesdata. logType string
Example: "requestLog"
data. testID string
Example: "5HLCQ-HPCWH-UOE2O-2CUFA"
data. status number
Example: 0
data. timestamp number
Example: 1551356385
data. Value object
▶ Show child attributes
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>"
}
}
]
}