Browserstack logo
  • AI Agents
  • Pricing
  • Manual Testing

    Live

    Cross-browser testing

    Testing Toolkit

    Essential manual testing tools

    Accessibility Testing

    Test WCAG compliance

    Test Automation

    Automate

    Browser automation cloud

    Low Code Automation

    Automation without coding

    Accessibility Automation

    Automate WCAG testing

    Percy

    Visual testing & review

    Custom Device Lab

    Tailored test environments

    Management & Optimization

    Test Management

    Plan, track, and manage tests

    Test Management for Jira

    Manage tests inside JIRA

    Test Reporting & Analytics

    Monitor & optimize tests

    Explore BrowserStack for Enterprise

    Manual Testing

    App Live

    Real device testing

    App Accessibility Testing

    Test WCAG compliance

    Test Automation

    App Automate

    Real device automation cloud

    App Percy

    Visual testing & review

    App Low Code Automation

    AI-driven automated tests

    Custom Device Lab

    Tailored test environments

    Management & Optimization

    Test Management

    Plan, track, and manage tests

    Test Management for Jira

    Manage tests inside JIRA

    Test Reporting & Analytics

    Monitor & optimize tests

    Explore BrowserStack for Enterprise

    control

    • Documentation
    • Support
    • Status
    • Release Notes
    • Open Source
    • Events
    • Meetups
    • BrowserStack Talks
    • Community
  • AI Agents
  • Pricing
  • Sign in
  • Free Trial
Home Documentation App Automate EarlGrey EarlGrey REST API

EarlGrey REST API

BrowserStack supports the use of REST API to access information about your tests via the command-line interface.

App Upload

Upload App Directory

An API to upload the app directory for the App and test you want to execute on the BrowserStack servers

curl -u "USERNAME:ACCESS_KEY" -X POST "https://api-cloud.browserstack.com/app-automate/earlgrey/app-dir" -F "file=@/path/to/app/file/appDir.zip" -F 'data={"custom_id": "MyTest"}'

Upload zip from a Public Location

If you do not have your zip file on the local machine from where you are running the test and it is hosted on a different location, you can upload it to the BrowserStack servers from any public hosted location. You can achieve that by just providing the zip public url in the API call to upload an zip. The url should be accessible over the internet so that BrowserStack can directly upload it from that location. Use the below API call to upload zip from a publicly accessible location.

curl -u "USERNAME:ACCESS_KEY" -X POST "https://api-cloud.browserstack.com/app-automate/earlgrey/app-dir" -F "data={\"url\": \"https://www.browserstack.com/app-automate/sample-apps/ios/BStack-EarlGrey-SampleApp.zip\"}"

Note: custom_id is optional. You can upload multiple builds under same custom_id. Use custom_id in 'appDir' capability for EarlGrey to always pick the last uploaded build.

Delete App Directory

An API to DELETE an uploaded App Directory

curl -u "USERNAME:ACCESS_KEY" -X DELETE "https://api-cloud.browserstack.com/app-automate/earlgrey/app-dirs/:hashed_id"
Get recent Uploads

An API to retrieve details of your recently uploaded test suites

curl -u "USERNAME:ACCESS_KEY" -X GET https://api-cloud.browserstack.com/app-automate/earlgrey/app-dirs
Get App Directory info

An API to get detail information about the uploaded test suite

curl -u "USERNAME:ACCESS_KEY" -X GET https://api-cloud.browserstack.com/app-automate/earlgrey/app-dirs/:hashed_id

Builds

Build Summary / Test status

An API to get the status of your test execution or fetch the summary of your build

curl -u "USERNAME:ACCESS_KEY" -X GET https://api-cloud.browserstack.com/app-automate/earlgrey/builds/:build_id

Sessions

Session Details

An API to get the details of your test sessions. Each session is the execution of your test suite on individual devices.

curl -u "USERNAME:ACCESS_KEY" -X GET https://api-cloud.browserstack.com/app-automate/earlgrey/builds/:build_id/sessions/:session_id
Retrieving App Automate network logs

Logs are available to you in HAR (HTTP Archive) format, and these can be retrieved using REST API.

curl -u "USERNAME:ACCESS_KEY" -X GET https://api-cloud.browserstack.com/app-automate/earlgrey/builds/:build_id/sessions/tests/:test_id/networklogs

Media Upload

Upload Media

An API to upload media files you want to use in your tests running on the BrowserStack servers

curl -u "USERNAME:ACCESS_KEY" -X POST "https://api-cloud.browserstack.com/app-automate/upload-media" -F "file=@/path/to/media/file/mediaFile.jpg" -F 'data={"custom_id": "MyMedia"}'
Get recent uploads

An API to retrieve details about your recent Media File uploads. The response will not include the deleted Media Files

curl -u "USERNAME:ACCESS_KEY" -X GET "https://api-cloud.browserstack.com/app-automate/recent_media_files"
Get recent uploads for custom id

An API to retrieve details about your recent Media File uploads under a specific custom id. The response will not include the deleted Media Files

curl -u "USERNAME:ACCESS_KEY" -X GET "https://api-cloud.browserstack.com/app-automate/recent_media_files/<custom_id>"
Get recent uploads for entire group

An API to retrieve details about your recent Media File uploads for the entire group. The response will not include the deleted Media Files

curl -u "USERNAME:ACCESS_KEY" -X GET "https://api-cloud.browserstack.com/app-automate/recent_group_media"
Delete Media File

An API to DELETE an uploaded Media File

curl -u "USERNAME:ACCESS_KEY" -X DELETE "https://api-cloud.browserstack.com/app-automate/custom_media/delete/<MediaId>"

In This Article

  • App Upload
  • Builds
  • Sessions
  • Media Upload
Related Articles

Earlgrey Get Started

Local Testing

Jenkins

PRODUCTS

  • Live
  • App Automate
  • App Live
  • Accessibility Testing
  • Automate
  • Test Management
  • App Accessibility Testing
  • Low Code Automation
  • Testing Toolkit
  • Percy
  • Custom Device Lab
  • App Percy
  • App Low Code Automation
  • Test Reporting & Analytics
  • Requestly
  • Test Management for Jira
  • Test Companion
  • Load Testing

WHY BROWSERSTACK

  • Customers
  • Case Studies
  • AI Agents
  • Browsers & Devices
  • Enterprise
  • Data Centers
  • Real Device Features
  • Security

RESOURCES

  • Support
  • Status
  • Release Notes
  • Blog
  • Events
  • Community
  • Meetups
  • Champions
  • Guide
  • Partners
  • Find a partner
  • Trust Center
  • Test University (Beta)

COMPANY

  • About Us
  • Careers
  • Open Source
  • Press
  • Newsletter
Browserstack logo
SOCIAL
twitter social link facebook social link linkedin social link youtube social link instagram social link discord social link
Contact Us

We are available 24 / 7

More Resources

Cross Browser Testing Selenium Testing Test Management Emulators vs Real Device Mobile App Testing

Test on Device

Test on iPad Test on Galaxy Test In IE Test on Android Test on iOS Mobile Emulators Test on Right Devices

Tools

SpeedLab Screenshots Responsive Nightwatch.js
Browserstack logo
twitter social link facebook social link linkedin social link youtube social link instagram social link discord social link
Contact Us

We are available 24 / 7

© 2026 BrowserStack. All rights reserved.

  • Terms of Service
  • Privacy Policy
  • Cookie Policy
  • Sitemap