Skip to content

Latest commit

 

History

History
569 lines (567 loc) · 20.6 KB

interface.md

File metadata and controls

569 lines (567 loc) · 20.6 KB

SauceLabs Interface

The following commands are available via package or cli tool:

GET /v1.1/jobs/{id}
Get Job Information

Example:

api.getJobV1_1(id)
GET /v1.2/users/{username}/concurrency
User concurrency

Example:

api.getUserConcurrency(username)
GET /v1.1/users/{username}/organization
Org information

Example:

api.listUserOrganization(username)
GET /v1.1/{username}/jobs
Get all of a users jobs

Example:

api.listJobs(username, { ...options })

Options

  • limit: Number of results to return
  • subaccounts: Include subaccounts in list of jobs
  • full: Should the response result contain everything or just the basics
  • manual_only: Only return manual jobs
  • auto_only: Only return automated jobs
  • name: name of the job
  • owner_type: owner type for jobs
  • owner: username of owner of the jobs
  • from: receive jobs beginning of a specific timestamp
  • to: receive jobs until specific timestamp
GET /v1/dashboard_messages/{username}
Dashboard messages from Django

Example:

api.getDashboardMessageForUser(username)
GET /v1/info/platforms/{platform}
returns a list of supported platforms in the Sauce cloud

Example:

api.listPlatforms(platform)
GET /v1/info/status
Sauce Labs Status

Example:

api.getStatus()
GET /v1/me
Authenticated user cookie information

Example:

api.getCurrentUser()
GET /v1/users/{username}
User information

Example:

api.getUser(username)
GET /v1/users/{username}/subaccounts
User information

Example:

api.getSubaccounts(username)
GET /v1/users/{username}/activity
Get currently running job counts broken down by account and job status

Example:

api.getUserActivity(username)
GET /v1/users/{username}/monthly-minutes
User's monthly-minutes

Example:

api.getUserMinutes(username)
GET /v1/users_activity
Get job statistics for usernames

Example:

api.getUsersActivity()
GET /v1/users_last_job
The result returns dict of usersnames and time when they started last job.

Example:

api.usersLastJob()
GET /v1/whoami
Authenticated user information

Example:

api.getCurrentUserFull()
GET /v1/{username}/jobs/{id}
Get Job Information

Example:

api.getJob(username, id)
PUT /v1/{username}/jobs/{id}
Update Job Information

Example:

api.updateJob(username, id, body)
PUT /v1/{username}/jobs/{id}/stop
Stop Job Information

Example:

api.stopJob(username, id)
GET /v1/{username}/all_tunnels
Get all Tunnels

Example:

api.listAllTunnels(username)
GET /v1/{username}/tunnels
Get tunnels for the user or all the users in the team

Example:

api.listTunnels(username, { ...options })

Options

  • all: Should the response contain the same team user data
  • full: Should the response result contain everything or just the basics
  • filter: Filter expression to apply before returning query results
  • protocol: Sauce Connect Protocol
DELETE /v1/{username}/tunnels/{id}
Delete a Tunnel

Example:

api.deleteTunnel(username, id, reason, { ...options })

Options

  • wait_for_jobs: Wait for jobs to finish
GET /v1/{username}/tunnels/{id}
Get Tunnel by ID

Example:

api.getTunnel(username, id)
GET /v1/public/tunnels/info/versions
Get tunnels for the user or all the users in the team

Example:

api.scVersions({ ...options })

Options

  • client_version: SC client version
  • client_host: SC client host OS and CPU arch
  • all: Should the response contain the same team user data
GET /v1/jobs/{id}/{assetName}
Get job asset

Example:

api.downloadJobAsset(id, filename, { ...options })

Options

  • filepath: file path to store the asset at
GET /v1.1/jobs
Get Job Information

Example:

api.getJobsV1_1(id, { ...options })

Options

  • full: Should the response result contain everything or just the basics
GET /metrics/
Provides a list of paginated raw performance metrics for the logged user

Example:

api.getPerformanceMetrics({ ...options })

Options

  • page_url: No description available.
GET /metrics/{job_id}/
Provides performance metrics and job basic data for a given job_id

Example:

api.getPerformanceMetricsByJobId(job_id, { ...options })

Options

  • full: When set to false, basic job data will be returned, excluding performance metrics
GET /metrics/{job_id}/assert/
Provides information if there is an outlier for the given job_id and metric

Example:

api.assertPerformance(job_id, metric_names, order_index)
GET /metrics/{job_id}/baseline/
Provides baseline based on metrics history, where the reference point is a given job_id

Example:

api.getBaseline(job_id, metric_names, order_index, { ...options })

Options

  • regime_start: No description available.
  • regime_end: No description available.
GET /metrics/{job_id}/baseline/reset/
Returns true if a baseline was resetted for a give job_id

Example:

api.hasBaselineReset(job_id)
POST /metrics/{job_id}/baseline/reset/
Sets a reset point market at job_id, previous jobs will not be taken into account in calculating baseline

Example:

api.acknowledgeBaseline(job_id)
GET /metrics/{job_id}/discarded/
Provides lists outliers marked as discarded

Example:

api.getDiscardedOutliers(job_id, order_index)
POST /metrics/{job_id}/discarded/
Marks outlier for a given {job_id} as not relevant/flaky

Example:

api.discardOutliers(job_id, order_index)
GET /metrics/{job_id}/history/
Provides a list of raw performance metrics up to point where the reference is a given job_id and order_index

Example:

api.getBaselineHistory(job_id, order_index, { ...options })

Options

  • limit: No description available.
