Skip to main content
SessionFetch list of all sessions
TestMu AI
StatusCommunityBlog
Session

Fetch list of all sessions

To fetch list of sessions. You can also limit the number of records, and paginate through your data using Parameters.

GET
/sessions
Fetch list of all sessions
curl --request GET \
--url "https://api.lambdatest.com/automation/api/v1/sessions" \
--header "Authorization: Basic <encoded-value>"
{
"Meta": {
"attributes": {
"org_id": 123
},
"result_set": {
"count": 123,
"limit": 123,
"offset": 123,
"total": 123
}
},
"data": [
{
"test_id": "Z17EF-OPUKH-BDAE8-YEPXU",
"build_id": 1,
"build_name": "MACOS 10.12-CHROME-2018-12-23",
"user_id": 250563,
"username": "bahubali",
"status_ind": "passed",
"create_timestamp": "2019-02-05T08:24:36.000Z",
"start_timestamp": "2019-02-05T08:24:58.000Z",
"end_timestamp": "2019-02-05T08:27:22.000Z",
"remark": "completed",
"browser": "chrome",
"platform": "sierra",
"version": "39.0",
"name": "macos 10.12-chrome-39.0",
"session_id": "e7f2d78de1a8822c98e91e49428d0569",
"device": "<string>",
"duration": "8",
"test_type": "selenium",
"tag": [
"tag1",
"tag2",
"tag3"
],
"customdata": {},
"selenium_logs": "https://api.lambdatest.com/automation/api/v1/sessions/bc02fd99593f14e37850745d66197f89/log/selenium",
"console_logs": "https://api.lambdatest.com/automation/api/v1/sessions/bc02fd99593f14e37850745d66197f89/log/console",
"network_logs": "https://api.lambdatest.com/automation/api/v1/sessions/bc02fd99593f14e37850745d66197f89/log/network",
"command_logs": "http://api.lambdatest.com/automation/api/v1/sessions/bc02fd99593f14e37850745d66197f89/log/command"
}
]
}

Authorizations

Authorizationstringheaderrequired

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

Query Parameters

build_idinteger

To filter sessions of specific build.

usernamestring

To filter sessions of specific user.

test_namestring

To filter sessions of specific test name.

offsetinteger

It defines the number of lists on the basis of limit parameter. e.g offset=10

limitinteger

To fetch specified number of records. e.g. limit=10

statusstring

To fetch the list of sessions with specific statuses. You can pass multiple comma seperated statuses e.g. running,queued,completed,passed,failed,timeout,error and lambda-error.

fromdatestring

To fetch the list of sessions that executed from the specified Start Date. The Date format must be YYYY-MM-DD. e.g. "2018-03-15".

todatestring

To fetch the list of sessions that executed till the specified End Date. If both fromdate and todate value provided then it works as range filter. The Date format must be YYYY-MM-DD. e.g. "2018-03-15".

sortstring

To sort the list in ascending or descending order using multiple keys. e.g. "asc.user_id,desc.duration"

tagsstring

To filter basis on test tags. e.g. "testTag1,testTag2,testTag3"

Response

application/json

successful operation

Metaobjectrequired
Meta.attributesobject
Meta.result_setobject
dataobject[]required
data.test_idstring
Example: "Z17EF-OPUKH-BDAE8-YEPXU"
data.build_idnumber
Example: 1
data.build_namestring
Example: "MACOS 10.12-CHROME-2018-12-23"
data.user_idnumber
Example: 250563
data.usernamestring
Example: "bahubali"
data.status_indstring
Example: "passed"
data.create_timestampstring
Example: "2019-02-05T08:24:36.000Z"
data.start_timestampstring
Example: "2019-02-05T08:24:58.000Z"
data.end_timestampstring
Example: "2019-02-05T08:27:22.000Z"
data.remarkstring
Example: "completed"
data.browserstring
Example: "chrome"
data.platformstring
Example: "sierra"
data.versionstring
Example: "39.0"
data.namestring
Example: "macos 10.12-chrome-39.0"
data.session_idstring
Example: "e7f2d78de1a8822c98e91e49428d0569"
data.devicestring
Example: "<string>"
data.durationstring
Example: "8"
data.test_typestring
Example: "selenium"
data.tagstring[]
Example:
["tag1","tag2","tag3"]
data.customdataobject
data.selenium_logsstring
Example: "https://api.lambdatest.com/automation/api/v1/sessions/bc02fd99593f14e37850745d66197f89/log/selenium"
data.console_logsstring
Example: "https://api.lambdatest.com/automation/api/v1/sessions/bc02fd99593f14e37850745d66197f89/log/console"
data.network_logsstring
Example: "https://api.lambdatest.com/automation/api/v1/sessions/bc02fd99593f14e37850745d66197f89/log/network"
data.command_logsstring
Example: "http://api.lambdatest.com/automation/api/v1/sessions/bc02fd99593f14e37850745d66197f89/log/command"
Fetch list of all sessions
curl --request GET \
--url "https://api.lambdatest.com/automation/api/v1/sessions" \
--header "Authorization: Basic <encoded-value>"
{
"Meta": {
"attributes": {
"org_id": 123
},
"result_set": {
"count": 123,
"limit": 123,
"offset": 123,
"total": 123
}
},
"data": [
{
"test_id": "Z17EF-OPUKH-BDAE8-YEPXU",
"build_id": 1,
"build_name": "MACOS 10.12-CHROME-2018-12-23",
"user_id": 250563,
"username": "bahubali",
"status_ind": "passed",
"create_timestamp": "2019-02-05T08:24:36.000Z",
"start_timestamp": "2019-02-05T08:24:58.000Z",
"end_timestamp": "2019-02-05T08:27:22.000Z",
"remark": "completed",
"browser": "chrome",
"platform": "sierra",
"version": "39.0",
"name": "macos 10.12-chrome-39.0",
"session_id": "e7f2d78de1a8822c98e91e49428d0569",
"device": "<string>",
"duration": "8",
"test_type": "selenium",
"tag": [
"tag1",
"tag2",
"tag3"
],
"customdata": {},
"selenium_logs": "https://api.lambdatest.com/automation/api/v1/sessions/bc02fd99593f14e37850745d66197f89/log/selenium",
"console_logs": "https://api.lambdatest.com/automation/api/v1/sessions/bc02fd99593f14e37850745d66197f89/log/console",
"network_logs": "https://api.lambdatest.com/automation/api/v1/sessions/bc02fd99593f14e37850745d66197f89/log/network",
"command_logs": "http://api.lambdatest.com/automation/api/v1/sessions/bc02fd99593f14e37850745d66197f89/log/command"
}
]
}