- Created by Emre Toptancı, last modified by Ömer Dayı on 28.08.2024
GET /rest/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:
<service_url>/rest/issue/expanded?issueKey=<issueKey>&calendar=<calendar>&outputType=<outputType>
With all parameters:
<service_url>/rest/issue/expanded?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 | 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 | 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. | 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://tis.obss.io/rest/issue/expanded?issueKey=XYZ-34&calendar=normalHours https://tis.obss.io/rest/issue/expanded?issueKey=ABC-3&calendar=normalHours&dayLength=24HourDays&viewFormat=minutes&outputType=csv https://tis.obss.io/rest/issue/expanded?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": { "allWorkingDaysHaveEqualLengths": true, "calendarSuccessfullyLoaded": true, "clientKey": null, "dailyWorkingHours": 24.0, "holidays": [], "id": null, "is7x24Calendar": true, "isDefault": null, "name": "normalHours", "timeZone": "UTC", "workingTimes": [ { "end": 86400000, "start": 0, "weekday": "SUNDAY" }, { "end": 86400000, "start": 0, "weekday": "MONDAY" }, { "end": 86400000, "start": 0, "weekday": "TUESDAY" }, { "end": 86400000, "start": 0, "weekday": "WEDNESDAY" }, { "end": 86400000, "start": 0, "weekday": "THURSDAY" }, { "end": 86400000, "start": 0, "weekday": "FRIDAY" }, { "end": 86400000, "start": 0, "weekday": "SATURDAY" } ] }, "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