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.

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.
  • build_id (string) – The ID of the build report used for testing.
  • 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",
    "build_id": "01234567890123456789ABCD",
    "version": "1.0"
}
POST /test/group HTTP/1.1
Host: api.kernelci.org
Content-Type: application/json
Accept: */*
Authorization: token

{
    "name": "LSK test group",
    "build_id": "01234567890123456789ABCD",
    "version": "1.0",
    "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"
}
HTTP/1.1 202 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": 202,
    "result": [
        {
            "_id": {
                "$oid": "01234567890123456789ABCD"
            }
        }
    ],
    "reason": "Test group 'LSK test group' created",
    "messages": [
        "Test cases will be parsed and imported"
    ]
}

PUT

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

Update an existing test group identified by its id with values defined in the JSON data.

Parameters:
  • id (string) – The ID of the test group.
Request Headers:
 
Response Headers:
 
Status Codes:

Example Requests

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

{
    "name": "LSK test group - NEW",
    "build_id": "01234567890123456789ABCD"
}

Example Responses

HTTP/1.1 202 Resource '123456789' updated
Vary: Accept-Encoding
Date: Mon, 16 Mar 2014 12:29:51 GMT
Content-Type: application/json; charset=UTF-8

{
    "code": 200,
    "reason": "Resource '01234567890123456789ABCD' updated",
}

DELETE

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

Delete the test group identified by id. All its associated test cases will be deleted as well.

Parameters:
  • id (string) – The ID of the test group.
Request Headers:
 
Response Headers:
 
Status Codes:

Example Requests

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

Example Responses

HTTP/1.1 202 Resource '01234567890123456789ABCD' deleted
Vary: Accept-Encoding
Date: Mon, 16 Mar 2014 12:29:51 GMT
Content-Type: application/json; charset=UTF-8

{
    "code": 200,
    "reason": "Resource '01234567890123456789ABCD' deleted",
}