Skip to content

browserstack-clientReadme | API


browserstack-client / AppAutomateClient

Class: AppAutomateClient

AppAutomateClient represents a client for interacting with the BrowserStack App Automate API.

Index

See

https://www.browserstack.com/app-automate/rest-api

Extends

  • APIClient

Constructors

new AppAutomateClient(options)

new AppAutomateClient(options?): AppAutomateClient

Constructs a new instance of the AppAutomateClient class.

Parameters

ParameterTypeDescription
options?BrowserStackOptionsOptional configuration options for the client.

Returns

AppAutomateClient

Overrides

APIClient.constructor

Source

src/app-automate.ts:19

Methods

getPlan()

getPlan(options?): Promise<Object>

Retrieves the plan information for App Automate.

Parameters

ParameterTypeDescription
options?APIFetchOptions<Object>The fetch options for the request.

Returns

Promise<Object>

A promise that resolves with the plan information.

MemberTypeDescription
automate_planstringDescription
Specifies your Automate plan name

Example
Automate Mobile
parallel_sessions_runningnumberDescription
Number of parallel sessions currently running

Example
0
parallel_sessions_max_allowednumberDescription
Maximum number of parallel sessions you can run

Example
0
team_parallel_sessions_max_allowednumberDescription
Maximum number of parallel sessions allowed in a team

Example
250
queued_sessionsnumberDescription
Number of sessions currently queued

Example
10
queued_sessions_max_allowednumberDescription
Maximum number of sessions that can be queued

Example
240

Source

src/app-automate.ts:31


getDevices()

getDevices(options?): Promise<Object[]>

Retrieves the list of devices available for App Automate.

Parameters

ParameterTypeDescription
options?APIFetchOptions<Object>The fetch options for the request.

Returns

Promise<Object[]>

A promise that resolves with the list of devices.

Source

src/app-automate.ts:40


getProjects()

getProjects(options?): Promise<Object[]>

Retrieves the projects from the App Automate API.

Parameters

ParameterTypeDescription
options?APIFetchOptions<Object>The fetch options for the API request.

Returns

Promise<Object[]>

A promise that resolves with the projects.

Source

src/app-automate.ts:49


getProject()

getProject(projectId, options?): Promise<Object & Object>

Retrieves a project by its ID.

Parameters

ParameterTypeDescription
projectIdnumberThe ID of the project to retrieve.
options?APIFetchOptions<Object>Additional options for the fetch request.

Returns

Promise<Object & Object>

A promise that resolves to the retrieved project.

Source

src/app-automate.ts:59


updateProject()

updateProject(projectId, body, options?): Promise<Object>

Updates a project in the App Automate API.

Parameters

ParameterTypeDescription
projectIdnumberThe ID of the project to update.
bodyObjectThe request body containing the updated project data.
body.namestringDescription
Name of your project

Example
pricing_project
options?APIFetchOptions<Object>Additional options for the request.

Returns

Promise<Object>

A promise that resolves with the updated project data.

MemberTypeDescription
idnumberDescription
ID of your project

Example
866256
namestringDescription
Name of your project

Example
pricing_project
user_idnumberDescription
Identifier for the user

Example
256454
group_idnumberDescription
Identifier for your account or group

Example
2
sub_group_idnumberDescription
Identifier for a team in a group

Example
0
created_atstringDescription
Time at which the project was created on BrowserStack servers

Example
2020-03-11T10:14:36.000Z
updated_atstringDescription
Time at which the project was updated on BrowserStack servers

Example
2020-09-18T09:45:57.000Z

Source

src/app-automate.ts:81


deleteProject()

deleteProject(projectId, options?): Promise<Object>

Deletes a project.

Parameters

ParameterTypeDescription
projectIdnumberThe ID of the project to delete.
options?APIFetchOptions<Object>The fetch options for the delete request.

Returns

Promise<Object>

A promise that resolves when the project is successfully deleted.

MemberTypeDescription
statusstringDescription
Status of the operation

Example
ok
messagestringDescription
Message indicating the status of the operation

Example
Project 966019 was deleted successfully.

Source

src/app-automate.ts:103


getBadgeKey()

getBadgeKey(projectId, options?): Promise<string>

Retrieves the badge key for a specific project.

Parameters

ParameterTypeDescription
projectIdnumberThe ID of the project.
options?APIFetchOptions<Object>Additional options for the fetch request.

Returns

Promise<string>

A promise that resolves to the badge key.

Source

src/app-automate.ts:123


getBuilds()

getBuilds(query?, options?): Promise<Object[]>

Retrieves a list of builds from the App Automate API.

Parameters

