com.webos.service.bugreport
API Summary
Provides methods for reporting bug in Jira system.
Overview of the API
This reporting tool is deamon type service to register a bug in a Jira system. The major features are:
- Set / Get Jira configuration
- Create the JIRA issue of bug type with the log files, screenshot images and environment information.
Additional Remarks
- This reporting service is developed for internal service only.
- The bug reporting service is used by bugreport app.
Methods
getConfig
Description
Gets Jira configuration and files to be attached to the Jira ticket.
Note: This method is intended to be called by the bugreport app. If you want to use this in other modules, contact the API owner.
Parameters
None
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
errorCode | Optional | Number | The error code when returnValue is false. |
errorText | Optional | String | The error text when returnValue is false |
account | Optional | Object: account | Account info to login to Jira |
screenshots | Optional | String | List of screenshot files to be attached when creating a Jira ticket. The following files are included.
|
Example
Example : Get Jira configurations
# luna-send -n 1 -f luna://com.webos.service.bugreport/getConfig '{}'
Response:
{
"screenshots": [
"/tmp/screenshots/screenshot_20211105110001.jpg"
],
"account": {
"password": "bGdlITIzNDVe",
"username": "webosreporter"
},
"returnValue": true
}
setConfig
Description
Sets the Jira configurations.
Currently, the only configurations supported are:
- username
- password
Note:
- These values are persisted across reboots until another value is set.
- This method is intended to be called by the bugreport app. If you want to use this in other modules, contact the API owner.
Parameters
Name | Required | Type | Description |
---|---|---|---|
account | Optional | Object: account | Account info to login to Jira |
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
errorCode | Optional | Number | The error code when returnValue is false. |
errorText | Optional | String | The error text when returnValue is false |
Example
Example : Set the username and password
# luna-send -n 1 -f luna://com.webos.service.bugreport/setConfig '{"account": {"username": "webosreporter", "password": "bGdlITIzNDVe"}}'
Response:
{
"returnValue": true
}
Example : Clear the username and password
# luna-send -n 1 -f luna://com.webos.service.bugreport/setConfig '{"account": {"username": "", "password": ""}}'
Response:
{
"returnValue": true
}
createBug
Description
Creates a bug ticket on Jira with the given data.
Note: This method is intended to be called by the bugreport app. If you want to use this in other modules, contact the API owner.
Parameters
Name | Required | Type | Description |
---|---|---|---|
summary | Required | String | Summary of Jira ticket. |
description | Optional | String | Description of the Jira ticket. |
priority | Optional | String | Priority of Jira ticket. It depends on the Jira system. For example, the following values are used in the WRN project of clm.lge.com.
|
reproducibility | Optional | String | Reproducibility of Jira ticket. It depends on the Jira system. For example, the following values are used in the WRN project of clm.lge.com.
|
screenshots | Optional | String array | Screenshot files to attach to the Jira ticket. These files are deleted upon successful ticket creation. |
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code when returnValue is false. |
errorText | Optional | String | The error text when returnValue is false |
key | Optional | String | The key of the created issue. |
Example
Example : Create a bug
# luna-send -n 1 -f luna://com.webos.service.bugreport/createBug '{"summary": "test", "priority": "P5", "reproducibility": "Always (100%)"}'
Response:
{
"key": "WRN-XXXXX",
"returnValue": true
}
Objects
account
Account info to log in to Jira.
Name | Required | Type | Description |
---|---|---|---|
username | Required | String | The username (AD username) that has permission to access Jira. |
password | Required | String | The password of the user. It must be provided as base64 encoded. Note: https://www.base64encode.org/ can be used to encode the password. |
API Error Codes Reference
Error Code | Error Text | Error Description |
---|---|---|
1 | Internal error | Internal error |
2 | Deprecated method | Deprecated method |
3 | Invalid request params | Invalid request params |
4 | Login failed | Login failed |