build

More info about the build schema can be found here.

Note

This resource can also be accessed using the plural form builds.

GET

GET /build/(string: id)/

Get all the available builds built or a single one if id is provided.

Parameters:
  • id (string) – The ID of the build to retrieve.
Request Headers:
 
Response Headers:
 
Query Parameters:
 
  • limit (int) – Number of results to return. Default 0 (all results).
  • skip (int) – Number of results to skip. Default 0 (none).
  • sort (string) – Field to sort the results on. Can be repeated multiple times.
  • sort_order (int) – The sort order of the results: -1 (descending), 1 (ascending). This will be applied only to the first sort parameter passed. Defaults to -1.
  • date_range (int) – Number of days to consider, starting from today (more info). By default consider all results.
  • field (string) – The field that should be returned in the response. Can be repeated multiple times.
  • nfield (string) – The field that should not be returned in the response. Can be repeated multiple times.
  • _id (string) – The internal ID of the build report.
  • created_on (string) – The creation date: accepted formats are YYYY-MM-DD and YYYYMMDD.
  • arch (string) – The architecture on which it was built.
  • build_type (string) – The type of the build.
  • defconfig (string) – The name of a defconfig.
  • defconfig_full (string) – The full name of a defconfig (with config fragments).
  • errors (int) – The number of errors found in the build log.
  • git_branch (string) – The name of the git branch.
  • git_commit (string) – The git commit SHA.
  • git_describe (string) – The git describe value.
  • job (string) – The name of a job.
  • job_id (string) – The ID of a job.
  • kernel (string) – The name of a kernel.
  • status (string) – The status of the build report.
  • time_range (string) – Minutes of data to consider, in UTC time (more info). Minimum value is 10 minutes, maximum is 60 * 24.
  • warnings (int) – The number of warnings found in the build log.
Status Codes:

Example Requests

GET /build/012345678901234567890123/ HTTP/1.1
Host: api.kernelci.org
Accept: */*
Authorization: token
GET /build?job=next&kernel=next-20140905&field=status&field=arch&nfield=_id HTTP/1.1
Host: api.kernelci.org
Accept: */*
Authorization: token

Examples Responses

HTTP/1.1 200 OK
Vary: Accept-Encoding
Date: Mon, 08 Sep 2014 14:16:52 GMT
Content-Type: application/json; charset=UTF-8

{
    "code": 200,
    "result": [
        {
            "status": "PASS",
            "kernel": "next-20140905",
            "job_id": "012345678901234567890123",
            "job": "next",
            "defconfig": "omap2plus_defconfig",
            "errors": null,
            "_id": "012345678901234567890123",
            "arch": "arm",
        }
    ]
}
HTTP/1.1 200 OK
Vary: Accept-Encoding
Date: Mon, 08 Sep 2014 14:20:52 GMT
Content-Type: application/json; charset=UTF-8

{
    "code": 200,
    "count": 132,
    "limit": 0,
    "result": [
        {
            "status": "PASS",
            "arch": "arm"
        },
        {
            "status": "PASS",
            "arch": "arm"
        },
        {
            "status": "PASS",
            "arch": "x86"
        },
        {
            "status": "PASS",
            "arch": "arm64"
        }
    ]
}

Note

Results shown here do not include the full JSON response.

GET /build/distinct/(string: field)

Get all the unique values for the specified field. Accepted field values are:

  • arch
  • compiler_version_ext
  • compiler_version
  • compiler
  • defconfig_full
  • defconfig
  • git_branch
  • git_commit
  • git_describe_v
  • git_describe
  • git_url
  • job
  • kernel_version
  • kernel

The query parameters can be used to first filter the data on which the unique value should be retrieved.

Parameters:
  • field (string) – The name of the field to get the unique values of.
Request Headers:
 
Response Headers:
 
Query Parameters:
 
  • limit (int) – Number of results to return. Default 0 (all results).
  • skip (int) – Number of results to skip. Default 0 (none).
  • sort (string) – Field to sort the results on. Can be repeated multiple times.
  • sort_order (int) – The sort order of the results: -1 (descending), 1 (ascending). This will be applied only to the first sort parameter passed. Default -1.
  • date_range (int) – Number of days to consider, starting from today (more info). By default consider all results.
  • field (string) – The field that should be returned in the response. Can be repeated multiple times.
  • nfield (string) – The field that should not be returned in the response. Can be repeated multiple times.
  • _id (string) – The internal ID of the build report.
  • created_on (string) – The creation date: accepted formats are YYYY-MM-DD and YYYYMMDD.
  • job (string) – A job name.
  • kernel (string) – A kernel name.
  • status (string) – The status of the build report.
Status Codes:

Example Requests

GET /build/distinct/arch HTTP/1.1
Host: api.kernelci.org
Accept: */*
Authorization: token
GET /build/distinct/kernel?job=next&date_range=5 HTTP/1.1
Host: api.kernelci.org
Accept: */*
Authorization: token

Example Responses

HTTP/1.1 200 OK
Vary: Accept-Encoding
Date: Mon, 11 Aug 2014 15:12:50 GMT
Content-Type: application/json; charset=UTF-8

{
    "code": 200,
    "count:" 4,
    "result": [
        "arm",
        "arm64",
        "x86",
        "x86_64"
    ]
}
HTTP/1.1 200 OK
Vary: Accept-Encoding
Date: Mon, 11 Aug 2014 15:23:00 GMT
Content-Type: application/json; charset=UTF-8

{
    "code": 200,
    "count": 2,
    "result": [
        "next-20150826",
        "next-20150825",
    ]
}

Note

Results shown here do not include the full JSON response.

GET /build/(string: build_id)/logs/
GET /build/logs/

Get the redacted logs of the build. The redacted logs contain only the warning, error and mismatched lines from the build log.

For more info about the available fields, see the build logs schema

Parameters:
  • build_id (string) – The ID of the build.
Request Headers:
 
Response Headers:
 
Query Parameters:
 
  • limit (int) – Number of results to return. Default 0 (all results).
  • skip (int) – Number of results to skip. Default 0 (none).
  • sort (string) – Field to sort the results on. Can be repeated multiple times.
  • sort_order (int) – The sort order of the results: -1 (descending), 1 (ascending). This will be applied only to the first sort parameter passed. Default -1.
  • date_range (int) – Number of days to consider, starting from today (more info). By default consider all results.
  • field (string) – The field that should be returned in the response. Can be repeated multiple times.
  • nfield (string) – The field that should not be returned in the response. Can be repeated multiple times.
  • _id (string) – The internal ID of the build logs report.
  • created_on (string) – The creation date: accepted formats are YYYY-MM-DD and YYYYMMDD.
  • job (string) – The name of a job.
  • job_id (string) – The ID of a job.
  • kernel (string) – The name of a kernel.
  • defconfig_full (string) – The full name of a defconfig (with config fragments).
  • defconfig (string) – The name of a defconfig.
  • arch (string) – The architecture on which it has been built.
  • status (string) – The status of the build.
  • warnings (int) – The number of warnings in the build log.
  • errors (int) – The number of errors in the build log.
  • mismatches (int) – The number of mismatched lines in the build log.
Status Codes:

Example Requests

GET /build/123456789012345678901234/logs/ HTTP/1.1
Host: api.kernelci.org
Accept: */*
Authorization: token
GET /build/logs?job=next&kernel=next-20150709&defconfig=omap2plus_defconfig HTTP/1.1
Host: api.kernelci.org
Accept: */*
Authorization: token

POST

POST /build

Parse a single build result. The request will be accepted and it will begin to parse the data.

Before issuing a POST request on the build resource, the data must have been uploaded to the server. This resource is used to trigger the parsing of the data.

For more info on all the required JSON data fields, see the build schema for POST requests.

Request JSON Object:
 
  • job (string) – The name of the job.
  • kernel (string) – The name of the kernel.
  • defconfig (string) – The name of the defconfig built.
  • arch (string) – The architecture type.
  • defconfig_full (string) – The full name of the defconfig (optional). Necessary if the defconfig built contained configuration fragments or other values.
  • git_branch (string) – The name of the branch.
Request Headers:
 
Response Headers:
 
Status Codes:

Example Requests

POST /build HTTP/1.1
Host: api.kernelci.org
Content-Type: application/json
Accept: */*
Authorization: token

{
    "job": "next",
    "kernel": "next-20140706",
    "defconfig": "tinyconfig",
    "arch": "x86",
    "git_branch": "master"
}
POST /build HTTP/1.1
Host: api.kernelci.org
Content-Type: application/json
Accept: */*
Authorization: token

{
    "job": "next",
    "kernel": "next-20140706",
    "defconfig": "multi_v7_defconfig",
    "defconfig_full": "multi_v7_defconfig+CONFIG_CPU_BIG_ENDIAN=y",
    "arch": "arm",
    "git_branch": "master"
}

DELETE

DELETE /build/(string: id)/

Delete the build identified by id.

Parameters:
  • id (string) – The ID of the build to delete.
Request Headers:
 
Response Headers:
 
Status Codes:

Example Requests

DELETE /build/01234567890123456789ABCD HTTP/1.1
Host: api.kernelci.org
Accept: */*
Content-Type: application/json
Authorization: token