ParameterTypeDescription
query?ObjectOptional query parameters for filtering the builds.
query.projectId?numberDescription
ID of your project
query.limit?numberDescription
Specify the number of results to be displayed. The default value is 10, and the maximum value is 100
query.offset?numberDescription
Retrieve builds from a specific point using the offset parameter
query.status?"running" | "timeout" | "failed" | "done"Description
Status of the build
options?APIFetchOptions<Object>Optional fetch options for the API request.

Returns

Promise<Object[]>

A promise that resolves to an array of automation builds.

Source

src/app-automate.ts:145


getBuild()

getBuild(buildId, options?): Promise<Object>

Retrieves information about a specific build.

Parameters

ParameterTypeDescription
buildIdstringThe ID of the build to retrieve.
options?APIFetchOptions<Object>Additional options for the fetch request.

Returns

Promise<Object>

A promise that resolves to the build information, including the build details and associated sessions.

MemberTypeValueDescription
sessionsObject & Object & Object[]--
namestring-Description
Name of your build

Example
pricing_project_build
durationnumber-Description
Duration of build execution

Example
10
status"running" | "timeout" | "failed" | "done"-
user_idnumber-Description
Identifier for the user

Example
256454
group_idnumber-Description
Identifier for your account or group

Example
2
sub_group_idnumber-Description
Identifier for a team in a group

Example
0
automation_project_idnumber-Description
ID of your project

Example
866256
hashed_idstring-Description
Hashed ID of the build

Example
4207442b2b0567368956dba064c22a3235a76214
build_tagstring-Description
Tag for the build

Example
pricing_project_build
deltaboolean-Description
Indicates whether the build is a delta build

Example
false
frameworkstring-Description
Framework used for the build

Example
selenium
test_dataRecord<string, never>-Description
Test data used for the build
created_atstring-Description
Time at which the project was created on BrowserStack servers

Example
2020-03-11T10:14:36.000Z
updated_atstring-Description
Time at which the project was updated on BrowserStack servers

Example
2020-09-18T09:45:57.000Z

Source

src/app-automate.ts:163


updateBuild()

updateBuild(buildId, body, options?): Promise<Object>

Updates a build in the App Automate API.

Parameters

ParameterTypeDescription
buildIdstringThe ID of the build to update.
bodyObjectThe request body containing the updated build information.
body.build_tagstringDescription
The new build tag that you want to set

Example
registration
options?APIFetchOptions<Object>Additional options for the request.

Returns

Promise<Object>

A Promise that resolves to the updated build.

MemberTypeDescription
namestringDescription
Name of your build

Example
pricing_project_build
durationnumberDescription
Duration of build execution

Example
10
status"running" | "timeout" | "failed" | "done"
user_idnumberDescription
Identifier for the user

Example
256454
group_idnumberDescription
Identifier for your account or group

Example
2
sub_group_idnumberDescription
Identifier for a team in a group

Example
0
automation_project_idnumberDescription
ID of your project

Example
866256
hashed_idstringDescription
Hashed ID of the build

Example
4207442b2b0567368956dba064c22a3235a76214
build_tagstringDescription
Tag for the build

Example
pricing_project_build
deltabooleanDescription
Indicates whether the build is a delta build

Example
false
frameworkstringDescription
Framework used for the build

Example
selenium
test_dataRecord<string, never>Description
Test data used for the build
created_atstringDescription
Time at which the project was created on BrowserStack servers

Example
2020-03-11T10:14:36.000Z
updated_atstringDescription
Time at which the project was updated on BrowserStack servers

Example
2020-09-18T09:45:57.000Z

Throws

If an error occurs during the update.

Source

src/app-automate.ts:191


deleteBuild()

deleteBuild(buildId, options?): Promise<Object>

Deletes a build with the specified ID.

Parameters

ParameterTypeDescription
buildIdstringThe ID of the build to delete.
options?APIFetchOptions<Object>Additional options for the delete request.

Returns

Promise<Object>

A promise that resolves when the build is successfully deleted.

MemberTypeDescription
statusstringDescription
Status of deletion

Example
ok
messagestringDescription
Message indicating the deletion of the build

Example
Build a4fb480a55efd6b3c558afb1ee051a7c337b8ef0 was deleted successfully.

Source

src/app-automate.ts:219


uploadBuildTerminalLogs()

uploadBuildTerminalLogs(buildId, data, options?): Promise<Object>

Uploads terminal logs for a specific build.

Parameters

ParameterTypeDescription
buildIdstringThe ID of the build.
dataObject & ObjectThe request body containing the logs file and its filename.
options?APIFetchOptions<Object>Additional options for the request.

