Mesmer API object details

The page details the objects returned from the Mesmer APIs:

BuildUploadResponse

This is the top-level response object returned by the Build upload API. The success property boolean indicates whether or not the request succeeded. If success is true, then the data property will contain a BuildMetadata object. Otherwise, message and code will contain information about the error.

Property: success

Type: boolean Required: yes

Indicates whether or not the upload succeeded.

Property: data

Type: BuildMetadata Required: no, only if success property is true

When success is true, contains a BuildMetadata object containing metadata about the build that was just uploaded.

Property: code

Type: integer Required: no, only if success property is false

The error code. Possible codes (not a comprehensive list):

401 “invalid or expired auth token”: the authentication token provided in X-Access-Token is invalid.

404 “domain not found”: the Origin header did not describe a known customer.

Property: message

Type: string Required: no, only if success property is false

The error message.

Property: details

Type: string Required: no, only if success property is false

Additional information about the error.

BuildStatsResponse

This is the top-level response object returned by the Build stats API. The success property boolean indicates whether or not the request succeeded. If success is true, then the data property will contain TestStats data. Otherwise, message and code will contain information about the error.

Property: success

Type: boolean Required: yes

Indicates whether or not the call succeeded.

Property: data

Type: array of TestStats Required: no, only if success property is true

When success is true, an array containing a single TestStats object containing data about tests that are either in progress or complete for the given build.

property: code

Type: integer Required: no, only if success property is false

The error code. Possible codes (not a comprehensive list):

401 “invalid or expired auth token”: the authentication token provided in X-Access-Token is invalid.

404 “domain not found”: the Origin header did not describe a known customer.

(no code) “Build not found”: the specified build ID or name was not found.

Property: message

Type: string Required: no, only if success property is false

The error message.

TestStats

TestStats extends BuildMetadata with additional properties describing the progress of tests being performed, or already completed, against a particular build.

Property: completed

Type: boolean Required: yes

Will be true when all the tests are complete, false otherwise.

Property: stats

Type: object Required: yes

Contains nested properties describing the status of the tests. All properties are required and integers.

running: The number of tests currently running, visible as “In Progress” in the console.

queued: The number of tests waiting for execution, visible as “In Queue” in the console.

passed: The number of tests completed successfully, visible as “Passed” in the console.

failed: The number of tests completed with failure, visible as “Failed” in the console.

error: The number of tests completed with errors, visible as “Broken” in the console.

review: The number of tests completed with errors, visible as “In Review” in the console.

total: The total number of tests run against this build. This number will never change. It will always be running + queued + passed + failed + error + review.

ProjectStatsResponse

This is the top-level response object returned by the Project stats API. The success property boolean indicates whether or not the request succeeded. If success is true, then the data property will contain TestStats data for the most recently uploaded build to the project. Otherwise, message and code will contain information about the error.

Property: success

Type: boolean Required: yes

Indicates whether or not the call succeeded.

Property: data

Type: array of TestStats Required: no, only if success property is true

When success is true, an array containing a single TestStats object containing data about tests that are either in progress or complete for the given project.

Property: code

Type: integer Required: no, only if success property is false

The error code. Possible codes (not a comprehensive list):

401 “invalid or expired auth token”: the authentication token provided in X-Access-Token is invalid.

404 “domain not found”: the Origin header did not describe a known customer.

(no code) “No app found with this name”: the specified project ID or name was not found.

Property: message

Type: string Required: no, only if success property is false

The error message.