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

# Run the troubleshooter

> Checks the server's configuration, Quark's permissions in each log channel and the delivery path, and returns what it found. This is the report `/troubleshoot` and the dashboard show.



## OpenAPI

````yaml /api-reference/openapi.json get /servers/{guild_id}/troubleshoot
openapi: 3.1.0
info:
  title: Quark API
  version: 2.0.0
  description: Configure Quark and read your server's logs from your own code.
servers:
  - url: https://quark.bot/api
security:
  - bearerAuth: []
tags:
  - name: Configuration
    description: Read the configuration and change server settings.
  - name: Log channels
    description: Where each category of log is sent.
  - name: Logging settings
    description: Server-wide options and settings for individual log types.
  - name: Ignore options
    description: Channels, members, roles and message content left out of the logs.
  - name: Tags
    description: Saved messages posted with /tags send.
  - name: Logs
    description: Read and export the server's logs.
  - name: Notifications
    description: Recent changes to Quark's configuration.
  - name: Troubleshooting
    description: Find out why logs are missing, and fix it.
  - name: Search
    description: Look up members and channels.
  - name: Tokens
    description: List and revoke API tokens.
  - name: Server
    description: Reset the server.
paths:
  /servers/{guild_id}/troubleshoot:
    get:
      tags:
        - Troubleshooting
      summary: Run the troubleshooter
      description: >-
        Checks the server's configuration, Quark's permissions in each log
        channel and the delivery path, and returns what it found. This is the
        report `/troubleshoot` and the dashboard show.
      operationId: troubleshoot
      parameters:
        - $ref: '#/components/parameters/GuildId'
        - name: live
          in: query
          required: false
          schema:
            type: string
            enum:
              - '0'
          description: >-
            Set to `0` to skip the checks that call Discord. Faster, but deleted
            channels and full webhook slots are not detected.
        - $ref: '#/components/parameters/Bot'
      responses:
        '200':
          description: The report.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiagnosticReport'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    GuildId:
      name: guild_id
      in: path
      required: true
      schema:
        type: string
        pattern: ^\d{17,20}$
        example: '301655085954367490'
      description: The server's ID. Must be the server the token was created for.
    Bot:
      name: bot
      in: query
      required: false
      schema:
        type: string
        enum:
          - pro
      description: >-
        Set to `pro` to act on the Quark Pro bot's configuration. Leave out for
        the main Quark bot.
  schemas:
    DiagnosticReport:
      type: object
      properties:
        guildId:
          type: string
          pattern: ^\d{17,20}$
          example: '301655085954367490'
        botId:
          type: string
        generatedAt:
          type: integer
        status:
          type: string
          enum:
            - broken
            - degraded
            - healthy
        findings:
          type: array
          items:
            $ref: '#/components/schemas/Finding'
        counts:
          type: object
          properties:
            blocking:
              type: integer
            degraded:
              type: integer
            info:
              type: integer
        summary:
          type: object
          properties:
            configuredCategories:
              type: array
              items:
                type: string
                enum:
                  - mainChannel
                  - modlogCategory
                  - membersCategory
                  - actionsCategory
                  - textCategory
                  - voiceCategory
                  - filesCategory
                  - serverCategory
                  - rolesCategory
                  - channelsCategory
                  - quarkCategory
            firstLogAt:
              type:
                - integer
                - 'null'
              description: Unix timestamp in seconds.
            premiumLevel:
              type: integer
              description: 0 free, 1 Pro Lite, 2 Quark Pro.
            incomplete:
              type: array
              items:
                type: string
              description: Checks that could not be run.
    Finding:
      type: object
      properties:
        id:
          type: string
          description: >-
            The kind of problem, for example `NO_LOG_CHANNEL` or
            `MISSING_WEBHOOK`.
        severity:
          type: string
          enum:
            - blocking
            - degraded
            - info
        title:
          type: string
        detail:
          type: string
        scope:
          type: object
          description: >-
            What the finding applies to: a channel, category, log types, an
            ignore entry or permissions.
        fix:
          oneOf:
            - $ref: '#/components/schemas/Fix'
            - type: object
              description: A fix that has to be applied by hand.
            - type: 'null'
    Fix:
      type: object
      description: >-
        An automatic fix. Take it from the `fix` field of a finding in the
        troubleshooting report.
      required:
        - kind
      properties:
        kind:
          type: string
          enum:
            - initialise_guild
            - register_webhook
            - clear_log_channel
            - enable_log_type
            - remove_ignore
            - disable_bot_ignore
        automatic:
          type: boolean
          description: >-
            True if this endpoint can apply the fix. A fix with `automatic:
            false` has to be done by hand and is rejected.
        category:
          type: string
          enum:
            - mainChannel
            - modlogCategory
            - membersCategory
            - actionsCategory
            - textCategory
            - voiceCategory
            - filesCategory
            - serverCategory
            - rolesCategory
            - channelsCategory
            - quarkCategory
          description: For `register_webhook` and `clear_log_channel`.
        channelId:
          type: string
          description: For `register_webhook`.
        logType:
          type: integer
          description: For `enable_log_type`.
        ignoreType:
          type: integer
          description: For `remove_ignore`.
        value:
          type: string
          description: For `remove_ignore`.
        scope:
          type: string
          enum:
            - executors
            - targets
          description: For `disable_bot_ignore`.
  responses:
    Unauthorized:
      description: No token was sent.
      content:
        application/json:
          schema:
            type: object
            description: An empty object.
            example: {}
    Forbidden:
      description: The token belongs to a different server, or is not an Admin token.
      content:
        application/json:
          schema:
            type: object
            description: An empty object.
            example: {}
    RateLimited:
      description: Too many requests. Wait for the number of seconds in `Retry-After`.
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds to wait.
        X-RateLimit-Limit:
          schema:
            type: integer
        X-RateLimit-Remaining:
          schema:
            type: integer
      content:
        application/json:
          schema:
            type: object
            description: An empty object.
            example: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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