Returns

Promise<Object>

A promise that resolves to the response of the request.

MemberTypeDescription
messagestringDescription
Message indicating upload result.

Example
File has been uploaded successfully!

Source

src/app-automate.ts:240


uploadSessionTerminalLogs()

uploadSessionTerminalLogs(sessionId, data, options?): Promise<Object>

Uploads terminal logs for a session.

Parameters

ParameterTypeDescription
sessionIdstringThe ID of the session.
dataObject & ObjectThe request body containing the logs file and filename.
options?APIFetchOptions<Object>Additional options for the request.

Returns

Promise<Object>

A promise that resolves to the response of the request.

MemberTypeDescription
messagestringDescription
Message indicating upload result.

Example
File has been uploaded successfully!

Source

src/app-automate.ts:274


getSession()

getSession(sessionId, options?): Promise<Object & Object & Object & Object>

Retrieves the session details for a given session ID.

Parameters

ParameterTypeDescription
sessionIdstringThe ID of the session to retrieve.
options?APIFetchOptions<Object>Additional options for the fetch request.

Returns

Promise<Object & Object & Object & Object>

A promise that resolves to the automation session data.

Source

src/app-automate.ts:309


updateSessionStatus()

updateSessionStatus(sessionId, body, options?): Promise<Object & Object & Object & Object>

Updates the status of a session in the App Automate API.

Parameters

ParameterTypeDescription
sessionIdstringThe ID of the session to update.
bodyObjectThe request body containing the updated session status.
body.status"failed" | "passed"Description
Status of the session

Example
passed @enum {string}
body.reason?stringDescription
Reason for marking the session as failed

Example
Test failed because of assertion error
options?APIFetchOptions<Object>Additional options for the API request.

Returns

Promise<Object & Object & Object & Object>

A Promise that resolves to the updated automation session.

Source

src/app-automate.ts:331


deleteSession()

deleteSession(sessionId, options?): Promise<Object>

Deletes a session in the App Automate API.

Parameters

ParameterTypeDescription
sessionIdstringThe ID of the session to delete.
options?APIFetchOptions<Object>Additional options for the delete request.

Returns

Promise<Object>

A promise that resolves when the session is successfully deleted.

MemberTypeDescription
statusstringDescription
Status of deletion

Example
ok
messagestringDescription
Message indicating the deletion of the session

Example
Session 4207442b2b0567368956dba064c22a3235a76214 was deleted successfully.

Source

src/app-automate.ts:353


getSessionLogs()

getSessionLogs(buildId, sessionId, options?): Promise<string>

Retrieves the session logs for a specific build and session.

Parameters

ParameterTypeDescription
buildIdstringThe ID of the build.
sessionIdstringThe ID of the session.
options?APIFetchOptions<Object>Additional options for the request.

Returns

Promise<string>

A Promise that resolves to the session logs.

Source

src/app-automate.ts:375


getSessionDeviceLogs()

getSessionDeviceLogs(buildId, sessionId, options?): Promise<string>

Retrieves the device logs for a specific session.

Parameters

ParameterTypeDescription
buildIdstringThe ID of the build.
sessionIdstringThe ID of the session.
options?APIFetchOptions<Object>Additional options for the request.

Returns

Promise<string>

A Promise that resolves with the device logs.

Source

src/app-automate.ts:403


getSessionAppiumLogs()

getSessionAppiumLogs(buildId, sessionId, options?): Promise<string>

Retrieves the Appium logs for a specific session.

Parameters

ParameterTypeDescription
buildIdstringThe ID of the build.
sessionIdstringThe ID of the session.
options?APIFetchOptions<Object>Additional options for the request.

Returns

Promise<string>

A Promise that resolves to the Appium logs.

Source

src/app-automate.ts:431


getSessionNetworkLogs()

getSessionNetworkLogs(buildId, sessionId, options?): Promise<Record<string, never>>

Retrieves the network logs for a specific session in a build.

Parameters

ParameterTypeDescription
buildIdstringThe ID of the build.
sessionIdstringThe ID of the session.
options?APIFetchOptions<Object>Additional options for the network logs request.

Returns

Promise<Record<string, never>>

A Promise that resolves to the network logs response.

Source

src/app-automate.ts:458


getSessionAppProfilingDataV1()

getSessionAppProfilingDataV1(buildId, sessionId, options?): Promise<Object[]>

Retrieves the app profiling data for a specific session in a build.

Parameters

ParameterTypeDescription
buildIdstringThe ID of the build.
sessionIdstringThe ID of the session.
options?APIFetchOptions<Object>Additional options for the request.

