job

More info about the job schema can be found here.

Note

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

GET

GET /job/(string: id)/

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

Parameters:
  • id (string) – The ID of the job 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 job 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 job report.
  • time_range (string) – Minutes of data to consider, in UTC time (more info). Minimum value is 10 minutes, maximum is 60 * 24.
Status Codes:

Example Requests

GET /job/012345678901234567890123/ HTTP/1.1
Host: api.kernelci.org
Accept: */*
Authorization: token
GET /job?date_range=12&job=arm-soc&field=status&field=kernel 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:" 261,
    "limit": 0,
    "result": [
        {
            "status": "PASS",
            "job": "arm-soc",
            "_id": "012345678901234567890123",
        },
    ],
}
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",
    "result": [
        {
            "status": "PASS",
            "job": "next",
            "_id": "0123456789001234567890123",
            "kernel": "next-20140731"
        }
    ]
}
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": 4,
    "limit": 0,
    "result": [
        {
            "status": "PASS",
            "kernel": "v3.16-rc6-1009-g709032a"
        },
        {
            "status": "PASS",
            "kernel": "v3.16-rc6-1014-g716519f"
        }
    ]
}

Note

Results shown here do not include the full JSON response.

GET /job/distinct/(string: field)

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

  • compiler_version_ext
  • compiler_version
  • compiler
  • 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 job 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 job report.
Status Codes:

Example Requests

GET /job/distinct/job HTTP/1.1
Host: api.kernelci.org
Accept: */*
Authorization: token
GET /job/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:" 49,
    "result": [
        "next",
        "mainline",
        "omap"
    ]
}
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": 3,
    "result": [
        "next-20150826",
        "next-20150825",
        "next-20150824"
    ]
}

Note

Results shown here do not include the full JSON response.

GET /job/(string: id)/logs
GET /job/logs

Get the summary of the logs of the builds associated with the job.

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

Parameters:
  • id (string) – The ID of the job.
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.
  • 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.
Status Codes:

Example Requests

GET /job/123456789012345678901234/logs HTTP/1.1
Host: api.kernelci.org
Accept: */*
Authorization: token

Example Responses

HTTP/1.1 200 OK
Vary: Accept-Encoding
Date: Wed, 2 Sept 2015 11:12:50 GMT
Content-Type: application/json; charset=UTF-8

{
    "code": 200,
    "result": [
        {
            "_id": {
                "$oid": "123456789012345678901234"
            },
            "job_id": {
                "$oid": "123456789012345678901234"
            },
            "job": "next",
            "kernel": "next-20150921",
            "errors": [
                [1, "An error string"]
            ],
            "warnings": [
                [10, "A warning string"]
            ]
        }
    ]
}

Note

Results shown here do not include the full JSON response.

POST

POST /job

Update a job status once all builds have been imported.

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

Request JSON Object:
 
  • job (string) – The name of the job.
  • kernel (string) – The name of the kernel.
  • git_branch (string) – The name of the branch.
  • status (string) – The status the job should be set to (optional). By default it will be set to PASS.
Request Headers:
 
Response Headers:
 
Status Codes:

Example Requests

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

{
    "job": "next",
    "kernel": "next-20140801",
    "git_branch": "master",
    "status": "FAIL"
}

DELETE

DELETE /job/(string: id)/

Delete the job identified by id.

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

Example Requests

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