api
[!NOTE] api url: http(s)://sample.klocwork.com:443/review/api reference:
Authentication using the ltoken
$ export KLOCWORK_LTOKEN=/path/to/ltoken
default path for kwauth:
Windows:
%APPDATA%\.klocwork\ltoken
Unix:
~/.klocwork/ltoken
Mac:
~/.klocwork/ltoken
Klocwork Static Code Analysis Web API Reference
to access Web API send a POST request to http://sample.klocwork.com/review/api with the following parameters:
user* Klocwork user name
ltoken kwauth login token
action* action name
builds
: retrieve the list of builds for a project.example:
curl --data "action=builds&user=myself&project=project_name" http://sample.klocwork.com/review/api
project* : project name
username : username
list all projects
list builds info from project
ltoek
is got from${KLOCWORK_LTOKEN}
filereference:
api additional header :
-H "Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
[!NOTE🏷️references:]
search
retrieve the list of detected issues.
example:
curl --data "action=search&user=myself&project=my_project&query=file:MyFile.c" http://sample.klocwork.com/review/api
project* : project name
query : search query, such as narrowing by file (for example, 'file:MyFile.c')
view : view name
limit : search result limit
summary : include summary record to output stream
Searching in Klocwork Static Code Analysis: Searching in Klocwork Static Code Analysis
NOTE: You can only search by one build at a time. Other acceptable syntax:
build:'123' - searches for build which contains substring '123'
build:+123 - searches for build with name 123
build:+'123string' - searches for build with name equal to '123string'
actions
[!NOTE|label:references:]
server
ACTIONS | DATA |
---|---|
|
|
|
|
|
|
|
|
access
ACTIONS | DATA |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
project
ACTIONS | DATA |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
builds
ACTIONS | DATA |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
issue
ACTIONS | DATA |
---|---|
|
|
|
|
|
|
report
ACTIONS | DATA |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Last updated