Returns

Promise<Object[]>

A promise that resolves to the app profiling data.

Source

src/app-automate.ts:484


getSessionAppProfilingDataV2()

getSessionAppProfilingDataV2(buildId, sessionId, options?): Promise<Object>

Retrieves the app profiling data for a specific session in a build.

Parameters

ParameterTypeDescription
buildIdstringThe ID of the build.
sessionIdstringThe ID of the session.
options?APIFetchOptions<Object>Additional options for the API request.

Returns

Promise<Object>

A promise that resolves with the app profiling data.

MemberType
metadataObject
dataObject
data.unitsObject

Source

src/app-automate.ts:510


uploadMediaFile()

uploadMediaFile(data, options?): Promise<Object>

Uploads a media file to the App Automate API.

Parameters

ParameterTypeDescription
dataObject & ObjectThe request body containing the media file to upload.
options?APIFetchOptions<Object>Optional fetch options for the request.

Returns

Promise<Object>

A promise that resolves to the response of the API request.

MemberTypeDescription
media_idstringDescription
Unique ID returned on successful upload of your media file on BrowserStack.

Example
90c7a8h8dc82308108734e9a46c24d8f01de12881
media_urlstringDescription
Unique identifier returned upon successful upload of your media file on BrowserStack. This value is used to specify the media files to be used in your tests.

Example
media://90c7a8h8dc82308108734e9a46c24d8f01de12881
media_namestringDescription
Name of the media file uploaded.

Example
media.jpg
uploaded_atstringDescription
Timestamp of the media file upload.

Example
2021-09-30T10:00:00.000Z
custom_idstringDescription
Custom ID of the media file uploaded. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.

Example
media_1
shareable_idstringDescription
Shareable ID allows members of other teams to use the media files in their tests.

Example
steve/SampleMedia

Source

src/app-automate.ts:536


getMediaFiles()

getMediaFiles(options?): Promise<Object[]>

Retrieves the media files associated with the App Automate session.

Parameters

ParameterTypeDescription
options?APIFetchOptions<Object>Optional fetch options for the request.

Returns

Promise<Object[]>

A promise that resolves to an array of media files, or an empty array if no media files are found.

Source

src/app-automate.ts:564


getMediaFilesByCustomId()

getMediaFilesByCustomId(customId, options?): Promise<Object[]>

Retrieves media files by custom ID.

Parameters

ParameterTypeDescription
customIdstringThe custom ID to filter media files.
options?APIFetchOptions<Object>Optional fetch options.

Returns

Promise<Object[]>

A promise that resolves to an array of media files or an empty array if no media files are found.

Source

src/app-automate.ts:579


getGroupMediaFiles()

getGroupMediaFiles(options?): Promise<Object[]>

Retrieves the group's media files from the App Automate API.

Parameters

ParameterTypeDescription
options?APIFetchOptions<Object>Optional fetch options for the API request.

Returns

Promise<Object[]>

A promise that resolves to an array of group media files, or an empty array if the response contains a "message" property.

Source

src/app-automate.ts:599


deleteMediaFile()

deleteMediaFile(mediaId, options?): Promise<Object>

Deletes a media file from the app automate custom media.

Parameters

ParameterTypeDescription
mediaIdstringThe ID of the media file to delete.
options?APIFetchOptions<Object>The fetch options for the delete request.

Returns

Promise<Object>

A promise that resolves when the media file is successfully deleted.

MemberTypeDescription
successbooleanDescription
Indicates whether deletion was success or a failure.

Source

src/app-automate.ts:614


uploadAppiumApp()

uploadAppiumApp(data, options?): Promise<Object>

Uploads an Appium app to BrowserStack App Automate.

Parameters

ParameterTypeDescription
data{ custom_id?: string | undefined; } & ({ file: Blob; } | { url: string; }) & ObjectThe request body containing the app file or URL to be uploaded.
options?APIFetchOptions<Object>Additional options for the request.

Returns

Promise<Object>

A Promise that resolves to the response of the upload request.

MemberTypeDescription
app_idstringDescription
Unique ID returned on successful upload of your app on BrowserStack.

Example
90c7a8h8dc82308108734e9a46c24d8f01de12881
app_urlstringDescription
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Appium test scripts.

Example
media://90c7a8h8dc82308108734e9a46c24d8f01de12881
app_namestringDescription
Name of the app file uploaded.

Example
app-release.apk
app_versionstringDescription
Version of the app.

Example
1.0.0
uploaded_atstringDescription
Timestamp of the app file upload.

Example
2021-09-30T10:00:00.000Z
expirystringDescription
Timestamp of the app file expiry.

