Webtools/BuildAPI: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
This is a rough requirements doc for {{bug|487036}} (with further detail in {{bug|625417}}, duped).
= Constructicon =
Constructicon is a project to create an API against the buildbot db.  The purpose is to replace all those scripts that scrape the builds ftp server.


The goal is to build a RESTian API against the buildbot database.
Authentication should not be required to make calls, as this API is read-only.  We may wish to make it internal-only to begin with.


= Constructicon =
Data should be returned json-encoded.
Constructicon is a project to create an API against the buildbot db.  The purpose is to replace all those scripts that scrape the builds ftp server.


== Related bugs ==
== Related bugs ==
Line 10: Line 10:
* {{bug|624417}} is duped but has useful info
* {{bug|624417}} is duped but has useful info


= Calls needed =
= API calls =
== Changeset by buildid ==
== Get changeset by buildid ==
===Summary===
* uris
* Get changeset for buildid
** {url_prefix}/changeset/buildid/{buildid}[/repo/{repo}]
* Get changeset for buildid and regression range (not sure how this differs)
* params
** buildid
** repo
* return
** changeset
 
== Get buildids by date ==
* uris
** {url_prefix}/builds/date/{YYYY-MM-DD}[/repo/{repo}]
* params
** date in YYYY-MM-DD format
** repo - optional
* return
** array of buildids from that date for a repo or all repos if not specified, links to download on ftp for each
 
== Get latest build ==
* uris
** {url_prefix}/latest[/product/{product}][/repo/{repo}]
* params
** product
** repo
** one of these must be specified
 
= Later work =
These will not be implemented in the first iteration, and may not be available from the buildbot data, in which case we'll need to draw on other sources (e.g. crash-stats)


== Buildids by date ==
== Get All Products ==
=== Summary ===
* uris
* Get buildids for date and optional repo
** {url_prefix}/products
* params - None
* return
** array - an array of products


===URL===
== Get All Versions for a Product ==
GET on [product]/nightlies/[date]/[optional repo] returns JSON containing builds from that date for a repo or all repos if not specified, ids, links to download on ftp, etc
* uris
** {url_prefix}/versions/products/{product}[/current]
* params
** current - true if requesting all versions within a 90 day start/end date window.
** product - The name of the product
* return
** An array of versions for a product


Questions:
== Get all Builds for a Product ==
what's a repo?
* uris
is this valid for anything other than nightlies?
** {url_prefix}/builds/product/{product}
** {url_prefix}/builds/product/{product}/start/{YYYY-MM-DD}/end/{YYYY-MM-DD}
* params
** end - The end of the date range by which to search; format YYYY-MM-DD
** start - The beginning of the date range by which to search; format YYYY-MM-DD
** product - The name of the product
* return
** array - An array of all builds for a product


== Latest build ==
== Get all Builds for a Product / Version==
===Summary===
* uris
* Get latest build for product or repo
** {url_prefix}/builds/product/{product}/version/{version}
** {url_prefix}/builds/product/{product}/version/{version}/start/{YYYY-MM-DD}/end/{YYYY-MM-DD}
* params
** end - The end of the date range by which to search; format YYYY-MM-DD
** start - The beginning of the date range by which to search; format YYYY-MM-DD
** product - The product name
** version - The version string
* return
** array - An array of all builds for a product / version

Revision as of 14:26, 17 May 2011

Constructicon

Constructicon is a project to create an API against the buildbot db. The purpose is to replace all those scripts that scrape the builds ftp server.

Authentication should not be required to make calls, as this API is read-only. We may wish to make it internal-only to begin with.

Data should be returned json-encoded.

Related bugs

API calls

Get changeset by buildid

  • uris
    • {url_prefix}/changeset/buildid/{buildid}[/repo/{repo}]
  • params
    • buildid
    • repo
  • return
    • changeset

Get buildids by date

  • uris
    • {url_prefix}/builds/date/{YYYY-MM-DD}[/repo/{repo}]
  • params
    • date in YYYY-MM-DD format
    • repo - optional
  • return
    • array of buildids from that date for a repo or all repos if not specified, links to download on ftp for each

Get latest build

  • uris
    • {url_prefix}/latest[/product/{product}][/repo/{repo}]
  • params
    • product
    • repo
    • one of these must be specified

Later work

These will not be implemented in the first iteration, and may not be available from the buildbot data, in which case we'll need to draw on other sources (e.g. crash-stats)

Get All Products

  • uris
    • {url_prefix}/products
  • params - None
  • return
    • array - an array of products

Get All Versions for a Product

  • uris
    • {url_prefix}/versions/products/{product}[/current]
  • params
    • current - true if requesting all versions within a 90 day start/end date window.
    • product - The name of the product
  • return
    • An array of versions for a product

Get all Builds for a Product

  • uris
    • {url_prefix}/builds/product/{product}
    • {url_prefix}/builds/product/{product}/start/{YYYY-MM-DD}/end/{YYYY-MM-DD}
  • params
    • end - The end of the date range by which to search; format YYYY-MM-DD
    • start - The beginning of the date range by which to search; format YYYY-MM-DD
    • product - The name of the product
  • return
    • array - An array of all builds for a product

Get all Builds for a Product / Version

  • uris
    • {url_prefix}/builds/product/{product}/version/{version}
    • {url_prefix}/builds/product/{product}/version/{version}/start/{YYYY-MM-DD}/end/{YYYY-MM-DD}
  • params
    • end - The end of the date range by which to search; format YYYY-MM-DD
    • start - The beginning of the date range by which to search; format YYYY-MM-DD
    • product - The product name
    • version - The version string
  • return
    • array - An array of all builds for a product / version