case¶
More info about the test case schema can be found here.
Note
This resource can also be accessed using the plural form cases
.
GET¶
-
GET
/test/case/
(string: id)/
¶ Get all the available test cases or a single one if
id
is provided.Parameters: - id (string) – The ID of the test case to retrieve.
Request Headers: - Authorization – The token necessary to authorize the request.
- Accept-Encoding – Accept the
gzip
coding.
Response Headers: - Content-Type – Will be
application/json; charset=UTF-8
.
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 test case report.
- created_on (string) – The creation date: accepted formats are
YYYY-MM-DD
andYYYYMMDD
. - kvm_guest (string) – The name of the KVM guest the test was executed on.
- maximum (int) – The maximum measurement registered.
- minimum (int) – The minimum measurement registered.
- name (string) – The name of a test case.
- samples (int) – Number of registered measurements.
- status (string) – The status of the test execution.
- test_suite_id (string) – The ID of the test suite associated with the test case.
- test_suite_name (string) – The name of the test suite associated with the test case.
- time (string) – The time it took to execute the test case.
- vcs_commit (string) – The VCS commit value.
Status Codes: - 200 OK – Results found.
- 403 Forbidden – Not authorized to perform the operation.
- 404 Not Found – The provided resource has not been found.
- 500 Internal Server Error – Internal server error.
- 503 Service Unavailable – Service maintenance.
Example Requests
GET /test/case HTTP/1.1 Host: api.kernelci.org Accept: */* Authorization: token
GET /tests/cases 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": "123456789", "name": "Test case 0" } } ] }
Note
Results shown here do not include the full JSON response.
More Info¶
- Test suite schema
- Test case schema
- Test schemas
- API results
- Schema time and date