Example
2021-09-30T10:00:00.000Z
custom_idstringDescription
Custom ID defined for the uploaded app. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.

Example
media_1
shareable_idstringDescription
Shareable ID allows other users in your organization to test an app you uploaded.

Example
steve/SampleApp

Source

src/app-automate.ts:638


getAppiumApps()

getAppiumApps(options?): Promise<Object[]>

Retrieves the list of Appium apps from the App Automate API.

Parameters

ParameterTypeDescription
options?APIFetchOptions<Object>Optional fetch options for customizing the request.

Returns

Promise<Object[]>

A promise that resolves to an array of Appium apps, or an empty array if no apps are found.

Source

src/app-automate.ts:670


getAppiumAppsByCustomId()

getAppiumAppsByCustomId(customId, options?): Promise<Object[]>

Retrieves the Appium apps by custom ID.

Parameters

ParameterTypeDescription
customIdstringThe custom ID of the app.
options?APIFetchOptions<Object>The fetch options for the request.

Returns

Promise<Object[]>

A promise that resolves to the retrieved Appium apps.

Source

src/app-automate.ts:682


getAppiumGroupApps()

getAppiumGroupApps(options?): Promise<Object[]>

Retrieves the list of App Automate apps for the group using the specified fetch options.

Parameters

ParameterTypeDescription
options?APIFetchOptions<Object>The fetch options for the request.

Returns

Promise<Object[]>

A promise that resolves to the list of group apps, or an empty array if there is a "message" property in the response data.

Source

src/app-automate.ts:701


deleteAppiumApp()

deleteAppiumApp(appId, options?): Promise<Object>

Deletes an Appium app.

Parameters

ParameterTypeDescription
appIdstringThe ID of the app to delete.
options?APIFetchOptions<Object>Optional fetch options for the delete request.

Returns

Promise<Object>

A promise that resolves when the app is successfully deleted.

MemberTypeDescription
successbooleanDescription
Indicates whether deletion was success or a failure.

Source

src/app-automate.ts:716


uploadFlutterApp()

uploadFlutterApp(platform, body, options)

uploadFlutterApp<P>(platform, body, options?): Promise<Object>

Uploads a Flutter app for App Automate.

Type parameters
Type parameter
P extends ios
Parameters
ParameterTypeDescription
platformP-
body{ custom_id?: string | undefined; } & ({ file: Blob; } | { url: string; }) & Object-
options?APIFetchOptions<Object>Additional options for the request.
Returns

Promise<Object>

A promise that resolves to the response of the request.

MemberTypeDescription
test_package_idstringDescription
Unique ID returned on successful upload of your app on BrowserStack.

Example
90c7a8h8dc82308108734e9a46c24d8f01de12881
test_package_urlstringDescription
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Appium test scripts.

Example
media://90c7a8h8dc82308108734e9a46c24d8f01de12881
test_package_namestringDescription
Name of the media file uploaded.

Example
media.zip
uploaded_atstringDescription
Timestamp of the media file upload.

Example
2021-09-30T10:00:00.000Z
custom_idstringDescription
Custom ID defined for the uploaded app. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.

Example
media_1
shareable_idstringDescription
Shareable ID allows other users in your organization to test an app you uploaded.

Example
steve/SampleApp
Source

src/app-automate.ts:730

uploadFlutterApp(platform, body, options)

uploadFlutterApp<P>(platform, body, options?): Promise<Object>

Uploads a Flutter app for App Automate.

Type parameters
Type parameter
P extends android
Parameters
ParameterTypeDescription
platformP-
body{ custom_id?: string | undefined; } & ({ file: Blob; } | { url: string; }) & Object-
options?APIFetchOptions<Object>Additional options for the request.
Returns

Promise<Object>

A promise that resolves to the response of the request.

MemberTypeDescription
app_idstringDescription
Unique ID returned on successful upload of your app on BrowserStack.

Example
90c7a8h8dc82308108734e9a46c24d8f01de12881
app_urlstringDescription
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Appium test scripts.

Example
media://90c7a8h8dc82308108734e9a46c24d8f01de12881
app_namestringDescription
Name of the app file uploaded.

Example
app-release.apk
app_versionstringDescription
Version of the app.

Example
1.0.0
uploaded_atstringDescription
Timestamp of the app file upload.

Example
2021-09-30T10:00:00.000Z
expirystringDescription
Timestamp of the app file expiry.

Example
2021-09-30T10:00:00.000Z
custom_idstringDescription
Custom ID defined for the uploaded app. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.

Example
media_1
shareable_idstringDescription
Shareable ID allows other users in your organization to test an app you uploaded.

