basset

basset

  • Docs
  • API
  • Blog
  • GitHub
ReDoc documentation
Documentation Powered by ReDoc

Basset Build API (1.0.0)

Download OpenAPI specification:Download

Authentication

TokenAuth

Security scheme type: HTTP
HTTP Authorization Scheme bearer
Bearer format "TOKEN"

Create a build

Authorizations:
TokenAuth
header Parameters
Authorization
required
string
Example: Token <token>

Token authorization from project

Request Body schema: application/json
branch
string

The branch used to create the snapshots

commitSha
string

The SHA1 from the current

committerName
string

The name from the current

commiterEmail
string

The email from the commit

commitDate
string

The commit date of the commit (YYYY-MM-DDThh-mm-ss-Z)

authorName
string

The author of the commit

authorEmail
string

The author email of the commit

authorDate
string

The author date of the commit (YYYY-MM-DDThh-mm-ss-Z)

assets
object (Assets)

A HashTable of file names as the key and SHA1 as the value

Responses

200

Build object

403

Error

post /builds/start
/builds/start

Request samples

  • Payload
Content type
application/json
Copy
Expand all Collapse all
{
  • "branch": "string",
  • "commitSha": "string",
  • "committerName": "string",
  • "commiterEmail": "string",
  • "commitDate": "2019-10-26T12:58:18-07:00",
  • "authorName": "string",
  • "authorEmail": "string",
  • "authorDate": "2019-10-26T12:58:18-07:00",
  • "assets":
    {
    • "base/file/image.png": "1234abcdef",
    • "base/other/image.png": "abcdef1234"
    }
}

Response samples

  • 200
  • 403
Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "assets":
    {
    • "base/file/image.png": "1234abcdef",
    • "base/other/image.png": "abcdef1234"
    }
}

Upload and create snapshot entry

Authorizations:
TokenAuth
header Parameters
X-BUILD-ID
required
string <uuid>

The buildId from the created build

X-RELATIVE-PATH
required
string
Example: path/to/file.png

The relative path of the file

X-SHA
required
string

The SHA1 of the file

Request Body schema: multipart/form-data
snapshot
string <binary>
widths
string

Single or Multiple (comma separated) width(s)

title
string

Title of the snapshot

selectors
string

CSS selectors used to take a snapshot of elements

hideSelectors
string

CSS selectors used to hide elements

browsers
string

Browser(s) to render snapshots on (comma separated) firefox or chrome

Responses

200

Uploaded object

403

Error

post /builds/upload/snapshot
/builds/upload/snapshot

Response samples

  • 200
  • 403
Content type
application/json
Copy
Expand all Collapse all
{
  • "uploaded": true
}

Upload an asset

Authorizations:
TokenAuth
header Parameters
X-BUILD-ID
required
string <uuid>

The buildId from the created build

X-RELATIVE-PATH
required
string
Example: path/to/file.png

The relative path of the file

X-SHA
required
string

The SHA1 of the file

Request Body schema: multipart/form-data
asset
string <binary>

Responses

200

Uploaded object

403

Error

post /builds/upload/asset
/builds/upload/asset

Response samples

  • 200
  • 403
Content type
application/json
Copy
Expand all Collapse all
{
  • "uploaded": true
}

Finish the build

Authorizations:
TokenAuth
Request Body schema: application/json
buildId
string <uuid>

Responses

200

Submitted object

403

Error

post /builds/finish
/builds/finish

Request samples

  • Payload
Content type
application/json
Copy
Expand all Collapse all
{
  • "buildId": "string"
}

Response samples

  • 200
  • 403
Content type
application/json
Copy
Expand all Collapse all
{
  • "submitted": true
}
basset
Docs
PrerequisitesInstallationSetup on AWSEnvironmental Variables
More
TermsPrivacy PolicyAPIBlogGitHubStar