Insights API Endpoints
Use the Insights API methods to retrieve analytics data about your Sauce Labs jobs that you can then use to populate a dashboard that is meaningful for your organization.
Refer to Getting Started for Authentication and Server information.
AI for Insights
Ask AI for Insights
POST /ai-assistant-gateway/v1/insights/ask
- Post a root cause summary to your team channel when a pipeline job fails.
- Check whether a build is stable enough to ship before a release.
- Explain the failing tests on a pull request.
- Feed a weekly quality summary into an internal dashboard.
This call requires a Sauce AI for Insights entitlement. Each request is one question and one answer. Follow-up questions and conversation history are not supported yet. Answers are returned as text. Charts are not included.
Complex questions can take some time to answer. Increase your client timeout if you see issues
Parameters
prompt | | BODY | REQUIRED | STRING | Your question, in plain language. For more precise answers, include a time range, build name, or job ID. Example: |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request POST "https://api.us-west-1.saucelabs.com/ai-assistant-gateway/v1/insights/ask" \
--header "Content-Type: application/json" \
--data '{"prompt": "<your question>"}' | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request POST "https://api.eu-central-1.saucelabs.com/ai-assistant-gateway/insights/ask" \
--header "Content-Type: application/json" \
--data '{"prompt": "<your question>"}' | json_pp
Responses
200 | Success. | |
401 | Unauthorized. Check your username and access key. | |
403 | Forbidden. Your organization does not have a Sauce AI for Insights entitlement. | |
422 | Validation Error. The prompt field is missing or empty. | |
429 | Too Many Requests. You have reached the rate limit. Wait and try again. | |
{
"answer": "<answer>"
}
Analytics
Get Test Results
GET /v1/analytics/tests
Parameters
This call requires start and end parameters OR the time_range parameter.
start | | QUERY | REQUIRED | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | REQUIRED | DATE | The ending date of the period during which the test runs executed, in |
time_range | | QUERY | REQUIRED | DURATION + UNIT | The amount of time backward from the current time that represents the period during which the test runs are executed. Acceptable units include |
build | | QUERY | OPTIONAL | STRING | Limit results to those grouped by this build name. |
build_missing | | QUERY | OPTIONAL | BOOLEAN | Limit results to those without the build name provided. Default value is |
descending | | QUERY | OPTIONAL | BOOLEAN | Sort results by test creation time. Default value is |
error | | QUERY | OPTIONAL | STRING | Limit results to only those that threw the specified error message. |
name | | QUERY | OPTIONAL | STRING | Limit results to only those with the specified name. |
from | | QUERY | OPTIONAL | INTEGER | Begin results list from this record number. Default value is |
owner | | QUERY | OPTIONAL | STRING | Limit results to the provided owner (username). |
scope | | QUERY | OPTIONAL | STRING | Specifies the scope of the
|
size | | QUERY | OPTIONAL | INTEGER | The maximum number of results to return. Default value is |
status | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to only those with a specified status. Supported values are:
|
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/v1/analytics/tests" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/v1/analytics/tests" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"has_more": true,
"items": [
{
"ancestor": "<ancestor>",
"browser": "<browser>",
"browser_normalized": "<browser>",
"build": "build123",
"creation_time": "2023-04-19T10:01:44.785Z",
"details_url": "<url>",
"duration": 5,
"end_time": "2023-04-19T10:01:44.785Z",
"error": "<error>",
"id": "123",
"name": "<name>",
"os": "<os>",
"os_normalized": "<os>",
"owner": "<owner>",
"start_time": "2023-04-19T10:01:44.785Z",
"status": "complete"
}
],
"meta": {
"status": 200
}
}
Get a Summary of Test Metrics
GET /v1/analytics/insights/test-metrics
Parameters
This call requires start and end parameters OR the time_range parameter.
start | | QUERY | REQUIRED | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | REQUIRED | DATE | The ending date of the period during which the test runs executed, in |
time_range | | QUERY | REQUIRED | DURATION + UNIT | The amount of time backward from the current time that represents the period during which the test runs are executed. Acceptable units include |
query | | QUERY | REQUIRED | STRING | The name of the test for which results are requested. |
scope | | QUERY | OPTIONAL | STRING | Specifies the scope of the
|
owner | | QUERY | OPTIONAL | ARRAY of STRINGS | The name of one or more users in the requestor's organization who executed the requested tests. This parameter is required if the |
status | | QUERY | OPTIONAL | STRING | Limit results to only those with a specified status. Supported values are:
|
os | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified operating systems. |
browser | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified browsers. |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/v1/analytics/insights/test-metrics?start=1515687172&end=1516291972&query=AnalyticsSeleniumTest%20on%20OS%20X%2010.10" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/v1/analytics/insights/test-metrics?start=1515687172&end=1516291972&query=AnalyticsSeleniumTest%20on%20OS%20X%2010.10" | json_pp
Responses
200 | Success. | |
400 | Bad Request. May include additional error messages, such as "start and end parameters are required." | |
404 | Not found. | |
{
"meta": {
"status": 200
},
"aggs": {
"count": 1008,
"fastestRun": {
"id": "1cc127f6af024184a45fc45817672a341",
"owner": "a-team",
"ancestor": "a-team",
"name": "AnalyticsSeleniumTest on OS X 10.10",
"build": "",
"creation_time": "2018-01-12T11:50:02Z",
"start_time": "2018-01-12T11:50:02Z",
"end_time": "2018-01-12T11:50:27Z",
"duration": 25,
"status": "passed",
"error": "",
"os": "OS X Yosemite (10.10)",
"os_normalized": "",
"browser": "Chrome 51.0",
"browser_normalized": "",
"details_url": "https://saucelabs.com/rest/v1.1/a-team/jobs/1cc127f6af024184a45fc45817672a341"
},
"slowestRun": {
"id": "faf35305919245ebaceab93712d009b0",
"owner": "a-team",
"ancestor": "a-team",
"name": "AnalyticsSeleniumTest on OS X 10.10",
"build": "",
"creation_time": "2018-01-15T19:10:01Z",
"start_time": "2018-01-15T19:10:01Z",
"end_time": "2018-01-15T19:40:59Z",
"duration": 1858,
"status": "errored",
"error": "Test exceeded maximum duration after 1800 seconds",
"os": "OS X Yosemite (10.10)",
"os_normalized": "",
"browser": "Chrome 51.0",
"browser_normalized": "",
"details_url": "https://saucelabs.com/rest/v1.1/a-team/jobs/faf35305919245ebaceab93712d009b0"
},
"statuses": {
"errored": 7,
"failed": 1,
"passed": 1000
},
"totalQueueTime": 0.3843098311817279,
"totalRunTime": 33.18867924528302
}
}
Get Test Trends
GET /v1/analytics/trends/tests
Parameters
This call requires start and end parameters OR the time_range parameter.
start | | QUERY | REQUIRED | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | REQUIRED | DATE | The ending date of the period during which the test runs executed, in |
time_range | | QUERY | REQUIRED | DURATION + UNIT | The amount of time backward from the current time that represents the period during which the test runs are executed. Acceptable units include |
scope | | QUERY | OPTIONAL | STRING | Specifies the scope of the
|
interval | | QUERY | OPTIONAL | STRING | Relative date filter. Available values are:
1d |
browser | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified browsers. |
build | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to those grouped by this build name. |
device | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified device. |
os | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified operating systems. |
status | | QUERY | OPTIONAL | STRING | Limit results to only those with a specified status. Supported values are:
|
tag | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified tag. |
tag_filter_mode | | QUERY | OPTIONAL | STRING | It changes the default behavior of
or. |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/v1/analytics/trends/tests" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/v1/analytics/trends/tests" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"meta": {
"status": "complete"
},
"buckets": [
{
"timestamp": 1681844306,
"datetime": "2023-04-19T11:03:28.158Z",
"count": 3,
"aggs": {
"browser": [
{
"name": "<browser>",
"count": 3
}
],
"browserError": [
{
"name": "<browser>",
"count": 6
}
],
"browserFail": [
{
"name": "<browser>",
"count": 1
}
],
"device": [
{
"name": "<device>",
"count": 2
}
],
"deviceError": [
{
"name": "<device>",
"count": 4
}
],
"deviceFail": [
{
"name": "<device>",
"count": 3
}
],
"errorMessage": [
{
"name": "<error>",
"count": 6
}
],
"framework": [
{
"name": "<framework>",
"count": 7
}
],
"frameworkError": [
{
"name": "<framework>",
"count": 4
}
],
"frameworkFail": [
{
"name": "<framework>",
"count": 1
}
],
"os": [
{
"name": "<os>",
"count": 2
}
],
"osError": [
{
"name": "<os>",
"count": 5
}
],
"osFail": [
{
"name": "<os>",
"count": 3
}
],
"owner": [
{
"name": "<owner>",
"count": 4
}
],
"status": [
{
"name": "complete",
"count": 2
}
]
}
}
],
"metrics": {
"additionalProp1": {
"additionalProp1": 1,
"additionalProp2": 4,
"additionalProp3": 6
},
"additionalProp2": {
"additionalProp1": 2,
"additionalProp2": 4,
"additionalProp3": 4
},
"additionalProp3": {
"additionalProp1": 2,
"additionalProp2": 3,
"additionalProp3": 4
}
}
}
Get Builds and Tests
GET /v1/analytics/trends/builds_tests
Parameters
This call requires start and end parameters OR the time_range parameter.
start | | QUERY | REQUIRED | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | REQUIRED | DATE | The ending date of the period during which the test runs executed, in |
time_range | | QUERY | REQUIRED | DURATION + UNIT | The amount of time backward from the current time that represents the period during which the test runs are executed. Acceptable units include |
scope | | QUERY | OPTIONAL | STRING | Specifies the scope of the
|
owner | | QUERY | OPTIONAL | ARRAY of STRINGS | The name of one or more users in the requestor's organization who executed the requested tests. This parameter is required if the |
status | | QUERY | OPTIONAL | STRING | Limit results to only those with a specified status. Supported values are:
|
os | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified operating systems. |
browser | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified browsers. |
automation_backend | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified framework. |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/v1/analytics/trends/builds_tests?start=2021-05-01T12:00:00Z&end=2021-05-02T12:00:00Z" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/v1/analytics/trends/builds_tests?start=2021-05-01T12:00:00Z&end=2021-05-02T12:00:00Z" | json_pp
Responses
200 | Success. | |
400 | Bad Request. May include additional error messages, such as "start and end parameters are required." | |
404 | Not found. | |
{
"meta": {
"status": 200
},
"builds": {
"items": [
{
"name": "build-123",
"tests_count": 34,
"duration": 1916,
"start_time": "2017-03-01T12:09:16Z",
"end_time": "2017-03-01T12:41:25Z",
"tests": [
{
"id": "a1a2b38812hy42e5affbd54p9757re5t",
"owner": "USERNAME",
"ancestor": "USERNAME",
"name": "TestStatus",
"creation_time": "2017-03-01T12:09:16Z",
"end_time": "2017-03-01T12:10:44Z",
"status": "failed",
"error": "",
"os": "Linux",
"browser": "Android 5.1",
"details_url": "https://saucelabs.com/rest/v1.1/a-team/jobs/a1a2b38812hy42e5affbd54p9757re5t"
},
// up to 10 items
],
"has_more": true,
"aggs": {
"status": [
{
"name": "complete",
"count": 23
},
{
"name": "passed",
"count": 9
},
{
"name": "failed",
"count": 2
}
]
}
},
// up to 25 builds
],
"has_more": true
},
"tests_missing_build": {
"items": [],
"has_more": false
}
}
Filters
Get Filter Items
GET /v2/insights/{source}/filters
Parameters
source | | PATH | REQUIRED | STRING | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
|
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
status | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to only those with a specified status. Supported values are:
["error", "failed", "passed", "complete"] |
start | | QUERY | OPTIONAL | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | OPTIONAL | DATE | The ending date of the period during which the test runs executed, in |
browser | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified browsers. |
build | | QUERY | OPTIONAL | STRING | Limit results to those grouped by this build name. |
os | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified operating systems. |
tag | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified tag. |
tag_filter_mode | | QUERY | OPTIONAL | STRING | It changes the default behavior of
or. |
device | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified device. |
automation_backend | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified framework. |
user_id | | PATH | REQUIRED | STRING | Return only jobs that belongs to the specified |
group_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
team_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
must_have | | QUERY | OPTIONAL | STRING | It supports |
name | | QUERY | OPTIONAL | STRING | Limit results to only those with the specified name. |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/v2/insights/<source>/filters?org_id=<org_id>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/v2/insights/<source>/filters?org_id=<org_id>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"automation_backend": [
{
"name": "<automation_backend>",
"count": 5
}
],
"browser": [
{
"name": "<browser>",
"count": 7
}
],
"build": [
{
"name": "<build>",
"count": 2
}
],
"os": [
{
"name": "<os>",
"count": 4
}
],
"device": [
{
"name": "<device>",
"count": 8
}
],
"tag": [
{
"name": "<tag>",
"count": 8
}
]
}
Get Filter Items from All Sources
GET /insights/v2/filters
Parameters
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
status | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those with a specified status. Supported values are:
["error", "failed", "passed", "complete"] |
start | | QUERY | OPTIONAL | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | OPTIONAL | DATE | The ending date of the period during which the test runs executed, in |
browser | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified browsers. |
build | | QUERY | OPTIONAL | STRING | Limit results to those grouped by this build name. |
os | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified operating systems. |
tag | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified tag. |
tag_filter_mode | | QUERY | OPTIONAL | STRING | It changes the default behavior of
or. |
device | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified device. |
automation_backend | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified framework. |
user_id | | PATH | REQUIRED | STRING | Return only jobs that belongs to the specified |
group_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
team_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
must_have | | QUERY | OPTIONAL | STRING | It supports |
name | | QUERY | OPTIONAL | STRING | Limit results to only those with the specified name. |
source | | QUERY | OPTIONAL | ARRAY | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
["vdc", "rdc"] |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/insights/v2/filters?org_id=<org_id>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/insights/v2/filters?org_id=<org_id>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"automation_backend": [
{
"name": "<automation_backend>",
"count": 5
}
],
"browser": [
{
"name": "<browser>",
"count": 7
}
],
"build": [
{
"name": "<build>",
"count": 2
}
],
"os": [
{
"name": "<os>",
"count": 4
}
],
"device": [
{
"name": "<device>",
"count": 8
}
],
"tag": [
{
"name": "<tag>",
"count": 8
}
]
}
Activity
Get Activity
GET /rest/v1/users/{user_id}/activity
user_id.Parameters
user_id | | PATH | REQUIRED | STRING | Return only jobs that belongs to the specified |
since | | QUERY | OPTIONAL | DATE | Return only jobs ran from the provided Unix timestamp on. |
until | | QUERY | OPTIONAL | DATE | Return only jobs ran until the provided Unix timestamp. |
level | | QUERY | OPTIONAL | STRING | Specifies the ownership level. Supported values are:
|
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/rest/v1/users/<user_id>/activity" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/rest/v1/users/<user_id>/activity" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"ccy_exec_mean": [
0
],
"ccy_exec_peak": [
0
],
"datestamp": [
"2023-04-18"
],
"jobs": [
0
],
"minutes": [
0
]
}
Get Activity for Users
GET /rest/v1/users_activity
Parameters
users | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to specific users. |
since | | QUERY | OPTIONAL | DATE | Return only jobs ran from the provided Unix timestamp on. |
until | | QUERY | OPTIONAL | DATE | Return only jobs ran until the provided Unix timestamp. |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/rest/v1/users_activity" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/rest/v1/users_activity" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"additionalProp1": {
"ccy_exec_mean": [
0
],
"ccy_exec_peak": [
0
],
"datestamp": [
"2023-04-18"
],
"jobs": [
0
],
"minutes": [
0
]
},
"additionalProp2": {
"ccy_exec_mean": [
0
],
"ccy_exec_peak": [
0
],
"datestamp": [
"2023-04-18"
],
"jobs": [
0
],
"minutes": [
0
]
},
"additionalProp3": {
"ccy_exec_mean": [
0
],
"ccy_exec_peak": [
0
],
"datestamp": [
"2023-04-18"
],
"jobs": [
0
],
"minutes": [
0
]
}
}
Get Activity for Teams
GET /rest/v1/activity/teams
Parameters
id | | QUERY | OPTIONAL | ARRAY of STRINGS | Return results for the specified team |
since | | QUERY | OPTIONAL | DATE | Return only jobs ran from the provided Unix timestamp on. |
until | | QUERY | OPTIONAL | DATE | Return only jobs ran until the provided Unix timestamp. |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/rest/v1/activity/teams" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/rest/v1/activity/teams | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"additionalProp1": {
"ccy_exec_mean": [
0
],
"ccy_exec_peak": [
0
],
"datestamp": [
"2023-04-18"
],
"jobs": [
0
],
"minutes": [
0
]
},
"additionalProp2": {
"ccy_exec_mean": [
0
],
"ccy_exec_peak": [
0
],
"datestamp": [
"2023-04-18"
],
"jobs": [
0
],
"minutes": [
0
]
},
"additionalProp3": {
"ccy_exec_mean": [
0
],
"ccy_exec_peak": [
0
],
"datestamp": [
"2023-04-18"
],
"jobs": [
0
],
"minutes": [
0
]
}
}
Get Activity for Org
GET /rest/v1/activity/organization
Parameters
since | | QUERY | OPTIONAL | DATE | Return only jobs ran from the provided Unix timestamp on. |
until | | QUERY | OPTIONAL | DATE | Return only jobs ran until the provided Unix timestamp. |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/rest/v1/activity/organization" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/rest/v1/activity/organization | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"additionalProp1": {
"ccy_exec_mean": [
0
],
"ccy_exec_peak": [
0
],
"datestamp": [
"2023-04-18"
],
"jobs": [
0
],
"minutes": [
0
]
},
"additionalProp2": {
"ccy_exec_mean": [
0
],
"ccy_exec_peak": [
0
],
"datestamp": [
"2023-04-18"
],
"jobs": [
0
],
"minutes": [
0
]
},
"additionalProp3": {
"ccy_exec_mean": [
0
],
"ccy_exec_peak": [
0
],
"datestamp": [
"2023-04-18"
],
"jobs": [
0
],
"minutes": [
0
]
}
}
Errors
Get Errors
GET/v2/insights/{source}/errors
Parameters
source | | PATH | REQUIRED | STRING | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
|
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
interval | | QUERY | OPTIONAL | STRING | Relative date filter. Available values are:
1d |
user_id | | QUERY | OPTIONAL | STRING | Return only jobs that belongs to the specified |
group_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
team_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
build | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to those grouped by this build name. |
os | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified operating systems. |
device | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified device. |
start | | QUERY | OPTIONAL | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | OPTIONAL | DATE | The ending date of the period during which the test runs executed, in |
limit | | QUERY | OPTIONAL | INTEGER | Identifies the number of records to return. Default value is |
offset | | QUERY | OPTIONAL | INTEGER | Specifies the number of items to be skipped from the beginning of the list. Default value is |
automation_backend | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified framework. |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/v2/insights/rdc/errors?org_id=<org_id>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/v2/insights/rdc/errors?org_id=<org_id>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"buckets": [
{
"name": "abc123",
"count": 1
}
],
"all_items_count": 2,
"total": 3
}
Get Errors Trends
GET /v2/insights/{source}/errors/trends
Parameters
source | | PATH | REQUIRED | STRING | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
|
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
interval | | QUERY | OPTIONAL | STRING | Relative date filter. Available values are:
1d |
user_id | | QUERY | OPTIONAL | STRING | Return only jobs that belongs to the specified |
group_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
team_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
build | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to those grouped by this build name. |
os | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified operating systems. |
device | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified device. |
start | | QUERY | OPTIONAL | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | OPTIONAL | DATE | The ending date of the period during which the test runs executed, in |
time_zone | | QUERY | OPTIONAL | STRING | Specified the time zone. Default value is |
automation_backend | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified framework. |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/v2/insights/rdc/errors/trends?org_id=<org_id>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/v2/insights/rdc/errors/trends?org_id=<org_id>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"histogram": [
{
"count": 2,
"datetime": "2017-03-01T12:16:22Z"
}
],
"trend": {
"current": 2,
"past": 4,
"tests_count": 7
}
}
Test Cases
Get Tests
GET /v2/insights/{source}/tests
Parameters
source | | PATH | REQUIRED | STRING | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
|
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
user_id | | QUERY | OPTIONAL | STRING | Return only jobs that belongs to the specified |
group_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
team_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
build | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to those grouped by this build name. |
os | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified operating systems. |
device | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified device. |
browser | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified browsers. |
tag | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified tag. |
tag_filter_mode | | QUERY | OPTIONAL | STRING | It changes the default behavior of
or. |
error | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those that threw the specified error message. |
name | | QUERY | OPTIONAL | STRING | Limit results to only those with the specified name. |
start | | QUERY | OPTIONAL | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | OPTIONAL | DATE | The ending date of the period during which the test runs executed, in |
limit | | QUERY | OPTIONAL | INTEGER | Identifies the number of records to return. Default value is |
offset | | QUERY | OPTIONAL | INTEGER | Specifies the number of items to be skipped from the beginning of the list. Default value is |
sort_by | | QUERY | OPTIONAL | STRING | Sort the dataset by the specified value. Available values are:
creation_time. |
sort | | QUERY | OPTIONAL | STRING | Sort the dataset in ascending or descending order. Available values are:
desc. |
automation_backend | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified framework. |
device_group | | QUERY | OPTIONAL | STRING | If
|
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/v2/insights/<source>/tests?org_id=<org_id>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/v2/insights/<source>/tests?org_id=<org_id>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"items": [
{
"id": "abc123",
"name": "test1",
"status": "complete",
"creation_time": "2017-03-01T12:13:39Z",
"modification_time": "2017-03-03T14:23:25Z",
"error": "<error>",
"passed": true,
"browser_normalized": "<browser_normalized>",
"os_normalized": "<os_normalized>",
"device_name": "<device_name>",
"device_group": "<device_group>",
"build": "abcd1234",
"automation_backend": "<automation_backend>",
"duration": 15,
"tags": [
"build_abcd1234"
],
"owner": "<owner>",
"ancestor": "<ancestor>",
"user_id": "<user_id>",
"team_id": "<team_id>",
"group_id": "<group_id>",
"org_id": "<org_id>",
"start_time": "2023-04-18T17:51:14.654Z",
"end_time": "2023-04-18T17:51:14.654Z",
"deletion_time": "2023-04-18T17:51:14.654Z",
"is_expired": true
}
],
"total": 3,
"statuses": {
"additionalProp1": 2,
"additionalProp2": 5,
"additionalProp3": 7
},
"max_duration": 10
}
Get Common Tests
GET /insights/v2/tests
Parameters
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
source | | QUERY | OPTIONAL | ARRAY | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
["vdc", "rdc"] |
user_id | | QUERY | OPTIONAL | STRING | Return only jobs that belongs to the specified |
group_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
team_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
automation_backend | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified framework. |
build | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to those grouped by this build name. |
os | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified operating systems. |
device | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified device. |
device_group | | QUERY | OPTIONAL | STRING | Return results only for the specified device group. Available values are:
|
browser | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified browsers. |
tag | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified tag. |
tag_filter_mode | | QUERY | OPTIONAL | STRING | It changes the default behavior of
or. |
error | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those that threw the specified error message. |
name | | QUERY | OPTIONAL | STRING | Limit results to only those with the specified name. |
start | | QUERY | OPTIONAL | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | OPTIONAL | DATE | The ending date of the period during which the test runs executed, in |
limit | | QUERY | OPTIONAL | INTEGER | Identifies the number of records to return. Default value is |
offset | | QUERY | OPTIONAL | INTEGER | Specifies the number of items to be skipped from the beginning of the list. Default value is |
sort_by | | QUERY | OPTIONAL | STRING | Sort the dataset by the specified value. Available values are:
creation_time. |
sort | | QUERY | OPTIONAL | STRING | Sort the dataset in ascending or descending order. Available values are:
desc. |
status | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to only those with a specified status. Supported values are:
|
build_missing | | QUERY | OPTIONAL | BOOLEAN | Limit results to those without the build name provided. Default value is |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/insights/v2/tests?org_id=<org_id>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/insights/v2/tests?org_id=<org_id>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"items": [
{
"id": "abc123",
"name": "test1",
"source": "rdc",
"status": "complete",
"creation_time": "2023-06-05T14:47:21.209Z",
"modification_time": "2023-06-05T14:47:21.209Z",
"error": "<error>",
"passed": true,
"browser_normalized": "<broser>",
"os_normalized": "<os>",
"device_name": "<device>",
"device_group": "private",
"build": "<build>",
"automation_backend": "<automation_backend>",
"duration": 0,
"org_id": "<ord_id>",
"user_id": "<user_id>",
"team_id": "<team_id>",
"group_id": "<group_id>",
"tags": [
"<tag>"
],
"owner": "<owner>",
"ancestor": "<ancestor>",
"start_time": "2023-06-05T14:47:21.209Z",
"end_time": "2023-06-05T14:47:21.209Z",
"deletion_time": "2023-06-05T14:47:21.209Z",
"is_expired": false
}
],
"total": 5,
"statuses": {
"additionalProp1": 3,
"additionalProp2": 5,
"additionalProp3": 2
},
"max_duration": 10
}
Get Test Cases
GET /v2/insights/{source}/test-cases
Parameters
source | | PATH | REQUIRED | STRING | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
|
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
interval | | QUERY | OPTIONAL | STRING | Relative date filter. Available values are:
1d |
user_id | | QUERY | OPTIONAL | STRING | Return only jobs that belongs to the specified |
group_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
team_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
start | | QUERY | OPTIONAL | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | OPTIONAL | DATE | The ending date of the period during which the test runs executed, in |
browser | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified browsers. |
build | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to those grouped by this build name. |
device | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified device. |
os | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified operating systems. |
status | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to only those with a specified status. Supported values are:
|
tag | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified tag. |
tag_filter_mode | | QUERY | OPTIONAL | STRING | It changes the default behavior of
or. |
limit | | QUERY | OPTIONAL | INTEGER | Identifies the number of records to return. Default value is |
offset | | QUERY | OPTIONAL | INTEGER | Specifies the number of items to be skipped from the beginning of the list. Default value is |
sort_by | | QUERY | OPTIONAL | STRING | Sort the dataset by the specified value. Available values are:
total_runs. |
sort | | QUERY | OPTIONAL | STRING | Sort the dataset in ascending or descending order. Available values are:
desc. |
automation_backend | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified framework. |
device_group | | QUERY | OPTIONAL | STRING | If
|
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/v2/insights/<source>/test-cases?org_id=<org_id>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/v2/insights/<source>/test-cases?org_id=<org_id>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"test_cases": [
{
"name": "abc123",
"statuses": {
"additionalProp1": 3,
"additionalProp2": 2,
"additionalProp3": 0
},
"total_runs": 5,
"complete_rate": 5,
"error_rate": 2,
"fail_rate": 1,
"pass_rate": 4,
"avg_duration": 16,
"median_duration": 10,
"total_duration": 20
}
],
"total": 4,
"statuses": {
"additionalProp1": 3,
"additionalProp2": 5,
"additionalProp3": 1
},
"avg_runtime": 15
}
Get Test Cases CSV
GET /v2/insights/{source}/test-cases/csv
Parameters
source | | PATH | REQUIRED | STRING | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
|
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
interval | | QUERY | OPTIONAL | STRING | Relative date filter. Available values are:
1d |
user_id | | QUERY | OPTIONAL | STRING | Return only jobs that belongs to the specified |
group_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
team_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
start | | QUERY | OPTIONAL | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | OPTIONAL | DATE | The ending date of the period during which the test runs executed, in |
browser | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified browsers. |
build | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to those grouped by this build name. |
device | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified device. |
os | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified operating systems. |
status | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to only those with a specified status. Supported values are:
|
tag | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified tag. |
tag_filter_mode | | QUERY | OPTIONAL | STRING | It changes the default behavior of
or. |
sort_by | | QUERY | OPTIONAL | STRING | Sort the dataset by the specified value. Available values are:
total_runs. |
sort | | QUERY | OPTIONAL | STRING | Sort the dataset in ascending or descending order. Available values are:
desc. |
automation_backend | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified framework. |
device_group | | QUERY | OPTIONAL | STRING | If
|
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/v2/insights/<source>/test-cases/csv?org_id=<org_id>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/v2/insights/<source>/test-cases/csv?org_id=<org_id>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{}
Get Test Cases Stats
GET /v2/insights/{source}/test-cases/stats
Parameters
source | | PATH | REQUIRED | STRING | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
|
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
user_id | | QUERY | OPTIONAL | STRING | Return only jobs that belongs to the specified |
group_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
team_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
interval | | QUERY | OPTIONAL | STRING | Relative date filter. Available values are:
1d |
start | | QUERY | OPTIONAL | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | OPTIONAL | DATE | The ending date of the period during which the test runs executed, in |
browser | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified browsers. |
build | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to those grouped by this build name. |
device | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified device. |
os | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified operating systems. |
status | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to only those with a specified status. Supported values are:
|
tag | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified tag. |
tag_filter_mode | | QUERY | OPTIONAL | STRING | It changes the default behavior of
or. |
automation_backend | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified framework. |
device_group | | QUERY | OPTIONAL | STRING | If
|
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/v2/insights/<source>/test-cases/stats?org_id=<org_id>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/v2/insights/<source>/test-cases/stats?org_id=<org_id>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"consistently_complete": 5,
"consistently_error": 1,
"consistently_failing": 0,
"consistently_passing": 6,
"total_test_cases": 12,
"total_test_cases_limited": 15
}
Get Status Trend
GET /v2/insights/{source}/test-cases/trends
Parameters
source | | PATH | REQUIRED | STRING | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
|
groupby | | QUERY| REQUIRED | STRING | Time period for grouping. Available values are:
|
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
start | | QUERY | REQUIRED | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | REQUIRED | DATE | The ending date of the period during which the test runs executed, in |
time_zone | | QUERY | OPTIONAL | STRING | Specified the time zone. Default value is |
team_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
user_id | | QUERY | OPTIONAL | STRING | Return only jobs that belongs to the specified |
browser | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified browsers. |
build | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to those grouped by this build name. |
device | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified device. |
os | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified operating systems. |
tag | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified tag. |
tag_filter_mode | | QUERY | OPTIONAL | STRING | It changes the default behavior of
or. |
name | | QUERY | OPTIONAL | STRING | Limit results to only those with the specified name. |
automation_backend | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified framework. |
device_group | | QUERY | OPTIONAL | STRING | If
|
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/v2/insights/<source>/test-cases/trends?groupby=<groupby>&org_id=<org_id>&start=<start>&end=<end>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/v2/insights/<source>/test-cases/trends?groupby=<groupby>&org_id=<org_id>&start=<start>&end=<end>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"histogram": [
{
"timestamp_s": 1,
"timestamp_ms": 60,
"complete": 10,
"error": 2,
"failed": 3,
"passed": 5
}
]
}
Concurrency
Get Max Concurrency Report CSV
GET /v2/insights/{source}/concurrency/max/csv
Parameters
source | | PATH | REQUIRED | STRING | Return results only for tests run in virtual device cloud. Supported values are:
|
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
start_date | | QUERY | OPTIONAL | DATE | The starting date of the period during which the test runs executed, in |
end_date | | QUERY | OPTIONAL | DATE | The ending date of the period during which the test runs executed, in |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/v2/insights/<source>/concurrency/max/csv?org_id=<org_id>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/v2/insights/<source>/concurrency/max/csv?org_id=<org_id>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{}
Get Max Concurrency Report JSON
GET /v2/insights/{source}/concurrency/max/json
Parameters
source | | PATH | REQUIRED | STRING | Return results only for tests run in virtual device cloud. Supported values are:
|
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
start_date | | QUERY | OPTIONAL | DATE | The starting date of the period during which the test runs executed, in |
end_date | | QUERY | OPTIONAL | DATE | The ending date of the period during which the test runs executed, in |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/v2/insights/<source>/concurrency/max/json?org_id=<org_id>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/v2/insights/<source>/concurrency/max/json?org_id=<org_id>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{}
Coverage
Get Coverage
GET /v2/insights/{source}/coverage/{coverage_field}
coverage_field.Parameters
source | | PATH | REQUIRED | STRING | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
|
coverage_field | | PATH | REQUIRED | STRING | Available values are:
|
automation_backend | | QUERY | OPTIONAL | ARRAY OF STRINGS | Return results only for the specified framework used to run the test. |
interval | | QUERY | OPTIONAL | STRING | Relative date filter. Available values are:
1d |
start | | QUERY | OPTIONAL | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | OPTIONAL | DATE | The ending date of the period during which the test runs executed, in |
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
team_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
user_id | | QUERY | OPTIONAL | STRING | Return only jobs that belongs to the specified |
device_group | | QUERY | OPTIONAL | STRING | Return results only for the specified device group. Available values are:
|
sort_by | | QUERY | OPTIONAL | STRING | Sort the dataset by the specified value. Available values are:
count. |
sort | | QUERY | OPTIONAL | STRING | Sort the dataset in ascending or descending order. Available values are:
desc. |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/v2/insights/<source>/coverage/<coverage_field>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/v2/insights/<source>/coverage/<coverage_field>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"coverage": [
{
"name": "<name>",
"count": 3,
"total_duration": 5
}
],
"max_count": 7
}
Get Coverage from All Sources
GET /insights/v2/coverage/{coverage_field}
coverage_field.Parameters
coverage_field | | PATH | REQUIRED | STRING | Available values are:
|
automation_backend | | QUERY | OPTIONAL | ARRAY OF STRINGS | Return results only for the specified framework used to run the test. |
start | | QUERY | OPTIONAL | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | OPTIONAL | DATE | The ending date of the period during which the test runs executed, in |
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
team_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
user_id | | QUERY | OPTIONAL | STRING | Return only jobs that belongs to the specified |
device_group | | QUERY | OPTIONAL | STRING | Return results only for the specified device group. Available values are:
|
sort_by | | QUERY | OPTIONAL | STRING | Sort the dataset by the specified value. Available values are:
count. |
sort | | QUERY | OPTIONAL | STRING | Sort the dataset in ascending or descending order. Available values are:
desc. |
source | | QUERY | OPTIONAL | ARRAY | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
["vdc", "rdc"] |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/insights/v2/coverage/<coverage_field>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/insights/v2/coverage/<coverage_field>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"coverage": [
{
"name": "<name>",
"count": 3,
"total_duration": 5
}
],
"max_count": 7
}
Get Coverage CSV
GET /v2/insights/{source}/coverage/{coverage_field}/csv
coverage_field in a CSV format.Parameters
source | | PATH | REQUIRED | STRING | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
|
coverage_field | | PATH | REQUIRED | STRING | Available values are: |
automation_backend | | QUERY | OPTIONAL | ARRAY OF STRINGS | Return results only for the specified framework used to run the test. |
interval | | QUERY | OPTIONAL | STRING | Relative date filter. Available values are:
1d |
start | | QUERY | OPTIONAL | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | OPTIONAL | DATE | The ending date of the period during which the test runs executed, in |
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
team_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
user_id | | QUERY | OPTIONAL | STRING | Return only jobs that belongs to the specified |
device_group | | QUERY | OPTIONAL | STRING | Return results only for the specified device group. Available values are:
|
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/v2/insights/<source>/coverage/<coverage_field>/csv" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/v2/insights/<source>/coverage/<coverage_field>/csv" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{}
Get Coverage CSV from All Sources
GET /insights/v2/coverage/{coverage_field}/csv
coverage_field in a CSV format.Parameters
coverage_field | | PATH | REQUIRED | STRING | Available values are:
|
automation_backend | | QUERY | OPTIONAL | ARRAY OF STRINGS | Return results only for the specified framework used to run the test. |
start | | QUERY | OPTIONAL | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | OPTIONAL | DATE | The ending date of the period during which the test runs executed, in |
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
team_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
user_id | | QUERY | OPTIONAL | STRING | Return only jobs that belongs to the specified |
device_group | | QUERY | OPTIONAL | STRING | Return results only for the specified device group. Available values are:
|
source | | QUERY | OPTIONAL | ARRAY | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
["vdc", "rdc"] |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/insights/v2/coverage/<coverage_field>/csv" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/insights/v2/coverage/<coverage_field>/csv" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{}
Trends
Get Trends Tests
GET /v2/insights/{source}/trends/tests
Parameters
source | | PATH | REQUIRED | STRING | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
|
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
interval | | QUERY | OPTIONAL | STRING | Relative date filter. Available values are:
1d |
time_zone | | QUERY | OPTIONAL | STRING | Specified the time zone. Default value is |
user_id | | QUERY | OPTIONAL | STRING | Return only jobs that belongs to the specified |
group_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
team_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
start | | QUERY | OPTIONAL | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | OPTIONAL | DATE | The ending date of the period during which the test runs executed, in |
browser | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified browsers. |
build | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to those grouped by this build name. |
device | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified device. |
os | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified operating systems. |
status | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to only those with a specified status. Supported values are:
|
tag | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified tag. |
tag_filter_mode | | QUERY | OPTIONAL | STRING | It changes the default behavior of
or. |
automation_backend | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified framework. |
device_group | | QUERY | OPTIONAL | STRING | If
|
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/v2/insights/<source>/trends/tests?org_id=<org_id>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/v2/insights/<source>/trends/tests?org_id=<org_id>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"meta": {
"status": "complete"
},
"buckets": [
{
"timestamp": 1681844306,
"datetime": "2017-03-01T12:13:39Z",
"count": 3,
"aggs": {
"browser": [
{
"name": "<browser>",
"count": 3
}
],
"browserError": [
{
"name": "<browser>",
"count": 1
}
],
"browserFail": [
{
"name": "<browser>",
"count": 4
}
],
"device": [
{
"name": "<device>",
"count": 6
}
],
"deviceError": [
{
"name": "<device>",
"count": 2
}
],
"deviceFail": [
{
"name": "<device>",
"count": 5
}
],
"errorMessage": [
{
"name": "<error>",
"count": 0
}
],
"framework": [
{
"name": "<framework>",
"count": 0
}
],
"frameworkError": [
{
"name": "<framework>",
"count": 0
}
],
"frameworkFail": [
{
"name": "<framework>",
"count": 0
}
],
"os": [
{
"name": "<os>",
"count": 8
}
],
"osError": [
{
"name": "<os>",
"count": 2
}
],
"osFail": [
{
"name": "<os>",
"count": 7
}
],
"owner": [
{
"name": "<owner>",
"count": 0
}
],
"status": [
{
"name": "<status>",
"count": 0
}
]
}
}
],
"metrics": {
"additionalProp1": {
"additionalProp1": 1,
"additionalProp2": 4,
"additionalProp3": 5
},
"additionalProp2": {
"additionalProp1": 6,
"additionalProp2": 8,
"additionalProp3": 3
},
"additionalProp3": {
"additionalProp1": 6,
"additionalProp2": 7,
"additionalProp3": 2
}
}
}
Get Trends Tests from All Sources
GET /insights/v2/trends/tests
Parameters
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
interval | | QUERY | OPTIONAL | STRING | Relative date filter. Available values are:
1d |
time_zone | | QUERY | OPTIONAL | STRING | Specified the time zone. Default value is |
user_id | | QUERY | OPTIONAL | STRING | Return only jobs that belongs to the specified |
group_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
team_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
start | | QUERY | OPTIONAL | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | OPTIONAL | DATE | The ending date of the period during which the test runs executed, in |
automation_backend | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified framework. |
browser | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified browsers. |
build | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to those grouped by this build name. |
device | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified device. |
device_group | | QUERY | OPTIONAL | STRING | Return results only for the specified device group. Available values are:
|
os | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified operating systems. |
source | | QUERY | OPTIONAL | ARRAY | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
["vdc", "rdc"] |
status | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to only those with a specified status. Supported values are:
["error", "failed", "passed", "complete"] |
tag | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified tag. |
tag_filter_mode | | QUERY | OPTIONAL | STRING | It changes the default behavior of
or. |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/insights/v2/trends/tests?org_id=<org_id>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/insights/v2/trends/tests?org_id=<org_id>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"meta": {
"status": "complete"
},
"buckets": [
{
"timestamp": 1681844306,
"datetime": "2017-03-01T12:13:39Z",
"count": 3,
"aggs": {
"browser": [
{
"name": "<browser>",
"count": 3
}
],
"browserError": [
{
"name": "<browser>",
"count": 1
}
],
"browserFail": [
{
"name": "<browser>",
"count": 4
}
],
"device": [
{
"name": "<device>",
"count": 6
}
],
"deviceError": [
{
"name": "<device>",
"count": 2
}
],
"deviceFail": [
{
"name": "<device>",
"count": 5
}
],
"errorMessage": [
{
"name": "<error>",
"count": 0
}
],
"framework": [
{
"name": "<framework>",
"count": 0
}
],
"frameworkError": [
{
"name": "<framework>",
"count": 0
}
],
"frameworkFail": [
{
"name": "<framework>",
"count": 0
}
],
"os": [
{
"name": "<os>",
"count": 8
}
],
"osError": [
{
"name": "<os>",
"count": 2
}
],
"osFail": [
{
"name": "<os>",
"count": 7
}
],
"owner": [
{
"name": "<owner>",
"count": 0
}
],
"status": [
{
"name": "<status>",
"count": 0
}
]
}
}
],
"metrics": {
"additionalProp1": {
"additionalProp1": 1,
"additionalProp2": 4,
"additionalProp3": 5
},
"additionalProp2": {
"additionalProp1": 6,
"additionalProp2": 8,
"additionalProp3": 3
},
"additionalProp3": {
"additionalProp1": 6,
"additionalProp2": 7,
"additionalProp3": 2
}
}
}
Get Trends Errors
GET /v2/insights/{source}/trends/errors
Parameters
source | | PATH | REQUIRED | STRING | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
|
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
interval | | QUERY | OPTIONAL | STRING | Relative date filter. Available values are:
1d |
user_id | | QUERY | OPTIONAL | STRING | Return only jobs that belongs to the specified |
group_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
team_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
start | | QUERY | OPTIONAL | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | OPTIONAL | DATE | The ending date of the period during which the test runs executed, in |
browser | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified browsers. |
build | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to those grouped by this build name. |
device | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified device. |
os | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified operating systems. |
status | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to only those with a specified status. Supported values are:
|
tag | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified tag. |
tag_filter_mode | | QUERY | OPTIONAL | STRING | It changes the default behavior of
or. |
automation_backend | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified framework. |
device_group | | QUERY | OPTIONAL | STRING | If
|
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/v2/insights/<source>/trends/errors?org_id=<org_id>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/v2/insights/<source>/trends/errors?org_id=<org_id>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"meta": {
"status": "complete"
},
"buckets": [
{
"name": "<name>",
"count": 3,
"items": [
{
"id": "abc123",
"owner": "<owner>",
"ancestor": "<ancestor>",
"name": "<name>",
"build": "build123",
"creation_time": "2023-04-18T21:14:29.374Z",
"start_time": "2023-04-18T21:14:29.374Z",
"end_time": "2023-04-18T21:14:29.374Z",
"duration": 4,
"status": "complete",
"error": "<error>",
"os": "<os>",
"os_normalized": "<os>",
"browser": "<browser>",
"browser_normalized": "<browser>",
"details_url": "<url>"
}
],
"has_more": true
}
],
"all_items_count": 4
}
Get Trends Errors from All Sources
GET /insights/v2/trends/errors
Parameters
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
user_id | | QUERY | OPTIONAL | STRING | Return only jobs that belongs to the specified |
group_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
team_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
start | | QUERY | OPTIONAL | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | OPTIONAL | DATE | The ending date of the period during which the test runs executed, in |
automation_backend | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified framework. |
browser | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified browsers. |
build | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to those grouped by this build name. |
device | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified device. |
os | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified operating systems. |
source | | QUERY | OPTIONAL | ARRAY | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
["vdc", "rdc"] |
status | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to only those with a specified status. Supported values are:
["error", "failed", "passed", "complete"] |
tag | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified tag. |
tag_filter_mode | | QUERY | OPTIONAL | STRING | It changes the default behavior of
or. |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/insights/v2/trends/errors?org_id=<org_id>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/insights/v2/trends/errors?org_id=<org_id>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"meta": {
"status": "complete"
},
"buckets": [
{
"name": "<name>",
"count": 3,
"items": [
{
"id": "abc123",
"owner": "<owner>",
"ancestor": "<ancestor>",
"name": "<name>",
"build": "build123",
"creation_time": "2023-04-18T21:14:29.374Z",
"start_time": "2023-04-18T21:14:29.374Z",
"end_time": "2023-04-18T21:14:29.374Z",
"duration": 4,
"status": "complete",
"error": "<error>",
"os": "<os>",
"os_normalized": "<os>",
"browser": "<browser>",
"browser_normalized": "<browser>",
"details_url": "<url>"
}
],
"has_more": true
}
],
"all_items_count": 4
}
Get Trends Builds Tests
GET /v2/insights/{source}/trends/builds_tests
Parameters
source | | PATH | REQUIRED | STRING | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
|
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
interval | | QUERY | OPTIONAL | STRING | Relative date filter. Available values are:
1d |
user_id | | QUERY | OPTIONAL | STRING | Return only jobs that belongs to the specified |
group_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
team_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
start | | QUERY | OPTIONAL | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | OPTIONAL | DATE | The ending date of the period during which the test runs executed, in |
browser | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified browsers. |
build | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to those grouped by this build name. |
device | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified device. |
os | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified operating systems. |
status | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to only those with a specified status. Supported values are:
|
tag | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified tag. |
tag_filter_mode | | QUERY | OPTIONAL | STRING | It changes the default behavior of
or. |
automation_backend | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified framework. |
device_group | | QUERY | OPTIONAL | STRING | If
|
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/v2/insights/<source>/trends/builds_tests?org_id=<org_id>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/v2/insights/<source>/trends/builds_tests?org_id=<org_id>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"meta": {
"status": "passed"
},
"builds": {
"items": [
{
"name": "<name>",
"tests_count": 5,
"owner": "<owner>",
"duration": 4,
"duration_absolute": 6,
"duration_test_max": 9,
"start_time": "2023-04-18T21:32:45.153Z",
"end_time": "2023-04-18T21:32:45.153Z",
"tests": [
{
"id": "abc123",
"owner": "<owner>",
"ancestor": "<ancestor>",
"name": "<name>",
"build": "build123",
"creation_time": "2023-04-18T21:32:45.153Z",
"start_time": "2023-04-18T21:32:45.153Z",
"end_time": "2023-04-18T21:32:45.153Z",
"duration": 9,
"status": "passed",
"error": "<error>",
"os": "<os>",
"os_normalized": "<os>",
"browser": "<browser>",
"browser_normalized": "<browser>",
"details_url": "<url>",
"is_expired": true
}
],
"aggs": {
"status": [
{
"name": "passed",
"count": 8
}
]
}
}
],
"has_more": true,
"total": 10
},
"tests_missing_build": {
"items": [
{
"id": "def456",
"owner": "<owner>",
"ancestor": "<ancestor>",
"name": "<name>",
"build": "build456",
"creation_time": "2023-04-18T21:32:45.153Z",
"start_time": "2023-04-18T21:32:45.153Z",
"end_time": "2023-04-18T21:32:45.153Z",
"duration": 10,
"status": "failed",
"error": "<error>",
"os": "<os>",
"os_normalized": "<os>",
"browser": "<browser>",
"browser_normalized": "<browser>",
"details_url": "<url>",
"is_expired": true
}
],
"has_more": true,
"total": 0
}
}
Get Trends Builds Tests from All Sources
GET /insights/v2/trends/builds-tests
Parameters
org_id | | QUERY| REQUIRED | STRING | Return results only for the specified |
user_id | | QUERY | OPTIONAL | STRING | Return only jobs that belongs to the specified |
group_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
team_id | | QUERY | OPTIONAL | STRING | Return results only for the specified |
start | | QUERY | OPTIONAL | DATE | The starting date of the period during which the test runs executed, in |
end | | QUERY | OPTIONAL | DATE | The ending date of the period during which the test runs executed, in |
automation_backend | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified framework. |
browser | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified browsers. |
build | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to those grouped by this build name. |
device | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified device. |
device_group | | QUERY | OPTIONAL | STRING | Return results only for the specified device group. Available values are:
|
os | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified operating systems. |
source | | QUERY | OPTIONAL | ARRAY | Return results only for tests run in virtual device cloud or real device cloud. Supported values are:
["vdc", "rdc"] |
status | | QUERY | OPTIONAL | ARRAY of STRINGS | Limit results to only those with a specified status. Supported values are:
["error", "failed", "passed", "complete"] |
tag | | QUERY | OPTIONAL | ARRAY OF STRINGS | Limit results to only those run on the specified tag. |
tag_filter_mode | | QUERY | OPTIONAL | STRING | It changes the default behavior of
or. |
- United States
- Europe
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.us-west-1.saucelabs.com/insights/v2/trends/builds-tests?org_id=<org_id>" | json_pp
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET "https://api.eu-central-1.saucelabs.com/insights/v2/trends/builds-tests?org_id=<org_id>" | json_pp
Responses
200 | Success. | |
422 | Validation Error. | |
{
"meta": {
"status": "passed"
},
"builds": {
"items": [
{
"name": "<name>",
"tests_count": 5,
"owner": "<owner>",
"duration": 4,
"duration_absolute": 6,
"duration_test_max": 9,
"start_time": "2023-04-18T21:32:45.153Z",
"end_time": "2023-04-18T21:32:45.153Z",
"tests": [
{
"id": "abc123",
"owner": "<owner>",
"ancestor": "<ancestor>",
"name": "<name>",
"build": "build123",
"creation_time": "2023-04-18T21:32:45.153Z",
"start_time": "2023-04-18T21:32:45.153Z",
"end_time": "2023-04-18T21:32:45.153Z",
"duration": 9,
"status": "passed",
"error": "<error>",
"os": "<os>",
"os_normalized": "<os>",
"browser": "<browser>",
"browser_normalized": "<browser>",
"details_url": "<url>",
"is_expired": true
}
],
"aggs": {
"status": [
{
"name": "passed",
"count": 8
}
]
}
}
],
"has_more": true,
"total": 10
},
"tests_missing_build": {
"items": [
{
"id": "def456",
"owner": "<owner>",
"ancestor": "<ancestor>",
"name": "<name>",
"build": "build456",
"creation_time": "2023-04-18T21:32:45.153Z",
"start_time": "2023-04-18T21:32:45.153Z",
"end_time": "2023-04-18T21:32:45.153Z",
"duration": 10,
"status": "failed",
"error": "<error>",
"os": "<os>",
"os_normalized": "<os>",
"browser": "<browser>",
"browser_normalized": "<browser>",
"details_url": "<url>",
"is_expired": true
}
],
"has_more": true,
"total": 0
}
}