Example
steve/SampleApp
Source

src/app-automate.ts:738


getFlutterApps()

getFlutterApps(platform, options)

getFlutterApps<P>(platform, options?): Promise<Object[]>

Retrieves the list of Flutter apps for Android.

Type parameters
Type parameter
P extends android
Parameters
ParameterTypeDescription
platformP-
options?APIFetchOptions<Object>The fetch options for the request.
Returns

Promise<Object[]>

A promise that resolves to an array of Flutter apps, or an empty array if no apps are found.

Source

src/app-automate.ts:791

getFlutterApps(platform, options)

getFlutterApps<P>(platform, options?): Promise<Object[]>

Retrieves the list of Flutter apps for Android.

Type parameters
Type parameter
P extends ios
Parameters
ParameterTypeDescription
platformP-
options?APIFetchOptions<Object>The fetch options for the request.
Returns

Promise<Object[]>

A promise that resolves to an array of Flutter apps, or an empty array if no apps are found.

Source

src/app-automate.ts:796


getFlutterApp()

getFlutterApp(platform, appId, options)

getFlutterApp<P>(platform, appId, options?): Promise<Object>

Retrieves the Flutter app with the specified appId.

Type parameters
Type parameter
P extends android
Parameters
ParameterTypeDescription
platformP-
appIdstringThe ID of the Flutter app to retrieve.
options?APIFetchOptions<Object>The fetch options for the request.
Returns

Promise<Object>

A promise that resolves to the retrieved Flutter app.

MemberTypeDescription
app_idstringDescription
Unique ID returned on successful upload of your app on BrowserStack.

Example
90c7a8h8dc82308108734e9a46c24d8f01de12881
app_urlstringDescription
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Appium test scripts.

Example
media://90c7a8h8dc82308108734e9a46c24d8f01de12881
app_namestringDescription
Name of the app file uploaded.

Example
app-release.apk
app_versionstringDescription
Version of the app.

Example
1.0.0
uploaded_atstringDescription
Timestamp of the app file upload.

Example
2021-09-30T10:00:00.000Z
expirystringDescription
Timestamp of the app file expiry.

Example
2021-09-30T10:00:00.000Z
custom_idstringDescription
Custom ID defined for the uploaded app. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.

Example
media_1
shareable_idstringDescription
Shareable ID allows other users in your organization to test an app you uploaded.

Example
steve/SampleApp
Source

src/app-automate.ts:829

getFlutterApp(platform, appId, options)

getFlutterApp<P>(platform, appId, options?): Promise<Object>

Retrieves the Flutter app with the specified appId.

Type parameters
Type parameter
P extends ios
Parameters
ParameterTypeDescription
platformP-
appIdstringThe ID of the Flutter app to retrieve.
options?APIFetchOptions<Object>The fetch options for the request.
Returns

Promise<Object>

A promise that resolves to the retrieved Flutter app.

MemberTypeDescription
test_package_idstringDescription
Unique ID returned on successful upload of your app on BrowserStack.

Example
90c7a8h8dc82308108734e9a46c24d8f01de12881
test_package_urlstringDescription
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Appium test scripts.

Example
media://90c7a8h8dc82308108734e9a46c24d8f01de12881
test_package_namestringDescription
Name of the media file uploaded.

Example
media.zip
uploaded_atstringDescription
Timestamp of the media file upload.

Example
2021-09-30T10:00:00.000Z
custom_idstringDescription
Custom ID defined for the uploaded app. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.

Example
media_1
shareable_idstringDescription
Shareable ID allows other users in your organization to test an app you uploaded.

Example
steve/SampleApp
Source

src/app-automate.ts:835


deleteFlutterApp()

deleteFlutterApp(platform, appId, options)

deleteFlutterApp<P>(platform, appId, options?): Promise<Object>

Deletes a Flutter app from the BrowserStack App Automate service.

Type parameters
Type parameter
P extends android
Parameters
ParameterTypeDescription
platformP-
appIdstringThe ID of the app to delete.
options?APIFetchOptions<Object>The fetch options for the delete request.
Returns

Promise<Object>

A promise that resolves when the app is successfully deleted.

MemberType
successObject
success.messagestring
Source

src/app-automate.ts:871

deleteFlutterApp(platform, appId, options)

deleteFlutterApp<P>(platform, appId, options?): Promise<Object>

Deletes a Flutter app from the BrowserStack App Automate service.

Type parameters
Type parameter
P extends ios
Parameters
ParameterTypeDescription
platformP-
appIdstringThe ID of the app to delete.
options?APIFetchOptions<Object>The fetch options for the delete request.
Returns

