# Project issue paths API endpoints

The following provides information in addition to the information in the API Reference for the endpoints [List all project issue paths](/snyk-api/reference/projects-v1.md#org-orgid-project-projectid-issue-issueid-paths) and [List all project snapshot issue paths](/snyk-api/reference/snapshots-v1.md#org-orgid-project-projectid-history-snapshotid-issue-issueid-paths).

The `paths` endpoints provide details of the paths through which an issue has been introduced.

**Requests** to the `paths` endpoint are `GET` requests. The endpoints are available at the following URLs:

* `https://api.snyk.io/v1/org/<orgId>/project/<projectId>/issue/<issueId>/paths` ([List all project issue paths](/snyk-api/reference/projects-v1.md#org-orgid-project-projectid-issue-issueid-paths)). This returns the paths for an issue in the most recent test of the Project.
* `https://api.snyk.io/v1/org/<orgId>/project/<projectId>/history/<snapshotId>/issue/<issueId>/paths` ([List all project snapshot issue paths](/snyk-api/reference/snapshots-v1.md#org-orgid-project-projectid-history-snapshotid-issue-issueid-paths)). This returns the paths for an issue in a specific test of the Project.

Both of the paths endpoints can take a query string allowing for pagination, for example,`?page=2&perPage=500`.

By default, the first page of 100 results is returned. Up to 1,000 results can be requested per page.

The **response** has the following structure:

```json
{
    "snapshotId": "6d5813be-7e6d-4ab8-80c2-1e3e2a454553",
    "paths": [...],
    "total": 193,
    "links": {
        "prev": "<https://snyk.io/>...",
        "next": "<https://snyk.io/>...",
        "last": "<https://snyk.io/>..."
    }
}
```

* `snapshotId` is the ID of the Project snapshot from which the paths were returned.
* `total` is the total number of paths for the issue in the snapshot.
* `links` provides convenience links for navigating between pages of the response. `links.next` and `links.prev` are provided only if such a page exists. For example, when you retrieve the last page of results, it does not include a `next` link.
* `paths` is an array, each element of which is a path through the dependency tree. Each path is itself an array of package descriptors, for example:

```json
{
    "paths": [
        [
            { "name": "lodash", "version": "4.17.4", "fixVersion": "4.17.20" }
        ],
        [ 
            { "name": "babel-template", "version": "6.26.0", "fixVersion": "6.26.0" },
            { "name": "lodash", "version": "4.17.10" }
        ]
    ]
}
```

In this example, an issue is introduced through two different versions of the `lodash` package, one of which is a direct dependency while the other is indirect through `babel-template`.

The shortest path is provided first. If an issue applies to the Project itself, it appears as the only element in the path. For issues that apply to dependencies, each path starts with a direct dependency.

The `fixVersion` attribute is provided on the first element of each path when that path is upgradable. If the `version` attribute and `fixVersion` attributes are the same, then the upgrade will only involve re-locking transitive dependencies.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.snyk.io/snyk-api/api-endpoints-index-and-tips/project-issue-paths-api-endpoints.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
