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

issueKeyKey of the issue that report will be generated for.YesABC-1
outputType

The output format of the report. Possible options are:

  • CSV = Returns a CSV (comma separated value) that contains the report data as text.
  • JSON = Returns a JSON (JavaScript Object Notation) that contains report data 

If not provided, "json" will be used.


  • csv
  • json
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:

  • normalHour = The durations will be based on a 7/24 calendar. (default)
  • 0 = The default business calendar
  • n = ID of a custom calendar

Tip: You can get the IDs of calendars using the Calendars endpoint, explained at the end of this page

Yes
  • normalHours
  • 0
  • 1
  • 2
dayLength
  • 24HourDays = Each day will be 24 hours.
  • businessDays = Can be used for calendars other than 7/24. The durations will be based on the business calendar defined in admin settings. Length of each day will also be based on business hours defined in admin settings.

  • 24HourDays
  • businessDays
viewFormat

The format of duration data in the report. Possible options are:

  • humanReadable = The values will be shown like "44 d 5 h 2 m 35 s"
  • ddhhmmss = The values will be shown like "44:05:02:35"
  • hhmmss = The values will be shown like "1061:02:35"
  • days = The values will be shown in days, as a single decimal value like "44.61"
  • hours = The values will be shown in hours, as a single decimal value like "1061.04"
  • minutes = The values will be shown in minutes, as a single decimal value like "63662.59"
  • seconds = The values will be shown in seconds, like "3819755"

If not provided, "minutes" will be used.


  • humanReadable
  • ddhhmmss
  • hhmmss
  • days
  • hours
  • minutes
  • seconds
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:

  • Hyphen ("-") (Default)
  • Zero ("0")
  • Null ("null")
  • NoChar ("")
  • SingleSpace (" ")
  • NoToken ()

  • Hyphen
  • Zero
  • Null
  • NoChar
  • SingleSpace
  • NoToken

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