group

More info about the test group schema can be found here.

Note

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

GET

GET /test/group/(string: id)/

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

Parameters:
  • id (string) – The ID of the test group 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. 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.
  • arch (string) – The platform architecture.
  • board (string) – The board where the test group has been run.
  • board_instance (string) – The board instance where the test group has been run.
  • boot_id (string) – The ID of the boot report used by the test group.
  • build_id (string) – The ID of the build report used by the test group.
  • created_on (string) – The creation date: accepted formats are YYYY-MM-DD and YYYYMMDD.
  • defconfig (string) – A value of the defconfig used for the build.
  • defconfig_full (string) – A value of the defconfig_full used for the build.
  • definition_uri (string) – The URI where the test definition is stored.
  • git_branch (string) – The name of the branch.
  • job (string) – The tree name.
  • job_id (string) – The ID of the job.
  • kernel (string) – The kernel name.
  • lab_name (string) – The name of the lab executing the test.
  • name (string) – The name of a test group.
  • time (string) – The time it took to execute the test group.
  • vcs_commit (string) – The VCS commit value.
Status Codes:

Example Requests

GET /test/group HTTP/1.1
Host: api.kernelci.org
Accept: */*
Authorization: token
GET /tests/groups HTTP/1.1
Host: api.kernelci.org
Accept: */*
Authorization: token

Example Responses

HTTP/1.1 200 OK
Vary: Accept-Encoding
Date: Mon, 16 Mar 2015 14:03:19 GMT
Content-Type: application/json; charset=UTF-8

{
    "code": 200,
    "count": 1,
    "result": [
        {
            "_id": {
                "$oid": "01234567890123456789ABCD",
                "name": "Test group"
            }
        }
    ]
}

Note

Results shown here do not include the full JSON response.

POST

POST /test/group

Create a new test group as defined in the JSON data. The request will be accepted and, if test cases have been specified in the JSON data, it will begin to parse the data. During the processing handler will try to determine job_id and build_id based on the data provided in the JSON.

If saving the test group has success, it will return the associated ID value.

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

Request JSON Object:
 
  • name (string) – The name of the test group.
  • arch (string) – The architecture type of the board.
  • build_environment (string) – The name of the build environment.
  • defconfig (string) – The name of the defconfig.
  • git_branch (string) – The branch used for testing.
  • job (string) – The name of the job (aka the git tree).
  • kernel (string) – The name of the kernel or the git describe value.
  • lab_name (string) – The name of the lab executing this test group.
  • version (string) – The version of the JSON schema format.
Request Headers:
 
Response Headers:
 
Status Codes:

Example Requests

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

{
    "name": "LSK test group",
    "defconfig": "x86_64_defconfig",
    "job": "kernelci-local-snapshot-032",
    "arch": "x86",
    "kernel" : "kernelci-local-snapshot-032",
    "build_environment": "gcc-8",
    "git_branch": "next",
    "lab_name": "local_lab",
    "version": "1.2"
}
POST /test/group HTTP/1.1
Host: api.kernelci.org
Content-Type: application/json
Accept: */*
Authorization: token

{
    "name": "LSK test group",
    "defconfig": "x86_64_defconfig",
    "job": "kernelci-local-snapshot-032",
    "arch": "x86",
    "kernel" : "kernelci-local-snapshot-032",
    "build_environment": "gcc-8",
    "git_branch": "next",
    "lab_name": "local_lab",
    "version": "1.2",
    "test_cases": [
        {
            "name": "Test case 0",
            "version": "1.0"
        }
    ]
}

Example Responses

HTTP/1.1 201 Test group 'LSK test group' created
Vary: Accept-Encoding
Date: Mon, 16 Mar 2014 12:29:51 GMT
Content-Type: application/json; charset=UTF-8
Location: /test/group/01234567890123456789ABCD

{
    "code": 201,
    "result": [
        {
            "_id": {
                "$oid": "01234567890123456789ABCD"
            }
        }
    ],
    "reason": "Test group 'LSK test group' created"
}