- Created by Emre Toptancı, last modified on 26.02.2024
GET /rest/tis/report/1.0/api/issue/expanded
Returns a single issue expanded report as text (CSV or JSON)
Request
The request takes the following parameters you select on the screen for a report as query parameters.
Basic:
<jira_url>/rest/issue/expanded?issueKey=<issueKey>&calendar=<calendar>&outputType=<outputType>
With all parameters:
<jira_url>/rest/issue?issueKey=<issueKey>&trimHistoryStartDate=<trimHistoryStartDate>&trimHistoryEndDate=<trimHistoryEndDate>&calendar=<calendar>&dayLength=<dayLength>&viewFormat=<viewFormat>&outputType=<outputType>
Parameters
Parameter | Description | Required | Value Samples |
---|---|---|---|
issueKey | Key of the issue that report will be generated for. | Yes | ABC-1 |
outputType | The output format of the report. Possible options are:
If not provided, "json" will be used. |
| |
trimHistoryStartDate | The start date of history trim for issues. When provided, only activities in each issue's history after the given date will be processed for the report. Must be provided in "yyyy-MM-dd" or "yyyy-MM-dd hh:mm" format. If time parameter is not provided, default time "00:00" will be used See Date Range | 2017-07-01 00:00 | |
trimHistoryEndDate | The end date of history trim for issues. When provided, only activities in each issue's history before the given date will be processed for the report. Must be provided in "yyyy-MM-dd" or "yyyy-MM-dd hh:mm" format. If time parameter is not provided, default time "00:00" will be used See Date Range | 2017-08-31 23:59 | |
calendar | The calendar that report durations will be calculated based on. Possible options are:
Tip: You can get the IDs of calendars using the Calendars endpoint, explained at the end of this page | Yes |
|
dayLength |
|
| |
viewFormat | The format of duration data in the report. Possible options are:
If not provided, "minutes" will be used. |
| |
emptyValueToken | The token to use for empty values in the report (for example when an issue has never visited a status) Selecting a custom token might make it easier for the requesting system to process the data. Possible options are:
|
|
Examples
https://192.168.0.1/rest/tis/report/1.0/api//issue?issueKey=XYZ-34&calendar=normalHours https://192.168.0.1/rest/tis/report/1.0/api/issue?issueKey=ABC-3&calendar=normalHours&dayLength=24HourDays&viewFormat=minutes&outputType=csv https://192.168.0.1/rest/tis/report/1.0/api/issue?issueKey=QWERTY-45&trimHistoryStartDate=2017-09-01 00:00&trimHistoryEndDate=2017-10-31 00:00&calendar=1&dayLength=businessDays&viewFormat=minutes&outputType=csv
Responses
Success
HTTP 200
Returns a single issue report as text (CSV or JSON)
{ "dateTimeFormat": "dd/MMM/yy h:mm a", "dateFormat": "dd/MMM/yy", "timeZone": "Europe/Istanbul", "locale": "en-US", "viewFormat": "hours", "isComposite": false, "columnsBy": "Status Duration Expanded", "calendar": { "id": null, "name": "normalHours", "monday": true, "tuesday": true, "wednesday": true, "thursday": true, "friday": true, "saturday": true, "sunday": true, "timeZone": "UTC", "holidayList": [], "holidaysSuccessfullyLoaded": true, "startTime": "00:00", "endTime": "00:00", "holidays": {}, "isDefault": null }, "dayLength": "24HourDays", "query": " issuekey = 'htp-2'", "reportDate": "08/Aug/22 1:34 PM", "version": "2.4.0.692", "includedStatuses": [ { "id": "5", "name": "Resolved", "statusCategory": { "id": "3", "name": "Done", "key": "done", "colorName": "green" }, "scope": null, "deleted": false }, { "id": "6", "name": "Closed", "statusCategory": { "id": "3", "name": "Done", "key": "done", "colorName": "green" }, "scope": null, "deleted": false } ], "excludedStatuses": [], "deletedStatuses": [], "isAggregationType": false, "isOverall": false, "isAverage": false, "isSum": false, "isMedian": false, "isStddev": false, "drawAllChart": true, "table": { "header": { "headerColumns": [ { "id": "issuekey", "value": "Key" }, { "id": "summary", "value": "Summary" } ], "groupByColumns": [], "fieldColumns": [], "valueColumns": [ { "id": "5", "value": "Resolved", "isConsolidated": false }, { "id": "6", "value": "Closed", "isConsolidated": false } ] }, "body": { "rows": [ { "headerColumns": [ { "id": "issuekey", "value": "HTP-2" }, { "id": "summary", "value": "Issue with 1 history" } ], "groupByColumns": [], "fieldColumns": [], "expanded": { "stats": { "visitCounts": [ { "statusId": "5", "value": 1 }, { "statusId": "6", "value": 1 } ], "firstValues": [ { "statusId": "5", "value": 180000 }, { "statusId": "6", "value": 82085633949 } ], "lastValues": [ { "statusId": "5", "value": 180000 }, { "statusId": "6", "value": 82085633949 } ], "minValues": [ { "statusId": "5", "value": 180000 }, { "statusId": "6", "value": 82085633949 } ], "maxValues": [ { "statusId": "5", "value": 180000 }, { "statusId": "6", "value": 82085633949 } ], "averageValues": [ { "statusId": "5", "value": 180000 }, { "statusId": "6", "value": 82085633949 } ], "totalValues": [ { "statusId": "5", "value": 180000 }, { "statusId": "6", "value": 82085633949 } ], "uniqueDates": [ { "uniqueDate": "01/Jan/20 11:58 AM", "statusId": "5", "rawDate": 1577869080000 }, { "uniqueDate": "01/Jan/20 12:01 PM", "statusId": "6", "rawDate": 1577869260000 } ] }, "rows": [ { "uniqueDate": "01/Jan/20 11:58 AM", "statusId": "5", "value": 180000 }, { "uniqueDate": "01/Jan/20 12:01 PM", "statusId": "6", "value": 82085633949 } ] } } ] } } }
"Date","Transitioned to","Resolved","Closed" "01/Jan/20 11:58 AM","Resolved","0.05","-" "01/Jan/20 12:01 PM","Closed","-","22801.5766013889"
Invalid Parameter
HTTP 400
When one or more of the required parameters are missing or one or more of the supplied parameter values are invalid.
messages array contains the error messages for invalid parameters.
{ "status": 400, "message": "Invalid report parameters", "messages": [ "ERROR: Invalid issuekey value: 'abc'", "ERROR: Invalid outputType value: 'xls'. Possible values are 'csv' and 'json'" ], "pluginVersion": "1.18.0.1", "time": "2020-05-22 06:31:15" }
- No labels