Skip to content
FeedbackDashboard

List project builds

$client->builds->list(string project, ?string branch, ?string cursor, ?float limit, ?Revision revision): Page<Build>
GET/v0/builds

List user-triggered builds for a given project.

An optional revision can be specified to filter by config commit SHA, or hashes of file contents.

ParametersExpand Collapse
project: string

Project name

branch?:optional string

Branch name

cursor?:optional string

Pagination cursor from a previous response.

limit?:optional float

Maximum number of builds to return, defaults to 10 (maximum: 100).

revision?:optional Revision

A config commit SHA used for the build

ReturnsExpand Collapse
string id

Build ID

string configCommit
\Datetime createdAt
?DocumentedSpec documentedSpec
Object_ object
string org
string project
Targets targets
\Datetime updatedAt

List project builds

<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

$client = new Client(apiKey: 'My API Key', environment: 'staging');

$page = $client->builds->list(
  project: 'project',
  branch: 'branch',
  cursor: 'cursor',
  limit: 1,
  revision: 'string',
);

var_dump($page);
{
  "data": [
    {
      "id": "id",
      "config_commit": "config_commit",
      "created_at": "2019-12-27T18:11:19.117Z",
      "documented_spec": {
        "content": "content",
        "type": "content"
      },
      "object": "build",
      "org": "org",
      "project": "project",
      "targets": {
        "cli": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "csharp": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "go": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "java": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "kotlin": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "node": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "openapi": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "php": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "python": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "ruby": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "sql": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "terraform": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "typescript": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        }
      },
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "has_more": true,
  "next_cursor": "next_cursor"
}
Returns Examples
{
  "data": [
    {
      "id": "id",
      "config_commit": "config_commit",
      "created_at": "2019-12-27T18:11:19.117Z",
      "documented_spec": {
        "content": "content",
        "type": "content"
      },
      "object": "build",
      "org": "org",
      "project": "project",
      "targets": {
        "cli": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "csharp": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "go": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "java": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "kotlin": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "node": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "openapi": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "php": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "python": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "ruby": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "sql": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "terraform": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        },
        "typescript": {
          "commit": {
            "status": "not_started"
          },
          "install_url": "install_url",
          "object": "build_target",
          "status": "not_started",
          "build": {
            "status": "not_started"
          },
          "lint": {
            "status": "not_started"
          },
          "test": {
            "status": "not_started"
          }
        }
      },
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "has_more": true,
  "next_cursor": "next_cursor"
}