Promise<Object>

A promise that resolves when the app is successfully deleted.

MemberType
successObject
success.messagestring
Source

src/app-automate.ts:877


uploadEspressoApp()

uploadEspressoApp(data, options?): Promise<Object>

Uploads an Espresso app to BrowserStack.

Parameters

ParameterTypeDescription
data{ custom_id?: string | undefined; } & ({ file: Blob; } | { url: string; }) & ObjectThe request body containing the app file or URL.
options?APIFetchOptions<Object>Additional options for the request.

Returns

Promise<Object>

A promise that resolves to the response from the server.

MemberTypeDescription
app_idstringDescription
Unique ID returned on successful upload of your app on BrowserStack.

Example
90c7a8h8dc82308108734e9a46c24d8f01de12881
app_urlstringDescription
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Appium test scripts.

Example
media://90c7a8h8dc82308108734e9a46c24d8f01de12881
app_namestringDescription
Name of the app file uploaded.

Example
app-release.apk
app_versionstringDescription
Version of the app.

Example
1.0.0
uploaded_atstringDescription
Timestamp of the app file upload.

Example
2021-09-30T10:00:00.000Z
expirystringDescription
Timestamp of the app file expiry.

Example
2021-09-30T10:00:00.000Z
custom_idstringDescription
Custom ID defined for the uploaded app. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.

Example
media_1
shareable_idstringDescription
Shareable ID allows other users in your organization to test an app you uploaded.

Example
steve/SampleApp

Source

src/app-automate.ts:920


getEspressoApps()

getEspressoApps(options?): Promise<Object[]>

Retrieves the Espresso apps from the App Automate API.

Parameters

ParameterTypeDescription
options?APIFetchOptions<Object>The fetch options for the API request.

Returns

Promise<Object[]>

A promise that resolves to an array of Espresso apps.

Source

src/app-automate.ts:951


getEspressoApp()

getEspressoApp(appId, options?): Promise<Object>

Retrieves the Espresso app with the specified appId.

Parameters

ParameterTypeDescription
appIdstringThe ID of the Espresso app to retrieve.
options?APIFetchOptions<Object>The fetch options for the request.

Returns

Promise<Object>

A promise that resolves to the retrieved Espresso app.

MemberTypeDescription
app_idstringDescription
Unique ID returned on successful upload of your app on BrowserStack.

Example
90c7a8h8dc82308108734e9a46c24d8f01de12881
app_urlstringDescription
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Appium test scripts.

Example
media://90c7a8h8dc82308108734e9a46c24d8f01de12881
app_namestringDescription
Name of the app file uploaded.

Example
app-release.apk
app_versionstringDescription
Version of the app.

Example
1.0.0
uploaded_atstringDescription
Timestamp of the app file upload.

Example
2021-09-30T10:00:00.000Z
expirystringDescription
Timestamp of the app file expiry.

Example
2021-09-30T10:00:00.000Z
custom_idstringDescription
Custom ID defined for the uploaded app. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.

Example
media_1
shareable_idstringDescription
Shareable ID allows other users in your organization to test an app you uploaded.

Example
steve/SampleApp

Source

src/app-automate.ts:965


deleteEspressoApp()

deleteEspressoApp(appId, options?): Promise<Object>

Deletes an Espresso app.

Parameters

ParameterTypeDescription
appIdstringThe ID of the app to delete.
options?APIFetchOptions<Object>The fetch options for the delete request.

Returns

Promise<Object>

A promise that resolves when the app is deleted.

MemberTypeDescription
successObject-
success.messagestringDescription
Indicates whether deletion was success or a failure.

Example
App with url bs://231e820c35ee15b8438ec31df1fb689c03abd8e5 was deleted.

Source

src/app-automate.ts:985


uploadXCUITestApp()

uploadXCUITestApp(data, options?): Promise<Object>

Uploads an XCUITest app to BrowserStack App Automate.

Parameters

ParameterTypeDescription
data{ custom_id?: string | undefined; } & ({ file: Blob; } | { url: string; }) & ObjectThe request body containing the XCUITest app file or URL.
options?APIFetchOptions<Object>Additional options for the request.

Returns

Promise<Object>

A Promise that resolves to the response of the request.

MemberTypeDescription
app_idstringDescription
Unique ID returned on successful upload of your app on BrowserStack.

Example
90c7a8h8dc82308108734e9a46c24d8f01de12881
app_urlstringDescription
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Appium test scripts.

Example
media://90c7a8h8dc82308108734e9a46c24d8f01de12881
app_namestringDescription
Name of the app file uploaded.

