Skip to main content
Skip table of contents

Single Issue Expanded

Overview

GET /rest/issue/expanded

This endpoint is used to retrieve a single issue expanded report as text (CSV or JSON).

Required Permissions

  • All Users with Timepiece access can retrieve the details of the issue with the specified key.

Request

Basic Request

NONE
GET <service_url>/rest/issue/expanded?issueKey=<issueKey>&calendar=<calendar>&outputType=<outputType>

Full Request

NONE
GET <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

columnsBy

Defines the column structure of the report. Possible options are:

  • statusDurationExpanded: Report will show how much time the issue spent in each status.

  • anyFieldDurationExpanded: Report will show how much time the issue spent in each field.

statusDurationExpanded is the default value and it will be used if this parameter is not provided.

No

  • statusDurationExpanded

  • anyFieldDurationExpanded

issueKey

Key of the issue that report will be generated for.

Yes

ABC-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 

  • JSON Simplified = Return a simplified and easy-to-use version of the report data as JSON. 

If not provided, "json" will be used.

  • csv

  • json

  • jsonSimplified

historyFields

The IDs of fields (separated by commas) on JIRA Issues that will be used for Any Field reports.

For details about Any Field report types please see: TiS Cloud - Report Types

Both system and custom fields are supported. For more information see TiS Cloud - Field Names for REST Reports

only when columnsBy = anyfielddurationexpanded

assignee, customfield_10020, customfield_10007, description, duedate, fixVersions

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 (vNewSearchAPI) 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 (vNewSearchAPI) Date Range

2017-08-31 23:59

calendar

The calendar that report durations will be calculated based on. Possible options are:

  • normalHours = The durations will be based on a 7/24 calendar. (default)

  • n = ID of a custom calendar

Tip: You can get the IDs of calendars using the Calendars endpoint.

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

csvFieldSeparator

The character to separate CSV values.

Possible options are:

  • "comma" (,) (Default)

  • "semicolon" (;) 

  • comma

  • semicolon

decimalSeparator

The character to use as a decimal separator for decimal values in CSV format.

Possible options are:

  • "dot" (.) (Default)

  • "comma" (,)

  • dot

  • comma

valueQuotationMark

The character to quote values in CSV format.

Possible options are:

  • "doublequote" (")

  • "singlequote" (')

  • "none" ()

  • doublequote

  • singlequote

  • no

Example Requests

NONE
GET https://tis.obss.io/rest/issue/expanded?issueKey=XYZ-34&amp;calendar=normalHours
 
GET https://tis.obss.io/rest/issue/expanded?issueKey=ABC-3&amp;calendar=normalHours&amp;dayLength=24HourDays&amp;viewFormat=minutes&amp;outputType=csv
 
GET https://tis.obss.io/rest/issue/expanded?issueKey=QWERTY-45&amp;trimHistoryStartDate=2017-09-01 00:00&trimHistoryEndDate=2017-10-31 00:00&calendar=1&dayLength=businessDays&viewFormat=minutes&outputType=csv

Response

Response Structure

The response will be in the format specified by the outputType parameter, either CSV or JSON, containing the requested issue expanded report data.

Example Response Body (JSON)

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
                            }
                        ]
                    }
                }
            ]
        }
    }
}

Example Response Body (CSV)

CSV
"Date","Transitioned to","Resolved","Closed"
"01/Jan/20 11:58 AM","Resolved","0.05","-"
"01/Jan/20 12:01 PM","Closed","-","22801.5766013889"

Response Codes

  • 200 OK: Returns a single issue expanded report as text (CSV or JSON).

  • 400 Bad Request: When one or more of the required parameters are missing or one or more of the supplied parameter values are invalid.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.