sonar-tickets
Retrieves a list of tickets created within the specified time range. If no time range is specified, all tickets are retrieved.
Command properties
| Item | Description |
|---|---|
| Command type | Driver query |
| Required permission | Login required |
| License usage | N/A |
| Parallel execution | Not supported |
| Distributed execution | Not supported |
Syntax
Options
duration=INT{s|m|h|d|mon}- Limits the query to tickets created within a time range from the current time. Specify using
s(second),m(minute),h(hour),d(day), ormon(month) units. from=STR- Start time of the query range. Specify in
yyyyMMddHHmmssformat. Trailing digits can be omitted and are filled with zeros. to=STR- End time of the query range. Specify in
yyyyMMddHHmmssformat. Trailing digits can be omitted and are filled with zeros.
Output fields
| Field | Type | Description |
|---|---|---|
id | long | Ticket ID |
priority | string | Priority. LOW, MEDIUM, HIGH |
guid | string | Ticket GUID |
title | string | Title |
status | string | Status. NEW, ASSIGNED, IN_PROGRESS, SUBMITTED, APPROVED, REJECTED, CLOSED |
attack | boolean | Whether the detection is a true positive |
incident | boolean | Whether an incident occurred |
count | integer | Duplicate suppression count |
repo_name | string | Ticket repository name |
site_name | string | Site name |
owner_name | string | Creator name. null if system-generated. |
format | string | Ticket format. JSON, MARKDOWN, PLAIN |
assignees | array | List of assignees |
approvers | array | List of approvers |
tags | string | Tag list, separated by newlines (\n) |
created | timestamp | Creation time |
updated | timestamp | Last update time |
closed | timestamp | Completion time |
x_login | string | Login name of a deleted account |
x_user | string | Name of a deleted user |
x_dept | string | Name of a deleted department |
x_site | string | Name of a deleted site |
repo_guid | string | Ticket repository GUID |
site_guid | string | Site GUID |
owner_guid | string | Creator GUID |
Error codes
Parse errors
| Error code | Message | Description |
|---|---|---|
| 300101 | 유효하지 않은 세션입니다. | The session is invalid or the user cannot be found. |
Runtime errors
N/A
Description
The sonar-tickets command retrieves the list of tickets accessible under the current user's permissions. You can limit the time range using the duration or from/to options. The time range filters tickets based on their creation time (created).
If both duration and from options are specified, the from option takes precedence.
The tag list is serialized as a string separated by newline characters (\n).
Examples
-
Retrieve all tickets
sonar-ticketsRetrieves the list of all tickets accessible to the current user.
-
Retrieve tickets from the past day
sonar-tickets duration=1dRetrieves the list of tickets created within the past 24 hours.
-
Retrieve tickets within a specified time range
sonar-tickets from=20260301 to=20260401Retrieves the list of tickets created from March 1 to April 1, 2026.
-
Filter unresolved tickets
sonar-tickets duration=7d | search status == "NEW" or status == "ASSIGNED" | sort created ascRetrieves unresolved (
NEWorASSIGNED) tickets created in the past 7 days, sorted by creation time in ascending order.