Example
app-release.apk
app_versionstringDescription
Version of the app.

Example
1.0.0
uploaded_atstringDescription
Timestamp of the app file upload.

Example
2021-09-30T10:00:00.000Z
expirystringDescription
Timestamp of the app file expiry.

Example
2021-09-30T10:00:00.000Z
custom_idstringDescription
Custom ID defined for the uploaded app. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.

Example
media_1
shareable_idstringDescription
Shareable ID allows other users in your organization to test an app you uploaded.

Example
steve/SampleApp

Source

src/app-automate.ts:1006


getXCUITestApps()

getXCUITestApps(options?): Promise<Object[]>

Retrieves the XCUITest apps available in the BrowserStack App Automate.

Parameters

ParameterTypeDescription
options?APIFetchOptions<Object>The fetch options for the request.

Returns

Promise<Object[]>

A promise that resolves to an array of XCUITest apps.

Source

src/app-automate.ts:1037


getXCUITestApp()

getXCUITestApp(appId, options?): Promise<Object>

Retrieves the XCUITest app with the specified appId.

Parameters

ParameterTypeDescription
appIdstringThe ID of the XCUITest app to retrieve.
options?APIFetchOptions<Object>The fetch options for the request.

Returns

Promise<Object>

A promise that resolves to the XCUITest app.

MemberTypeDescription
app_idstringDescription
Unique ID returned on successful upload of your app on BrowserStack.

Example
90c7a8h8dc82308108734e9a46c24d8f01de12881
app_urlstringDescription
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Appium test scripts.

Example
media://90c7a8h8dc82308108734e9a46c24d8f01de12881
app_namestringDescription
Name of the app file uploaded.

Example
app-release.apk
app_versionstringDescription
Version of the app.

Example
1.0.0
uploaded_atstringDescription
Timestamp of the app file upload.

Example
2021-09-30T10:00:00.000Z
expirystringDescription
Timestamp of the app file expiry.

Example
2021-09-30T10:00:00.000Z
custom_idstringDescription
Custom ID defined for the uploaded app. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.

Example
media_1
shareable_idstringDescription
Shareable ID allows other users in your organization to test an app you uploaded.

Example
steve/SampleApp

Source

src/app-automate.ts:1051


deleteXCUITestApp()

deleteXCUITestApp(appId, options?): Promise<Object>

Deletes an XCUITest app.

Parameters

ParameterTypeDescription
appIdstringThe ID of the app to delete.
options?APIFetchOptions<Object>The fetch options for the delete request.

Returns

Promise<Object>

A promise that resolves when the app is successfully deleted.

MemberTypeDescription
successObject-
success.messagestringDescription
Indicates whether deletion was success or a failure.

Example
App with url bs://231e820c35ee15b8438ec31df1fb689c03abd8e5 was deleted.

Source

src/app-automate.ts:1071


uploadDetoxAndroidApp()

uploadDetoxAndroidApp<T>(type, data, options?): Promise<Object>

Uploads a Detox Android app or app client to the App Automate service.

Type parameters

Type parameter
T extends "app" | "app-client"

Parameters

ParameterTypeDescription
typeTThe type of the upload, either "app" or "app-client".
dataoperations[T extends "app" ? "uploadAppAutomateDetoxAndroidApp" : "uploadAppAutomateDetoxAndroidAppClient"]["requestBody"]["content"]["multipart/form-data"] & ObjectThe data of the upload, including the app file and filename.
options?APIFetchOptions<operations[T extends "app" ? "uploadAppAutomateDetoxAndroidApp" : "uploadAppAutomateDetoxAndroidAppClient"]>Optional API fetch options for the request.

Returns

Promise<Object>

A promise that resolves to the response of the request.

MemberTypeDescription
app_idstringDescription
Unique ID returned on successful upload of your app on BrowserStack.

Example
90c7a8h8dc82308108734e9a46c24d8f01de12881
app_urlstringDescription
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Appium test scripts.

Example
media://90c7a8h8dc82308108734e9a46c24d8f01de12881
app_namestringDescription
Name of the app file uploaded.

Example
app-release.apk
app_versionstringDescription
Version of the app.

Example
1.0.0
uploaded_atstringDescription
Timestamp of the app file upload.

Example
2021-09-30T10:00:00.000Z
expirystringDescription
Timestamp of the app file expiry.

Example
2021-09-30T10:00:00.000Z
custom_idstringDescription
Custom ID defined for the uploaded app. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.

Example
media_1
shareable_idstringDescription
Shareable ID allows other users in your organization to test an app you uploaded.

Example
steve/SampleApp

Source

src/app-automate.ts:1093