Coin API
API overview
The Coin API provides information of the integrations known as tasks and workitems which refer to single VM or agent. See response of each endpoint for more details of returned data.
Endpoints
Tasks
URL: /coin/api/tasks
Description: Returns list of tasks filtered by query parameters.
Parameters |
Description |
---|---|
project |
Comma separated list of projects. By default all projects are returned. |
branch |
Comma separated list of branches. By default all branches are returned. |
max |
Number speficying how many tasks are returned. [1-1000] default=100 |
start |
Specifies index from which task collection starts. Used to get all tasks when query contains more tasks than specified max value. Returned index value can be used to access next set of tasks. |
type |
Comma separated list of types, see response below for the types By default all types are returned. |
before |
ISO 8601 formatted time specifying end of time range. |
after |
ISO 8601 formatted time specifying start of time range. |
state |
Comma separated list of states, see response below for the states By default all states are returned. |
searchText |
Free form string which is matched to fields of task |
Response:
{
"tasks": [
{
"id": "1650435526",
"project": "qt/qtbase",
"branch": "dev",
"type": "StatusCheck", # possible types [Integration, StatusCheck, EarlyWarning, CreateDebugVm, HealthCheck]
"started_on": "2022-04-20 06:18:46 +0000 UTC",
"state": "Cancelled", # Possible states [Running, Passed, Failed, Cancelled, Insignificant, Initializing]
"sha": "d7799056fcc39012303d88e352aae763e1d29f38", # Represents all changes included in an integration, but may not be representative of the final branch state after gerrit merges changes
"tested_shas": [
"e5a1cc2964d931892dbfb55b2f21c3e4d8b71d9c"
], # List of tested sha's, if any
"self_url": "http://testresults.qt.io/cilogs/qt/qtbase/d7799056fcc3212303d88e352aae763e1d29f38",
"is_public": false,
"completed_on": "2022-04-20 07:18:46 +0000 UTC", # Included only if task has finished
"final_sha": "16905ad804bf156e6a1f790c277b17775cd5afbb" # SHA after merge to target branch. Only present on passed integration tasks
}
],
"more": true, # True if more results than the requested max count exist
"index": "/coin/api/tasks?max=1&start=37" # URL-encoded query string to GET next set if more results are available
}
TaskDetail
URL: /coin/api/taskDetail
Description: Returns list of detailed task information for given task IDs.
Parameters |
Description |
---|---|
id |
Comma separated list of task IDs. |
Response:
{
"tasks": [
{
"id": "1661152685",
"project": "qt/qtdoc",
"branch": "dev",
"type": "Integration",
"started_on": "2022-04-20 06:18:46 +0000 UTC",
"state": "Passed",
"verbose_status": "Status message", # Returned if detailed reason has been given
"self_url": "http://testresults.qt.io/cilogs/qt/qtbase/1660bc199a6f12daa509cdbf4425f09d22b91751",
"is_public": true,
"completed_on": "2022-04-20 06:20:04 +0000 UTC", # null if task has not finished
"sha": "d7799056fcc39065c03d88e352aae763e1d29f38",
"tested_changes": [
{
"sha": "1660bc199a6f12daa509cdbf4425f09d22b91751",
"project": "qt/qtpositioning",
"subject": "Update dependencies on '6.4' in qt/qtpositioning\n",
"change_number": "428051"
}
],
"workitem_ids": [ # List of work item IDs
"provisioning/qtci-linux-Ubuntu-20.04-x86_64-50-d72535/provision_1650435372",
"qt/qtbase/eea9e7e2022596a0fa3a96a60381ad2ee2472122/LinuxUbuntu_20_04x86_64LinuxUbuntu_20_04x86_64GCCqtci-linux-Ubuntu-20.04-x86_64-50-d72535DisableTests/dd649dc0f7872b25b71c773af5cf554e5c37de91/build_1650435529"
],
"source_ref": "refs/builds/qtci/6.4/1661150881"
},
{
"id": ....,
"project": ....
}
]
}
TaskTestedChanges
URL: /coin/api/taskTestedChanges
Description: Returns list of tested changes for the given task ID.
Parameters |
Description |
---|---|
id |
Comma separated list of task IDs. |
Response:
{
"tasks_with_tested_changes": [
{
"task_id": "web_qt_gitlabrunner_16777426339744752",
"tested_changes": [
{
"sha": "d7799056fcc39065c03d88e352aae763e1d29f38",
"project": "qt/qtbase",
"ref": "",
"subject": "foo change",
"change_number": "324489",
"change_id": ""
"links": [
{
"web_url": "foo_url",
"rest_url": "bar_url"
}
]
}...
]
}...
]
}
TaskWorkitems
URL: /coin/api/taskWorkItems
Description: Returns list of workitems for the given task ID.
Duration of build in seconds. Calculated from started_on and completed_on for conveniance
Parameters |
Description |
---|---|
id |
Comma separated list of task IDs. |
Response:
{
"tasks_with_workitems": [
{
"task_id": "1677074343_restarted",
"workitems": [
{
"task_action": "Test",
"build_key": "qt/qtbase/62c7dabf10de4b84ac2d7052824aca85aab2fa54/LinuxRHEL_8_4x86_64LinuxRHEL_8_4x86_64GCCqtci-linux-RHEL-8.4-x86_64-50-d98dfeSccache/6bfb18a37ed58ea56f6bf2b97e81670fdca42c09/Test",
"workitem_id": "qt/qtbase/62c7dabf10de4b84ac2d7052824aca85aab2fa54/LinuxRHEL_8_4x86_64LinuxRHEL_8_4x86_64GCCqtci-linux-RHEL-8.4-x86_64-50-d98dfeSccache/6bfb18a37ed58ea56f6bf2b97e81670fdca42c09/test_1649936069", # Unique workitem ID, matches the workitem_id value in taskDetail output
"state": "Done",
"coin_features": [
"Packaging",
"Sccache"
],
"configure_arguments": [
"-DQT_BUILD_EXAMPLES=OFF",
"-DCMAKE_BUILD_TYPE=RelWithDebInfo"
],
"environment": [
"CONAN_PROFILE=coin/conan/profiles/ci-linux-x86_64-gcc"
],
"started_on": "2022-06-30 13:24:59 +0000 UTC",
"completed_on": "2022-06-30 13:35:57 +0000 UTC", # null if task has not finished
"storage_paths": {
"log_web": "/coin/logview/qt/qtbase/62c7dabf10de4b84ac2d7052824aca85aab2fa54/LinuxRHEL_8_4x86_64LinuxRHEL_8_4x86_64GCCqtci-linux-RHEL-8.4-x86_64-50-d98dfeSccache/6bfb18a37ed58ea56f6bf2b97e81670fdca42c09/test_1649936069",
"log_raw": "/coin/api/results/qt/qtbase/62c7dabf10de4b84ac2d7052824aca85aab2fa54/LinuxRHEL_8_4x86_64LinuxRHEL_8_4x86_64GCCqtci-linux-RHEL-8.4-x86_64-50-d98dfeSccache/6bfb18a37ed58ea56f6bf2b97e81670fdca42c09/test_1649936069/log.txt.gz"
},
"project": "qt/qtbase",
"branch": "dev",
"duration": 658, # Duration in seconds. null if task has not finished
"platform": {
"target": {
"os": "Linux",
"os_version": "RHEL_8_4",
"arch": "X86_64",
"compiler": "GCC"
},
"host": {
"os": "Linux",
"os_version": "RHEL_8_4",
"arch": "X86_64",
"compiler": "GCC"
}
},
"identifier": "rhel-xyz-static", # Optional
"dependencies": [ # Optional. Included only if dependencies are defined
"windows-10_22h2-msvc2019-developer-build"
]
}...
]
}
}
WorkItems
URL: /coin/api/workItems
Description: Returns list of workItems filtered by query parameters.
Parameters |
Description |
---|---|
id |
Comma separated list of work item ID’s. If parameter is provided, all other search parameters are ignored. |
project |
Comma separated list of projects. By default all projects are returned. |
branch |
Comma separated list of branches. By default all branches are returned. |
max |
Number specifying how many tasks are returned. [1-1000] default=100 |
start |
Specifies index from which workItem collection starts. Used to get all workItems when query contains more items than specified max value. Returned index value can be used to access next set of workItems. |
type |
Comma separated list of types. Possible types: Build, Test, Provision, Final, Jenkins |
before |
ISO 8601 formatted time specifying end of time range. |
after |
ISO 8601 formatted time specifying start of time range. |
state |
Comma separated list of states. Supported states: New, WaitingForSourceArchive, WaitingForDependencies, WaitingForHardware, WaitingForAgent, Running, Done, Failed, Timeout, Cancelled and Insignificant. By default all states are returned. |
Response:
{
"workitems": [
{
"task_action": "Test",
"build_key": "qt/qtinterfaceframework/2a2f8a3b8b9a909917652f7ba99e10cf7baf558f/MacOSMacOS_12x86_64MacOSMacOS_12x86_64Clangqtci-macos-12-x86_64-102-f3eb2fSccache_TestOnly/6c448f9027165e997d59df10f6641c45c6f00a51/Test",
"state": "Done",
"coin_features": [
"Sccache",
"TestOnly",
"Packaging",
"AbortTestingOnFirstFailure"
],
"started_on": "2022-08-25 11:08:34 +0000 UTC",
"completed_on": "2022-08-25 11:11:18 +0000 UTC", # null if workItem has not finished
"storage_paths": {
"log_web": "/coin/logview/qt/qtinterfaceframework/2a2f8a3b8b9a909917652f7ba99e10cf7baf558f/MacOSMacOS_12x86_64MacOSMacOS_12x86_64Clangqtci-macos-12-x86_64-102-f3eb2fSccache_TestOnly/6c448f9027165e997d59df10f6641c45c6f00a51/test_1661416401",
"log_raw": "/coin/api/results/qt/qtinterfaceframework/2a2f8a3b8b9a909917652f7ba99e10cf7baf558f/MacOSMacOS_12x86_64MacOSMacOS_12x86_64Clangqtci-macos-12-x86_64-102-f3eb2fSccache_TestOnly/6c448f9027165e997d59df10f6641c45c6f00a51/test_1661416401/log.txt.gz"
},
"project": "qt/qtinterfaceframework",
"duration": 164,
"branch": "dev",
"platform": {
"target": {
"os": "Linux",
"os_version": "RHEL_8_4",
"arch": "X86_64",
"compiler": "GCC"
},
"host": {
"os": "Linux",
"os_version": "RHEL_8_4",
"arch": "X86_64",
"compiler": "GCC"
}
},
"identifier": "rhel-xyz-static", # Optional
"dependencies": [ # Optional. Included only if dependencies are defined
"windows-10_22h2-msvc2019-developer-build"
]
},...
]
}