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

# Get Issue

> This endpoint retrieves a specific issue by its ID.

### Body

<ParamField path="issueId" type="string">
  This is the unique identifier for the issue.
</ParamField>

### Response

<ResponseField name="id" type="string">
  This is the unique identifier for the issue.
</ResponseField>

<ResponseField name="projectId" type="string">
  This is the unique identifier for the project that this issue belongs to.
</ResponseField>

<ResponseField name="problem" type="string">
  This is the description of the problem.
</ResponseField>

<ResponseField name="rootCause" type="string">
  This is the root cause of the problem.
</ResponseField>

<ResponseField name="stepsToReproduce" type="array">
  The steps to reproduce the problem

  <Expandable title="Toggle object">
    <ResponseField name="stepNumber" type="integer">
      This is the number of the step.
    </ResponseField>

    <ResponseField name="description" type="string">
      This is the description of the step.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="solutionSteps" type="array">
  The steps to solve the problem

  <Expandable title="Toggle object">
    <ResponseField name="stepNumber" type="integer">
      This is the number of the step.
    </ResponseField>

    <ResponseField name="description" type="string">
      This is the description of the step.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="diff" type="object">
  The diff showing the code changes made to solve the problem

  <Expandable title="Toggle object">
    <ResponseField name="files" type="array">
      The files that were changed

      <Expandable title="Toggle object">
        <ResponseField name="fileName" type="string">
          This is the name of the file.
        </ResponseField>

        <ResponseField name="changes" type="array">
          The changes made to the file

          <Expandable title="Toggle object">
            <ResponseField name="type" type="string">
              This is the type of change (add, delete, modify).
            </ResponseField>

            <ResponseField name="lines" type="array">
              The lines that were changed

              <Expandable title="Toggle object">
                <ResponseField name="lineNumber" type="integer">
                  This is the number of the line.
                </ResponseField>

                <ResponseField name="oldCode" type="string">
                  This is the old code on the line.
                </ResponseField>

                <ResponseField name="newCode" type="string">
                  This is the new code on the line.
                </ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="investigationSteps" type="array">
  The investigation steps taken to investigate the problem

  <Expandable title="Toggle object">
    <ResponseField name="action" type="string">
      This is the action taken in this investigation step.
    </ResponseField>

    <ResponseField name="result" type="string">
      This is the result of the action.
    </ResponseField>

    <ResponseField name="analysis" type="string">
      This is the analysis of the result.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="createdAt" type="string">
  This is the date and time when the issue was created.
</ResponseField>

<RequestExample>
  ```bash Example Request theme={null}
  curl 'https://<your_disto_url>/api/v1/issues/{issueId}/' \
  -H 'Authorization: Bearer <token>'
  ```
</RequestExample>

<ResponseExample>
  ````json Response theme={null}
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "projectId": "123e4567-e89b-12d3-a456-426614174001",
    "problem": "crash rate is > 0.2% for 1 hour on app 'Signal', version '6.35.0', OS 'iOS'",
    "rootCause": "You need to call a designated initializer of the superclass. The designated initializers for UINavigationController are init(nibName:bundle:) and init(rootViewController:). In your code, you're calling super.init(), which is not a designated initializer for UINavigationController.",
    "stepsToReproduce": [
      {
        "stepNumber": 1,
        "description": "Launch the iOS app on an iPhone 8 device running iOS version 12.4.1 and app version 6.35.0."
      },
      {
        "stepNumber": 2,
        "description": "Wait for the splash screen to appear."
      },
      {
        "stepNumber": 3,
        "description": "Tap the 'continue' button."
      }
    ],
    "solutionSteps": [
      {
        "stepNumber": 1,
        "description": "Open the `OnboardingNavigationController.swift` file."
      },
      {
        "stepNumber": 2,
        "description": "Go to line 16 and modify the `init(onboardingController:)` method as follows:\n\n```swift\noverride init(rootViewController: UIViewController) {\n    super.init(rootViewController: rootViewController)\n }\n```\n\nThis change ensures that the `UINavigationController` is properly initialized with a root view controller."
      },
      {
        "stepNumber": 3,
        "description": "Save the file."
      }
    ],
    "diff": {
      "files": [
        {
          "fileName": "OnboardingNavigationController.swift",
          "changes": [
            {
              "type": "modify",
              "lines": [
                {
                  "lineNumber": 16,
                  "oldCode": "init(onboardingController:)",
                  "newCode": "override init(rootViewController: UIViewController) {\n    super.init(rootViewController: rootViewController)\n}"
                }
              ]
            }
          ]
        }
      ]
    },
    "investigationSteps": [
      {
        "action": "SELECT latest(stacktrace) FROM MobileCrash WHERE appName = 'iOS App' AND deviceModel = 'iPhone 8' AND deviceOSVersion = '12.4.1' AND appVersion = '6.35.0' SINCE 1 hour AGO",
        "result": "NSInvalidArgumentException: -[UINavigationController init]: unrecognized selector sent to instance 0x7fb4ac40a200
  at [OnboardingNavigationController init(onboardingController:)](OnboardingController.swift:16)
  at [OnboardingController nextViewController(milestone:)]: (OnboardingController.swift:70)
  at [OnboardingController showNextMilestone](OnboardingController.swift:60)
  at [OnboardingController startOnboarding](OnboardingController.swift:50)
  at [AppDelegate application(didFinishLaunchingWithOptions:)](AppDelegate.swift:200)
  at [UIApplication _handleDelegateCallbacksWithOptions(isSuspended:restoreState:)]
  at [UIApplication _callInitializationDelegatesForMainScene(transitionContext:)]
  at [UIApplication _runWithMainScene(transitionContext:completion:)]
  at [UIApplication workspaceDidEndTransaction]
  at [FBSSerialQueue _performNext]
  at [FBSSerialQueue _performNextFromRunLoopSource]
  at [CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__]
  at [__CFRunLoopDoSources0]
  at [__CFRunLoopRun]
  at [CFRunLoopRunSpecific]
  at [UIApplication _run]
  at [UIApplication _run]
  at [UIApplication main]
  at [main](main.m:14)
  at [start]",
        "analysis": "Based on the latest stacktrace retrieved from New Relic, the crash is caused by an unrecognized selector sent to an instance of `UINavigationController`. The crash occurs at line 16 of the `OnboardingController.swift` file, in the `init(onboardingController:)` method of the `OnboardingNavigationController` class.

  To further investigate the issue and identify the root cause, we need to retrieve the latest breadcrumbs for this crash. Breadcrumbs provide a trail of events leading up to the crash, which can help us understand the sequence of actions that triggered the crash."
      }
    ],
    "createdAt": "2023-08-02T14:30:00Z"
  }
  ````
</ResponseExample>
