---
title: "List scan targets and API coverage"
method: GET
path: "/scans/{scanId}/targets"
tags: ["Scans"]
---

# List scan targets and API coverage

`GET /scans/{scanId}/targets`

## Request

- Base URL: `https://public.escape.tech/v3`
- URL: `https://public.escape.tech/v3/scans/{scanId}/targets`
- Auth: API key in header `X-ESCAPE-API-KEY`

Returns targets discovered during a scan, including REST and GraphQL operations with per-endpoint coverage. Filter by target type and source (specification vs inferred) to focus on API routes and resolvers for CI/CD quality gates.

## Path parameters

- `scanId` string, uuid, required: The scan ID

## Query parameters

- `cursor` string: The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page will be returned.
- `size` integer: The number of items to return per page
- `sortType` 'CREATED_AT' | 'ISSUES_COUNT' | 'NAME': The type to sort by
- `sortDirection` 'asc' | 'desc': The direction to sort by
- `types` string[]: Optional filter by target kinds (comma-separated or repeated), e.g. API_ROUTE or GRAPHQL_RESOLVER
- `sources` string[]: Optional filter by how the target was discovered (comma-separated or repeated). SOURCE_SPECIFICATION comes from the API schema; SOURCE_INFERRED was found during the scan. Applies to API_ROUTE and GRAPHQL_RESOLVER.
- `coverage` string[]: Optional filter by the coverage status the scanner observed on the target (comma-separated or repeated), e.g. OK or SERVER_ERROR
- `severities` string[]: Optional filter by the severity of the issues found on the target (comma-separated or repeated)
- `issues` string[]: Optional filter by issue IDs found on the target
- `methods` string[]: Optional filter by HTTP method (comma-separated or repeated). Applies to API_ROUTE.
- `search` string: Optional free-text search on the target path

## Response `200`

OK

- object
  - `nextCursor` string, nullable, required
  - `totalCount` integer
  - `data` object[], required
    - `createdAt` string, required: The date and time the target was created
    - `aiExplorationSummary` string, nullable: AI-generated summary of the exploration results for the target
    - `aiPentestingSummary` string, nullable: AI-generated pentesting summary for the target
    - `apiRoute` object, nullable: The api route of the target
      - `blacklisted` boolean, required: Whether the api route is blacklisted
      - `createdAt` string, required: The date and time the api route was created
      - `displayName` string, required: The display name of the api route
      - `id` string, uuid, required: The id of the api route
      - `name` string, required: The name of the api route
      - `operation` string, required: The operation of the api route
      - `parameters` object, nullable: The parameters of the api route
      - `requestCount` number, required: The request count of the api route
      - `meanDuration` number, nullable: Mean HTTP duration for this route in milliseconds, when available
      - `coverage` 'BROKEN_PIPE' | 'NOT_FOUND' | 'OK' | 'RATE_LIMIT' | 'REDIRECTION' | 'REPEATER_ERROR' | 'SERVER_ERROR' | 'TIMEOUT' | 'UNAUTHORIZED' | 'UNKNOWN' | 'VALIDATION_ERROR' | 'null', nullable, required: Coverage status for this REST endpoint (e.g. OK, UNAUTHORIZED, BLOCKLISTED)
      - `coverageByUser` object[], nullable: Per-user or per-session coverage breakdown when available
        - `name` string, required: User or session label associated with this target entry
        - `coverage` 'BROKEN_PIPE' | 'NOT_FOUND' | 'OK' | 'RATE_LIMIT' | 'REDIRECTION' | 'REPEATER_ERROR' | 'SERVER_ERROR' | 'TIMEOUT' | 'UNAUTHORIZED' | 'UNKNOWN' | 'VALIDATION_ERROR', required: Coverage status for that user/session
      - `returnType` string, nullable: The return type of the api route
      - `source` 'SOURCE_INFERRED' | 'SOURCE_SPECIFICATION', required: The source of the api route
    - `codeFile` object, nullable: The code file of the target
      - `id` string, uuid, required: The id of the code file
      - `language` string, required: The language of the code file
      - `path` string, required: The path of the code file
    - `graphqlResolver` object, nullable: The graphql resolver of the target
      - `blacklisted` boolean, required: Whether the graphql resolver is blacklisted
      - `createdAt` string, required: The date and time the graphql resolver was created
      - `displayName` string, required: The display name of the graphql resolver
      - `id` string, uuid, required: The id of the graphql resolver
      - `name` string, required: The name of the graphql resolver
      - `parameters` object, nullable: The parameters of the graphql resolver
      - `requestCount` number, required: The request count for this resolver
      - `meanDuration` number, nullable: Mean duration for this resolver in milliseconds, when available
      - `coverage` 'BROKEN_PIPE' | 'NOT_FOUND' | 'OK' | 'RATE_LIMIT' | 'REDIRECTION' | 'REPEATER_ERROR' | 'SERVER_ERROR' | 'TIMEOUT' | 'UNAUTHORIZED' | 'UNKNOWN' | 'VALIDATION_ERROR' | 'null', nullable, required: Coverage status for this GraphQL field (e.g. OK, UNAUTHORIZED, BLOCKLISTED)
      - `coverageByUser` object[], nullable: Per-user or per-session coverage breakdown when available
        - `name` string, required: User or session label associated with this target entry
        - `coverage` 'BROKEN_PIPE' | 'NOT_FOUND' | 'OK' | 'RATE_LIMIT' | 'REDIRECTION' | 'REPEATER_ERROR' | 'SERVER_ERROR' | 'TIMEOUT' | 'UNAUTHORIZED' | 'UNKNOWN' | 'VALIDATION_ERROR', required: Coverage status for that user/session
      - `parent` string, required: GraphQL parent type (query, mutation, or subscription)
      - `returnType` string, nullable: The return type of the graphql resolver
      - `source` 'SOURCE_INFERRED' | 'SOURCE_SPECIFICATION', required: The source of the resolver (specification vs inferred)
    - `id` string, uuid, required: The id of the target
    - `port` object, nullable: The port of the target
      - `id` string, uuid, required: The id of the port
      - `port` number, required: The port of the port
      - `protocol` string, required: The protocol of the port
    - `webPage` object, nullable: The web page of the target
      - `id` string, uuid, required: The id of the web page
      - `url` string, required: The URL of the web page
      - `visits` number, required: How many times the scanner visited the page
    - `webCrawledUrl` object, nullable: The crawled URL of the target
      - `id` string, uuid, required: The id of the crawled URL
      - `url` string, required: The crawled URL
      - `visits` number, required: How many times the scanner visited the URL
    - `cve` object, nullable: The CVE of the target
      - `id` string, uuid, required: The id of the CVE target
      - `cveId` string, required: The CVE identifier, e.g. CVE-2024-1234

## Other responses

- `400`: Pagination error
- `404`: Not found

---

[API](https://skmtc.dev/escape/apis/escape-public-api.md) - [All operations](https://skmtc.dev/escape/apis/escape-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/escape/apis/escape-public-api/revisions/2eab35df40c7?raw)
