V3_CountsAndDuration_GetByLine (Get)
- Last UpdatedNov 06, 2025
- 3 minute read
| Get | V3_CountsAndDuration_GetByLine |
Resource Path:/api/v3/countsAndDuration/line
| Name | Description | Data Type |
|---|---|---|
| lineId | Required. The line ID. | integer |
| graphType | Required. The ID of the graph type to use. 0 = Utilization states (the default). The graph shows either the counts or the duration of the utilization states for the time period specified by the filterType parameter. 1 = Utilization reason groups. The graph shows either the counts or the duration of the reason groups for the time period specified by the filterType parameter. 2 = Utilization reasons. The graph shows either the counts or the duration of the reasons for the time period specified by the filterType parameter. | integer |
| utilStateCode | The code for the utilization state by which to filter the utilization reasons. Used only if the the graphType parameter is 2 (utilization reasons). If null, the utilization reasons are not filtered. | integer |
| reasGrpId | The ID of the utilization reason group by which to filter the utilization reasons. Used only if the graphType parameter is 2 (utilization reasons). If null, the utilization reasons are not filtered. | integer |
| filterType | The enumeration of the time period filter type to use. 0 = Current hour 1 = Last n hours, where n is the number of hours specified by the filterDuration parameter 2 = Current shift (the default) 3 = Previous shift 4 = Current day 5 = Yesterday 6 = Current week 7 = Previous week 8 = Current month 9 = Previous month | integer |
| filterDuration | If the filter type is set to 1, last n hours, this is the value for n (that is, the number of hours). If no value is provided, the default value of 1 hour is used. | integer |
| Name | Description |
|---|---|
| trans_id | Used to supply the ID of the transaction if the call is taking part in a transaction. |
| max_rows | Used to supply the maximum number of rows that will be returned by the get. |
The response body is of type object.
Returns a JSON array that contains information on counts and durations for the specified line based on the graph type selected and filter values provided. If no matching counts and durations are found, an empty array is returned.
The following properties are returned.
Id (integer)
Depending on what graph type was selected, the code for the utilization state, utilization reason, or utilization reason group.
Name (string)
The description of the utilization state, utilization reason, or utilization reason group.
Duration (integer)
The sum of durations, in seconds, for all events with this utilization state, utilization reason, or utilization reason group that occurred during the specified time period.
Count (integer)
The number of events that have this utilization state, utilization reason, or utilization reason group during the specified time period.
Color (string)
The name or hex value of the HTML color for the background color in the user interface for this utilization state or utilization reason. This column is not returned if graphType is 1 (utilization reason groups).
Active (Boolean)
An indication whether one of the events with this utilization state, utilization reason, or utilization reason group is the current event for the line.
The returned counts and duration information can be filtered by a time period. If the utilization reason graph type is selected, the utilization reasons can also be filtered by utilization state and utilization reason group.
Because this endpoint queries historical tables and supports custom time periods, use caution when querying large time periods (greater than a day), as system performance can be adversely affected.