GET /rest/tis/report/1.0/api/list

POST /rest/tis/report/1.0/api/list


Returns a list report as text (CSV or JSON)

GET and POST methods provide the exact same functionality but POST method allows a much larger request size.

If your query parameters are too long to be used with a GET method (because you have a very long JQL or have too many statuses/fields selected) use POST method to access this endpoint.

If you have more than a few hundred issues, you're recommended to use file export endpoints rather than this one since getting the data as a single export file will produce much faster results, will create a much smaller load on your Jira instance, and can be implemented with less complexity.

Request

The request takes all parameters you select on the screen for a report as query parameters.

Do not let the long text scare you. Not all parameters are always required and some are required based on filterType. See the params table below.

Basic:

<jira_url>/rest/tis/report/1.0/api/list?filterType=<filterType>&(user=<user> | projectKey=<projectKey> | jqlFilterID=<jqlFilterID> | customjql=<customjql> | sprintID=<sprintID> )&columnsBy=<columnsBy>&calendar=<calendar>&startDate=<startDate>&endDate=<endDate>&dateRangeField=<dateRangeField>

With all parameters:

<jira_url>/rest/tis/report/1.0/api/list?filterType=<filterType>&(user=<user> | projectKey=<projectKey> | jqlFilterID=<jqlFilterID> | customjql=<customjql> | sprintID=<sprintID> )&columnsBy=<columnsBy>&fields=<fields>&statuses=<statuses>&groups=<groups>&includeDeletedStatuses=<includeDeletedStatuses>&startDate=<startDate>&endDate=<endDate>&dateRangeField=<dateRangeField>&trimHistoryStartDate=<trimHistoryStartDate>&trimHistoryEndDate=<trimHistoryEndDate>&calendar=<calendar>&dayLength=<dayLength>&viewFormat=<viewFormat>&outputType=<outputType>&groupByFields=<groupByFields>&pageSize=<pageSize>&startIssueIndex=<startIssueIndex>

Parameters

Parameter

Description

Required

Value Samples

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
filterType

Defines how the issues to be included in the report will be selected. Possible options are:

  • user = Report will filter out the issues assigned to the selected user
  • project = Report will filter out issues in the selected Jira project
  • jqlfilter = Report will filter out issues based on an existing JQL filter
    • The value advanced is deprecated but is still valid and will be processed as jqlfilter.
  • customjql = Report will filter out issues based on a given JQL query 
  • sprint = Report will filter out issues based on an existing sprint 
Yes
  • user
  • project
  • jqlfilter
  • customjql
  • sprint
user

If filterType is user, system expects a user name in the form user=

Only when filterType = user
  • user=admin
projectkey

If filterType is project, system expects a project key in the form projectKey=

Only when filterType = project
  • projectKey=ABC
jqlfilterID

If filterType is jqlfilter, system expects a JQL filter ID in the form jqlFilterID=

Only when filterType = jqlfilter
  • jqlFilterID=10145
customjql

If filterType is customjql, system expects a JQL Query in the form customjql=

Only when filterType = customjql
  • customjql=project=ABC
sprintID

If filterType is sprint, system expects a Sprint ID in the form sprintID=

Only when filterType = sprint
  • sprintID=2
columnsBy

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

  • statusDuration = Report will show durations spent on each status as column values
  • durationBetweenStatuses = Report will show the durations spent between two statuses as column values.
  • assigneeDuration= Report will show durations spent on each assignee as column values
  • statusDurationByAssignee = Report will show durations spent on each status on each assignee as column values
  • assigneeDurationByStatus = Report will show durations spent on each assignee on each status as column values
  • groupDuration= Report will show consolidated durations spent on members of each group as column values
  • statusDurationByGroup = Report will show durations spent on each status on each user group as column values
  • groupDurationByStatus = Report will show durations spent on each user group on each status as column values
  • anyfieldDuration = Report will show how much time each issue field held each value
  • statusCount = Report will show counts for each status
  • transitionCount = Report will show counts for each transitions between statuses
  • anyFieldCount = Report will show how many times each issue field held each value
  • firstTransitionToStatusDate = Report will show the date the issue transitioned TO each status for the FIRST time as column values
  • firstTransitionFromStatusDate = Report will show the date the issue transitioned FROM each status for the FIRST time as column values 
  • lastTransitionToStatusDate = Report will show the date the issue transitioned TO each status for the LAST time as column values
  • lastTransitionFromDate = Report will show the date the issue transitioned FROM each status for the LAST time as column values
