getBuilds

@GET(value = "api/builds")
abstract suspend fun getBuilds(@Query(value = "fromInstant") fromInstant: Long? = null, @Query(value = "fromBuild") fromBuild: String? = null, @Query(value = "reverse") reverse: Boolean? = null, @Query(value = "maxBuilds") maxBuilds: Int? = null, @Query(value = "maxWaitSecs") maxWaitSecs: Int? = null, @Query(value = "query") query: String? = null, @Query(value = "models") models: List<BuildModelName>? = null, @Query(value = "allModels") allModels: Boolean? = false, @Query(value = "since") since: Long? = null, @Query(value = "sinceBuild") sinceBuild: String? = null): List<Build>

Get a list of builds with common attributes. The contained attributes are build tool agnostic. If none of `fromInstant`, `fromBuild`, or `reverse` is used, when making a request to this endpoint, it will return builds that were received and processed by Develocity after the request was made. Responses:

  • 200: A list of builds with common attributes.

  • 400: The request cannot be fulfilled due to a problem.

  • 404: The referenced resource either does not exist or the permissions to know about it are missing.

  • 500: The server encountered an unexpected error.

  • 503: The server is not ready to handle the request.

Return

kotlin.collections.List

Parameters

fromInstant

A unix-epoch-time in milliseconds allowing to retrieve builds for which Develocity completed receiving and processing the build after this instant when used in conjunction with `reverse=false`, or before this instant when used in conjunction with `reverse=true`. Therefore, a value of `0` will process all builds. If not provided, the time in milliseconds when the request is received by the Develocity instance will be used. This parameter has no effect if `fromBuild` is used. (optional)

fromBuild

A Build Scan ID allowing to retrieve builds for which Develocity completed receiving and processing after the given Build Scan ID (excluding it) when used in conjunction with `reverse=false`, or before the given Build Scan ID (excluding it) when used in conjunction with `reverse=true`. This parameter has precedence over any value set for the `since`, `sinceBuild`, `fromInstant` parameters. A valid Build Scan ID must be provided, that is, a Build Scan ID that exists in the Develocity instance. A Build Scan ID for a deleted build is valid. (optional)

reverse

A boolean indicating the time direction of the query. A value of `true` indicates a backward query, and returned builds will be sorted from most to least recent. A value of `false` indicates a forward query, and returned builds will be sorted from least to most recent. This parameter has no effect if any of `since`, `sinceBuild` are used. If not provided, the default value is `false`. (optional)

maxBuilds

The maximum number of builds returned by the query. The query returns when that number is reached or when `maxWaitSecs` is reached. If not provided, the default value is `100`. (optional)

maxWaitSecs

The maximum number of seconds to wait for builds before returning. If this time is reached before `maxBuilds` is reached, the query returns with the already processed builds. Note that this time is respected with best effort. A query will return soon after this time has passed but there is no guarantee that it exactly returns before this time has passed. This parameter has no effect if `reverse=true` is specified, because new builds cannot become available in the past. If not provided, the default value is `3`. (optional)

query

A query for filtering builds, written in the Develocity advanced search query language See: https://gradle.com/help/advanced-search (optional)

models

The list of build models to return in the response for each build. If not provided, no models are returned. (optional)

allModels

Whether to include all build models for each build. If set to `true`, the value of the `models` parameter is ignored. (optional, default to false)

since

This parameter is deprecated, use `fromInstant` instead. A unix-epoch-time in milliseconds allowing to retrieve builds for which Develocity completed receiving and processing the build after this instant. This parameter can only be used with `reverse=false`. Therefore, a value of `0` will process all builds. If not provided, the time in milliseconds when the request is received by the Develocity instance will be used. This parameter has no effect if any of `sinceBuild`, `fromInstant`, `fromBuild` are used. (optional)

sinceBuild

This parameter is deprecated, use `fromBuild` instead. A Build Scan ID allowing to retrieve builds for which Develocity completed receiving and processing after the given Build Scan ID (excluding it). This parameter can only be used with `reverse=false`. This parameter has precedence over any value set for the `since` parameter. A valid Build Scan ID must be provided, that is, a Build Scan ID that exists in the Develocity instance. A Build Scan ID for a deleted build is valid. This parameter has no effect if any of `fromInstant`, `fromBuild` are used. (optional)