GET /metrics/{job_id}/regimes/
Provides regimes per metric calculated for a set of jobs, where the reference point is a given job_id

Example:

api.getRegimes(job_id, metric_names, order_index, { ...options })

Options

  • include_baseline: No description available.
POST /metrics/{job_id}/regimes/acknowledge/
Acknowledge regime. Confirm values in new regime are acceptable.

Example:

api.acknowledgeRegime(job_id, order_index)
GET /metrics/swagger/
Provides json documentation for the performance API

Example:

api.getApiDefinition()
PUT /jobs/{jobId}/assets
Upload job assets

Example:

api.uploadJobAssets(jobId, { ...options })

Options

  • files: asset to upload and attach to your job
POST /reports
No description available.

Example:

api.createJob(parameters)
POST /
create test result job via data store

Example:

api.createResultJob(parameters)
GET /v1/getprojects
Get all enabled projects for the user account

Example:

api.getProjects()
GET /v1/projects/{projectId}/getproject
Get project information by projectId

Example:

api.getProject(projectId)
GET /v1/projects/{projectName}/getprojectbyname
Get project information by project name.

Example:

api.getProjectByName(projectName)
GET /testSuites/{accountId}/{projectId}/getTestSuites
Get test suites and associated test case info for the testsuite for the requested project.

Example:

api.getTestsuitesByProjects(accountId, projectId)
POST /v1/projects/{projectId}/testcases/{testcaseId}/updateLveAndRecoverSteps
It updates test steps to a test case

Example:

api.updateLveAndRecoverSteps(projectId, testcaseId, steps)
POST /v1/projects/{projectId}/execute
It Executes a single test script.

Example:

api.executeTestsuiteTest(Body, projectId)
POST /v1/test_suite/create
It creates a test suite.

Example:

api.createTestSuite(Body)
POST /v1/test_suite/{testSuiteId}/update
Updates a test suite.

Example:

api.updateTestSuite(testSuiteId, Body)
POST /v1/testSuites/delete
Deletes test suite.

Example:

api.deleteTestSuites(Body)
POST /testCases/associate
Associates test cases with test suites.

Example:

api.associateTestcases(Body)
POST /testCases/create/{accountId}/{projectId}
Associates test cases with test suites.

Example:

api.createTestcase(accountId, projectId, Body)
POST /v1/projects/{projectId}/testcases/{testcaseId}/updateSteps
Update steps assigned to a testcase.

Example:

api.updateTestcaseSteps(projectId, testcaseId, Body)
POST /v1/testsuite/{testSuiteId}/execute
It executes a test suite

Example:

api.executeTestsuite(testSuiteId, Body)
POST /v1/auth
No description available.

Example:

api.getAuth(Body)
GET /v1/jobs/{jobId}/get_status
It returns status of execution of test suite

Example:

api.getExecutionStatus(jobId)
GET /v1/projects/{projectId}/testcases
Get Test Cases For ProjectId

Example:

api.getTestcases(projectId)
GET /testCases/getTestCaseInfo/{testcaseId}/{stepId}
Get test steps for a specific test case

Example:

api.getTestSteps(testcaseId, stepId)
GET /v1/testcases/{testcaseId}/isgenerating
generating test cases

Example:

api.isGenerating(testcaseId)
GET /blocks/getAll/{accountId}/{blockId}
Get test steps for a specific test case block

Example:

api.getTestStepBlocks(accountId, blockId)
GET /v1/downloadFile
It downloades the html report

Example:

api.downloadReport(fileURL)
GET /testScriptExecutions/{executionId}/executions
It returns execution details for the executing script.

Example:

api.getExecutions(executionId)
GET /teams
Get List of Teams

Example:

api.getTeamsV1({ ...options })

Options

  • name: name
GET /users
Get List of Teams

Example:

api.getUsersV1({ ...options })

Options

  • username: username
  • teams: List of team_ids
  • team-name: team-name
  • roles: roles
  • phrase: phrase
  • status: status
  • limit: Number of results to return
  • offset: Starting number
GET /{build_source}/
Get List of Builds (build_source can be vdc or rdc)

Example:

api.getBuildsV2(build_source, { ...options })

Options

  • user_id: user_id
  • org_id: org_id
  • group_id: group_id
  • team_id: team_id
  • status: status
  • start_time: start_time
  • end_time: end_time
  • limit: Number of results to return
  • offset: Starting number
  • sort: sort
GET /{build_source}/{build_id}/
Get Build detail (build_source can be vdc or rdc)

Example:

api.getBuildV2(build_source, build_id, { ...options })

Options

  • user_id: user_id
  • org_id: org_id
  • group_id: group_id
  • team_id: team_id
GET /{build_source}/jobs/{job_id}/build/
Get Build Jobs (build_source can be vdc or rdc)

Example:

api.getBuildByJobIdV2(build_source, job_id, { ...options })

Options

  • user_id: user_id
  • org_id: org_id
  • group_id: group_id
  • team_id: team_id
GET /{build_source}/{build_id}/jobs/
Get Build detail (build_source can be vdc or rdc)

Example:

api.getBuildsJobsV2(build_source, build_id, { ...options })

Options

  • user_id: user_id
  • org_id: org_id
  • group_id: group_id
  • team_id: team_id
  • modified_since: modified_since
  • completed: completed
  • errored: errored
  • failed: failed
  • finished: finished
  • new: new
  • passed: passed
  • public: public
  • queued: queued
  • running: running
  • faulty: faulty
  • limit: Number of results to return
  • offset: Starting number
POST /v1/
Post Test Runs

Example:

api.createTestRunsV1(parameters)