Yes
  • statusDuration
  • durationBetweenStatuses
  • assigneeDuration
  • statusDurationByAssignee
  • assigneeDurationByStatus
  • groupDuration
  • statusDurationByGroup
  • groupDurationByStatus
  • anyfieldDuration
  • statusCount
  • transitionCount
  • anyFieldCount
  • firstTransitionFromStatusDate
  • firstTransitionToStatusDate
  • lastTransitionFromDate
  • lastTransitionToStatusDate
multiVisitBehavior

Defines the behavior of reporting individual status visits.

Only effective for Status Duration reports.

If not provided, default behavior "total" will be used.

See TiS v4.34 - Multi Visit Behavior


  • total
  • first
  • last
  • average
pageSize

The maximum number of issues in a page. (1-200)

The default is 200 and values greater than 200 or less than 0 will be processed as 200.


50
startIssueIndex

The issue index to start at.

The default value is 0.

The resultset is always paged as exact multiples of pageSizestartIssueIndex points to a page of resultset rather than an individual issue. The app WILL NOT return a page that contains pageSize number of issues and starts with the issue specified with startIssueIndex. The app WILL rather return the page in the resultset that contains pageSize number of issue and includes the issue specified with startIssueIndex. (You don't need to worry about this behavior if you always use startIssueIndex as a multiple of pageSize)


10
fields

The IDs of fields (separated by commas) on JIRA Issue that will be added to report output as columns.

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


assignee,customfield_10020,customfield_10007,description,duedate, fixVersions
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 v4.34 - Report Types

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

only when columnsBy = anyfieldDuration or anyFieldCountassignee,customfield_10020,customfield_10007,fixVersions
statuses

A JSON array listing statuses for which the durations will be included in the report.

If not provided or left empty, the report will include all statuses in selected issues' histories.

For assignee based reports, durations of unselected statuses will be excluded from durations of assignee columns.

Supports two formats: Basic and Advanced


Basic:

Basic format is a comma separated list of status ID's to be included in the report.


Advanced:

Advanced format is a JSON text that contains status definitions.

Advanced format must be employed if you want to use the Consolidated Columns feature.

Typetypeattribute of each column defines whether the column is a Standard(std) orConsolidated(cons) column. Forstandardcolumns,idis the id of the status. For consolidatedcolumns, the statuses array contains the IDs of statuses to be included in the column. For more information on status selection and column consolidation, please see TiS v4.34 - Status.


Other parameters may be included in the URL as a query parameter but statuses parameter is expected to be sent in request body encoded as "application/x-www-form-urlencoded"

Note: You can get the list of statuses and their IDs, directly from your Jira. Please check Statuses part of the documentation.


Basic

1,3,4,5,10001,10234


Advanced

[
   {
      "id":"6",
      "type":"std"
   },
   {
      "id":"2",
      "type":"std"
   },
   {
      "name":"cons. status 1",
      "type":"cons",
      "statuses":[
         "10008",
         "3",
         "10007"
      ]
   }
]
assignees

Comma-separated list of login names of users that will be included in the report.

If not provided or empty, the report will include all the assignees found in issues' histories.


  • joe.doe,dave.alvin
  • joe.doe
groups

The names of user groups (separated by commas) that will be included in Group reports.

If not provided or empty, the report will included all durations in a column named "Not a member of selected groups"


  • jira-administrators
  • jira-users, jira-administrators
dbsMetrics

The list of metrics that will be showed as columns in Duration Between Statuses reports. The parameter must be provided as JSON text.

The maximum number of metrics allowed is 10.

Each metric will report the duration between two statuses and consists of the following parameters:


name: (required)

Name of the metric. Can only include alphanumeric characters and space.


from:

The starting status that the duration will be calculated from. Its format should be a JSON object contains id and order (first/last) of the status.

Not defining this parameter means that the starting point will be "issue creation".


to: (required)

The target status that the duration will be calculated until. Its format should be a JSON object contains id and order (first/last) of the status.


excluded:

List of status ids that will be excluded from the calculations. Time spent on these statuses will not be added to total time.


See TiS v4.34 - Report Types


Note: You can get the list of statuses and their IDs, directly from your Jira. Please check Statuses part of the documentation.


[
   {
      "name":"Resolution time",
      "to":{
         "id":"5",
         "order":"first"
      }
   },
   {
      "name":"Development time",
      "from":{
         "id":"1",
         "order":"first"
      },
      "to":{
         "id":"6",
         "order":"last"
      },
      "excluded":[
         "10008",
         "10003"
      ]
   }
]
includeDeletedStatuses

Sets whether included statuses in issues' histories will be included in the report or not:

Possible options are:

  • true
  • false

If not provided, "true" is assumed.


  • true
  • false
startDate

The start date of report filter.

Only issues created/resolved/updated (based on dateRangeField value) after the given date will be included in 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 TiS v4.34 - Date Range


2017-07-01 00:00
endDate

The end date of report filter.

Only issues created/resolved/updated (based on dateRangeField value) before the given date will be included in 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 TiS v4.34 - Date Range


2017-08-31 23:59
dateRangeField

The system date field of the Jira issue that startDate and endDate parameters will be based on. Possible options are:

  • created = The startDate and endDate parameters will be used to filter issues based on issue create date.
  • updated = The startDate and endDate parameters will be used to filter issues based on issue last update date.
  • resolved = The startDate and endDate parameters will be used to filter issues based on issue resolution date.
Only when either startDate or endDate is provided
  • created
  • updated
  • resolved
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 TiS v4.34 - 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 TiS v4.34 - 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

Required for Duration reports
  • 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.
Required for Duration reports with non-24/7 calendar
  • 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"
  • milliseconds = The values will be shown in milliseconds like "5235266"

If not provided, "minutes" will be used.


  • humanReadable
  • ddhhmmss
  • hhmmss
  • days
  • hours
  • minutes
  • seconds
  • milliseconds
dateFormat

The string format to use for displaying values of fields of type Date

If empty or missing, the date format defined in TiS v4.34 - Format Settings page is used. If Format Settings date format is also empty, the default date format set for Jira is used.

You can refer to the Java Documentation for more information about Date Format Strings.


  • yyyy-MM-dd
  • dd/MM/yy
  • dd/MMM/yyyy
dateTimeFormat

The string format to use for displaying values of fields of type DateTime

If empty or missing, the datetime format defined in TiS v4.34 - Format Settings page is used. If Format Settings datetime format is also empty, the default datetime format set for Jira is used.

You can refer to the Java Documentation for more information about Date Format Strings.


  • yyyy-MM-dd hh:mm a
  • dd/MM/yy HH:mm
  • dd/MMM/yyyy HH:mm:ss
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/list?filterType=user&user=admin&columnsBy=statusDuration&startDate=2017-09-01 00:00&endDate=2017-10-31 00:00&dateRangeField=created&calendar=normalHours&viewFormat=minutes&pageSize=20

https://192.168.0.1/rest/tis/report/1.0/api/list?filterType=user&user=admin&columnsBy=statusDuration&fields=assignee&statuses=3,10000,10001&includeDeletedStatuses=true&startDate=2017-09-01 00:00&endDate=2017-10-31 00:00&dateRangeField=created&calendar=normalHours&dayLength=24HourDays&viewFormat=minutes&outputType=csv&groupByFields=assignee,date:year:resolutiondate,date:week:resolutiondate&startIssueIndex=75

https://192.168.0.1/rest/tis/report/1.0/api/list?filterType=project&projectKey=PMP&columnsBy=statusDuration&startDate=2017-09-01 00:00&endDate=2017-10-31 00:00 &dateRangeField=created&calendar=0&dayLength=24HourDays&viewFormat=minutes&outputType=json&groupByFields=assignee,date:year:resolutiondate,date:week:resolutiondate&pageSize=90&startIssueIndex=5

https://192.168.0.1/rest/tis/report/1.0/api/list?filterType=jqlfilter&jqlFilterID=10004&columnsBy=statusDuration&startDate=2017-09-01 00:00&endDate=2017-10-31 00:00&dateRangeField=created&calendar=1&dayLength=businessDays&viewFormat=minutes&outputType=csv

https://192.168.0.1/rest/tis/report/1.0/api/list?filterType=customjql&customjql=project=ABC&columnsBy=statusDuration&startDate=2017-09-01 00:00&endDate=2017-10-31 00:00&dateRangeField=created&calendar=1&dayLength=businessDays&viewFormat=minutes

https://192.168.0.1/rest/tis/report/1.0/api/list?filterType=sprint&sprintID=2&columnsBy=statusDuration&startDate=2017-09-01 00:00&endDate=2017-10-31 00:00&dateRangeField=created&calendar=1&dayLength=businessDays&viewFormat=minutes&outputType=json&pageSize=5

Responses

Success

HTTP 200

Returns a list report as text (CSV or JSON)


{
    "startIssueIndex": 0,
    "endIssueIndex": 4,
    "pageSize": 5,
    "total": 23,
    "dateTimeFormat": "yyyy-MM-dd hh:mm a",
    "dateFormat": "yyyy-MM-dd",
	"timeZone": "Asia/Istanbul",
    "locale": "en-US",
    "viewFormat": "minutes",
	"version": "4.11.0.1",
    "isComposite": false,
    "columnsBy": "Status Duration",
    "query": "project = SSPWSD AND created >= 1970-09-01 AND created <= 2020-12-31",
    "reportDate": "2020-08-21 03:41 PM",
    "includedStatuses": [],
    "excludedStatuses": [
        {
            "id": "10001",
            "name": "Done",
            "deleted": false
        }
    ],
    "deletedStatuses": [],
    "isAggregationType": false,
    "isOverall": false,
    "isAverage": false,
    "isSum": false,
    "table": {
        "header": {
            "headerColumns": [
                {
                    "id": "issuekey",
                    "value": "Key"
                },
                {
                    "id": "summary",
                    "value": "Summary"
                }
            ],
            "groupByColumns": [],
            "fieldColumns": [],
            "valueColumns": [
                {
                    "id": "A",
                    "value": "Consolidated Column",
                    "containsStatuses": [
                        "3"
                    ],
                    "isConsolidated": true,
                    "hint": "Contains In Progress"
                },
                {
                    "id": "3",
                    "value": "In Progress",
                    "isConsolidated": false
                },
                {
                    "id": "10000",
                    "value": "To Do",
                    "isConsolidated": false
                }
            ]
        },
        "body": {
            "rows": [
                {
                    "headerColumns": [
                        {
                            "id": "issuekey",
                            "value": "SSPWSD-23"
                        },
                        {
                            "id": "summary",
                            "value": "As a user, I'd like a historical story to show in reports"
                        }
                    ],
                    "groupByColumns": [],
                    "fieldColumns": [],
                    "valueColumns": [
                        {
                            "id": "A",
                            "value": "-"
                        },
                        {
                            "id": "3",
                            "value": "-"
                        },
                        {
                            "id": "10000",
                            "value": "4398.8132666667",
							"raw": "263928796"
                        }
                    ],
                    "currentState": []
                },
                {
                    "headerColumns": [
                        {
                            "id": "issuekey",
                            "value": "SSPWSD-22"
                        },
                        {
                            "id": "summary",
                            "value": "As a user, I'd like a historical story to show in reports"
                        }
                    ],
                    "groupByColumns": [],
                    "fieldColumns": [],
                    "valueColumns": [
                        {
                            "id": "A",
                            "value": "-"
                        },
                        {
                            "id": "3",
                            "value": "-"
                        },
                        {
                            "id": "10000",
                            "value": "3780.0",
							"raw": "226800000"
                        }
                    ],
                    "currentState": []
                },
                {
                    "headerColumns": [
                        {
                            "id": "issuekey",
                            "value": "SSPWSD-21"
                        },
                        {
                            "id": "summary",
                            "value": "As a user, I'd like a historical story to show in reports"
                        }
                    ],
                    "groupByColumns": [],
                    "fieldColumns": [],
                    "valueColumns": [
                        {
                            "id": "A",
                            "value": "-"
                        },
                        {
                            "id": "3",
                            "value": "-"
                        },
                        {
                            "id": "10000",
                            "value": "3200.8131666667",
							"raw": "192048790"
                        }
                    ],
                    "currentState": []
                },
                {
                    "headerColumns": [
                        {
                            "id": "issuekey",
                            "value": "SSPWSD-20"
                        },
                        {
                            "id": "summary",
                            "value": "As a user, I'd like a historical story to show in reports"
                        }
                    ],
                    "groupByColumns": [],
                    "fieldColumns": [],
                    "valueColumns": [
                        {
                            "id": "A",
                            "value": "-"
                        },
                        {
                            "id": "3",
                            "value": "-"
                        },
                        {
                            "id": "10000",
                            "value": "1722.8131",
							"raw": "103368786"
                        }
                    ],
                    "currentState": []
                },
                {
                    "headerColumns": [
                        {
                            "id": "issuekey",
                            "value": "SSPWSD-19"
                        },
                        {
                            "id": "summary",
                            "value": "As a user, I'd like a historical story to show in reports"
                        }
                    ],
                    "groupByColumns": [],
                    "fieldColumns": [],
                    "valueColumns": [
                        {
                            "id": "A",
                            "value": "-"
                        },
                        {
                            "id": "3",
                            "value": "-"
                        },
                        {
                            "id": "10000",
                            "value": "1080.0",
							"raw": "64800000"
                        }
                    ],
                    "currentState": []
                }
            ]
        }
    },
    "calendar": {
        "id": "0",
        "name": "Default Calendar Settings",
        "monday": true,
        "tuesday": true,
        "wednesday": true,
        "thursday": true,
        "friday": true,
        "saturday": false,
        "sunday": false,
        "startHour": 8,
        "startMinute": 0,
        "endHour": 17,
        "endMinute": 0,
        "holidaysText": null,
        "timeZone": "Asia/Istanbul",
        "holidaysWithDesc": [],
        "holidaysWithoutDesc": [],
        "holidayMap": {},
        "default": true,
        "startTime": "08:00",
        "endTime": "17:00"
    }
}
"Key","Summary","Consolidated Column","In Progress","To Do"
"SSPWSD-23","As a user, I'd like a historical story to show in reports","-","-","4398.8132666667"
"SSPWSD-22","As a user, I'd like a historical story to show in reports","-","-","3780.0"
"SSPWSD-21","As a user, I'd like a historical story to show in reports","-","-","3200.8131666667"
"SSPWSD-20","As a user, I'd like a historical story to show in reports","-","-","1722.8131"
"SSPWSD-19","As a user, I'd like a historical story to show in reports","-","-","1080.0"

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.

{
    "statusCode": 400,
    "messages": [
        "ERROR: Invalid outputType value: 'txt'. Possible values are 'csv' and 'json'",
        "ERROR: calendar parameter is required. Possible values are normalHours or ID of a custom defined calendar"
    ],
    "pluginVersion": "4.9.0.1",
    "time": "2020-09-04 15:21:37"
}
  • No labels