Builds

APIs for managing builds are currently available for developers to preview. During the preview period, the API may change without advance notice.

Start a new build

POST /builds

Parameters

NameTypeDescription
appIdstringRequired. The application identifier.
workflowIdstringRequired. The workflow identifier as specified in YAML file.
branchstringRequired. The branch name.
environmentobjectOptional. Specify environment variables and software versions to override values defined in workflow settings.

Example

{
    "appId": "5c9c064185dd2310123b8e96",
    "workflowId": "release",
    "branch": "master",
    "environment": {
        "variables": {
            "ENVIRONMENT_VARIABLE_1": "...",
            "ENVIRONMENT_VARIABLE_2": "..."
        },
        "softwareVersions": {
            "xcode": "11.4.1",
            "flutter": "v1.12.13+hotfix.9"
        }
    }
}

Response

{
    "application": {
        "_id": "5c9c064185dd2310123b8e96",
        "appName": "my-repo"
    },
    "build": {
        "_id": "5c9c025185ed4300133b2a17",
        "appId": "5c9c064185dd2310123b8e96",
        "branch": "master",
        "index": 1,
        "status": "queued"
    }
}

Cancel build

POST /builds/:id/cancel

The request will return 208 Already Reported if the build has already finished.