> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leen.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Tickets (Passthrough)

> Search tickets using vendor-native query syntax and pagination. **Jira**: use `jql` (JQL string) and `cursor` (keyset pagination). **ServiceNow**: use `table` (`incident` or `problem`), `query` (sysparm_query), and `offset` (offset pagination).



## OpenAPI

````yaml get /itsm/passthrough/tickets/search
openapi: 3.1.0
info:
  title: Leen Security API
  version: 0.0.1
servers:
  - description: Production API (US)
    url: https://api.leen.dev/v1
  - description: Production API (EU)
    url: https://api.eu-c1.leen.dev/v1
  - description: Production API (APAC)
    url: https://api.ap-se2.leen.dev/v1
security: []
paths:
  /itsm/passthrough/tickets/search:
    get:
      tags:
        - ITSM
        - Passthrough
      summary: Search Tickets (Passthrough)
      description: >-
        Search tickets using vendor-native query syntax and pagination.
        **Jira**: use `jql` (JQL string) and `cursor` (keyset pagination).
        **ServiceNow**: use `table` (`incident` or `problem`), `query`
        (sysparm_query), and `offset` (offset pagination).
      operationId: passthrough_search_tickets
      parameters:
        - description: '**Jira only.** JQL filter string, max 5000 chars.'
          in: query
          name: jql
          required: false
          schema:
            anyOf:
              - maxLength: 5000
                type: string
              - type: 'null'
            description: '**Jira only.** JQL filter string, max 5000 chars.'
            title: Jql
        - description: >-
            **Jira only.** Opaque pagination token from `next_cursor` in a
            previous response.
          in: query
          name: cursor
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              **Jira only.** Opaque pagination token from `next_cursor` in a
              previous response.
            title: Cursor
        - description: '**ServiceNow only.** Table to query.'
          in: query
          name: table
          required: false
          schema:
            default: incident
            description: '**ServiceNow only.** Table to query.'
            enum:
              - incident
              - problem
            title: Table
            type: string
        - description: '**ServiceNow only.** sysparm_query filter string.'
          in: query
          name: query
          required: false
          schema:
            anyOf:
              - maxLength: 5000
                type: string
              - type: 'null'
            description: '**ServiceNow only.** sysparm_query filter string.'
            title: Query
        - description: Page size.
          in: query
          name: limit
          required: false
          schema:
            default: 50
            description: Page size.
            maximum: 100
            minimum: 1
            title: Limit
            type: integer
        - description: '**ServiceNow only.** Pagination offset.'
          in: query
          name: offset
          required: false
          schema:
            default: 0
            description: '**ServiceNow only.** Pagination offset.'
            minimum: 0
            title: Offset
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: >-
                      #/components/schemas/KeySetPaginatedResponse_PassthroughTicket_
                  - $ref: >-
                      #/components/schemas/OffsetPaginatedResponse_PassthroughTicket_
                title: Response Passthrough Search Tickets
          description: Successful Response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Too Many Requests
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Gateway
      security:
        - API-Key: []
          Connection-ID: []
components:
  schemas:
    KeySetPaginatedResponse_PassthroughTicket_:
      properties:
        items:
          description: The records on this page.
          items:
            $ref: '#/components/schemas/PassthroughTicket'
          title: Items
          type: array
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Opaque position of the next page. Pass it back as `cursor` to
            continue; null when this is the last page.
          title: Next Cursor
        previous_cursor:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Opaque position of the previous page, for walking backwards. Null on
            the first page.
          title: Previous Cursor
      required:
        - items
      title: KeySetPaginatedResponse[PassthroughTicket]
      type: object
    OffsetPaginatedResponse_PassthroughTicket_:
      properties:
        count:
          description: Number of items return in the response
          title: Count
          type: integer
        items:
          description: The records on this page.
          items:
            $ref: '#/components/schemas/PassthroughTicket'
          title: Items
          type: array
        total:
          anyOf:
            - type: integer
            - type: 'null'
          description: Total number of items that can be returned
          title: Total
      required:
        - count
        - items
      title: OffsetPaginatedResponse[PassthroughTicket]
      type: object
    ErrorResponse:
      properties:
        code:
          description: Error code
          title: Code
          type: string
        detail:
          description: List of error dictionaries
          items:
            additionalProperties: true
            type: object
          title: Detail
          type: array
        message:
          description: Error message
          title: Message
          type: string
        type:
          description: Type of error
          title: Type
          type: string
      required:
        - type
        - code
        - message
        - detail
      title: ErrorResponse
      type: object
    PassthroughTicket:
      properties:
        assignee_display_name:
          anyOf:
            - type: string
            - type: 'null'
          description: Assignee display name
          title: Assignee Display Name
        assignee_vendor_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Assignee's vendor user ID
          title: Assignee Vendor Id
        issue_type_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Vendor issue type ID
          title: Issue Type Id
        issue_type_name:
          anyOf:
            - type: string
            - type: 'null'
          description: Vendor issue type name
          title: Issue Type Name
        priority:
          anyOf:
            - type: string
            - type: 'null'
          description: Priority name
          title: Priority
        project_key:
          anyOf:
            - type: string
            - type: 'null'
          description: Vendor project key
          title: Project Key
        status:
          anyOf:
            - type: string
            - type: 'null'
          description: Current status name
          title: Status
        summary:
          description: Ticket title / summary
          title: Summary
          type: string
        vendor_id:
          description: Vendor's ticket identifier (e.g., Jira issue key 'PROJ-123')
          title: Vendor Id
          type: string
      required:
        - vendor_id
        - summary
      title: PassthroughTicket
      type: object
  securitySchemes:
    API-Key:
      in: header
      name: X-API-KEY
      type: apiKey
    Connection-ID:
      in: header
      name: X-CONNECTION-ID
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.