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

ItemDescription
Command typeDriver query
Required permissionLogin required
License usageN/A
Parallel executionNot supported
Distributed executionNot supported

Syntax

sonar-tickets [duration=INT{s|m|h|d|mon}] [from=STR] [to=STR]

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), or mon (month) units.
from=STR
Start time of the query range. Specify in yyyyMMddHHmmss format. Trailing digits can be omitted and are filled with zeros.
to=STR
End time of the query range. Specify in yyyyMMddHHmmss format. Trailing digits can be omitted and are filled with zeros.

Output fields

FieldTypeDescription
idlongTicket ID
prioritystringPriority. LOW, MEDIUM, HIGH
guidstringTicket GUID
titlestringTitle
statusstringStatus. NEW, ASSIGNED, IN_PROGRESS, SUBMITTED, APPROVED, REJECTED, CLOSED
attackbooleanWhether the detection is a true positive
incidentbooleanWhether an incident occurred
countintegerDuplicate suppression count
repo_namestringTicket repository name
site_namestringSite name
owner_namestringCreator name. null if system-generated.
formatstringTicket format. JSON, MARKDOWN, PLAIN
assigneesarrayList of assignees
approversarrayList of approvers
tagsstringTag list, separated by newlines (\n)
createdtimestampCreation time
updatedtimestampLast update time
closedtimestampCompletion time
x_loginstringLogin name of a deleted account
x_userstringName of a deleted user
x_deptstringName of a deleted department
x_sitestringName of a deleted site
repo_guidstringTicket repository GUID
site_guidstringSite GUID
owner_guidstringCreator GUID

Error codes

Parse errors
Error codeMessageDescription
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

  1. Retrieve all tickets

    sonar-tickets
    

    Retrieves the list of all tickets accessible to the current user.

  2. Retrieve tickets from the past day

    sonar-tickets duration=1d
    

    Retrieves the list of tickets created within the past 24 hours.

  3. Retrieve tickets within a specified time range

    sonar-tickets from=20260301 to=20260401
    

    Retrieves the list of tickets created from March 1 to April 1, 2026.

  4. Filter unresolved tickets

    sonar-tickets duration=7d
    | search status == "NEW" or status == "ASSIGNED"
    | sort created asc
    

    Retrieves unresolved (NEW or ASSIGNED) tickets created in the past 7 days, sorted by creation time in ascending order.