Buildfarm Query API
A colleague asked me recently if there was an API for querying the PostgreSQL Buildfarm database. I told him there was not. I'm aware that a number of people have been scraping the web pages for data, so it seemed like there was a good case for something better. And with a little help from claude code, I create one. It's live now. There's a full description at https://github.com/PGBuildFarm/server-code/blob/main/API.md
I'm particularly interested to hear from people how this might be usefully extended.
Here's an example of use, getting the latest status for the member crake on the master branch:
$ GET https://buildfarm.postgresql.org/cgi-bin/bfapi.pl/status/master/crake
[
{
"architecture" : "x86_64",
"branch" : "master",
"build_flags" : [
"buildtype",
"cassert",
"nls",
"plperl",
"plpython",
"pltcl",
"gssapi",
"openssl",
"ldap",
"xml",
"libxslt",
"zlib",
"readline",
"tap-tests",
"uuid",
"icu",
"PG_TEST_EXTRA",
"injection-points",
"curl",
"debug",
"meson",
"git",
"integer-datetimes",
"thread-safety"
],
"compiler" : "gcc",
"compiler_version" : "16.1.1",
"git_head_ref" : "7dd15325952fe85521b1fefea3ad39cf1b46e0c8",
"log_archive_filenames" : [
"SCM-checkout.log",
"configure.log",
"build.log",
"test-setup.log",
"check.log",
"make-doc.log",
"make-install.log",
"install-testmodules.log",
"BlackholeFDW-build.log",
"RedisFDW-build.log",
"FileTextArrayFDW-build.log",
"perl-check.log",
"BlackholeFDW-install.log",
"RedisFDW-install.log",
"FileTextArrayFDW-install.log",
"misc-check.log",
"initdb-C.log",
"startdb-C-1.log",
"install-check-C.log",
"RedisFDW-installcheck-C.log",
"FileTextArrayFDW-installcheck-C.log",
"stopdb-C-1.log",
"startdb-C-2.log",
"misc-installcheck-C.log",
"stopdb-C-2.log",
"xversion-upgrade-save.log",
"xversion-upgrade-HEAD-HEAD.log",
"xversion-upgrade-REL_18_STABLE-HEAD.log",
"xversion-upgrade-REL_17_STABLE-HEAD.log",
"xversion-upgrade-REL_16_STABLE-HEAD.log"
],
"operating_system" : "Fedora",
"os_version" : "44",
"report_time" : "2026-06-11 15:17:00.353648+00",
"snapshot" : "2026-06-11 14:54:18",
"stage" : "XversionUpgrade-REL_16_STABLE-HEAD",
"status" : 1,
"sysname" : "crake",
"when_ago_secs" : 4607
}
]