> For the complete documentation index, see [llms.txt](https://ai-security-docs.akto.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai-security-docs.akto.io/api-reference/scan-results/fetch-data.md).

# Fetch Data

<table data-full-width="true"><thead><tr><th width="501.0283203125">API</th><th>Description</th></tr></thead><tbody><tr><td><strong>POST /api/fetchTestRunResultsCount</strong></td><td>Fetch the count of scan results, useful for pagination or summaries.</td></tr><tr><td><strong>POST /api/fetchSeverityInfoForIssues</strong></td><td>Retrieve aggregated severity information (Critical, High, Medium, Low) for issues.</td></tr><tr><td><strong>POST /api/fetchIssueFromTestRunResultDetails</strong></td><td>Get detailed issue information from a specific scan result.</td></tr><tr><td><strong>POST /api/fetchAllSubCategories</strong></td><td>Fetch all issue subcategories (e.g., SQLi, XSS under Injection) used for classification.</td></tr><tr><td><strong>POST /api/fetchRemediationInfo</strong></td><td>Retrieve remediation details and best practices for fixing a specific issue.</td></tr><tr><td><strong>POST /api/fetchTestRunResultDetails</strong></td><td>Get detailed information about a specific scan result.</td></tr><tr><td><strong>POST /api/findTotalIssuesByDay</strong></td><td>Fetch the total number of issues discovered per day, useful for trend analysis.</td></tr><tr><td><strong>POST /api/fetchAllIssues</strong></td><td>Retrieve all issues detected across agentic collections and scan runs.</td></tr><tr><td><strong>POST /api/fetchTestingRunResultSummaries</strong></td><td>Fetch summaries of scan results (high-level overview of findings).</td></tr><tr><td><strong>POST /api/generateReportPDF</strong></td><td>Generate a downloadable PDF report of scan results and issues.</td></tr><tr><td><strong>POST /api/fetchTestingRunResults</strong></td><td>Fetch detailed scan results including all issues found.</td></tr><tr><td><strong>POST /api/fetchActiveTestRunsStatus</strong></td><td>Retrieve the current status of active scan runs.</td></tr><tr><td><strong>POST /api/fetchTestResultsStatsCount</strong></td><td>Get statistical counts of scan results grouped by categories (e.g., pass/fail).</td></tr><tr><td><strong>POST /api/fetchTestingRunResult</strong></td><td>Fetch a single scan result with its details.</td></tr><tr><td><strong>POST /api/fetchVulnerableTestingRunResultsFromIssues</strong></td><td>Retrieve scan results linked to vulnerable issues.</td></tr><tr><td><strong>POST /api/getAllTestsCountMap</strong></td><td>Get a count map of all available probes grouped by categories/subcategories.</td></tr><tr><td><strong>POST /api/retrieveAllCollectionTests</strong></td><td>Retrieve all probes mapped to agentic collections.</td></tr><tr><td><strong>POST /api/fetchTestingRunResultsSummary</strong></td><td>Fetch a summary of scan results, highlighting major findings.</td></tr><tr><td><strong>POST /api/fetchIssuesByApis</strong></td><td>Get all issues grouped by Agentic Components for better component-level visibility.</td></tr><tr><td><strong>POST /api/fetchIssuesFromResultIds</strong></td><td>Fetch issues associated with specific scan result IDs.</td></tr><tr><td><strong>POST /api/fetchCriticalIssuesTrend</strong></td><td>Retrieve the trend of critical issues over time.</td></tr><tr><td><strong>POST /api/fetchTestCoverageData</strong></td><td>Fetch scan coverage data showing which agentic components have been scanned and which remain unscanned.</td></tr><tr><td><strong>POST /api/fetchCategoryWiseScores</strong></td><td>Get probe scores grouped by probe category (OWASP, CWE, etc.).</td></tr><tr><td><strong>POST /api/fetchVulnerableTestRunResults</strong></td><td>Get scan results that found vulnerabilities.</td></tr><tr><td><strong>POST /api/fetchAffectedEndpoints</strong></td><td>Retrieve Agentic components affected by specific issues or vulnerabilities.</td></tr><tr><td><strong>POST /api/fetchSensitiveSampleData</strong></td><td>Fetch sample data containing sensitive information from scan results.</td></tr><tr><td><strong>POST /api/fetchSubTypeCountMap</strong></td><td>Get a count map of issue subtypes from scan results.</td></tr><tr><td><strong>POST /api/getIssueSummaryInfo</strong></td><td>Fetches a summary of issues including counts by severity and category.</td></tr><tr><td><strong>POST /api/getIssuesTrend</strong></td><td>Retrieves the trend of issues over time for analysis and reporting.</td></tr><tr><td><strong>POST /api/findTotalIssues</strong></td><td>Finds the total count of issues matching specified filters.</td></tr><tr><td><strong>POST /api/fetchIssuesData</strong></td><td>Fetches detailed data for issues including metadata and context.</td></tr><tr><td><strong>POST /api/fetchUrlsByIssues</strong></td><td>Retrieves the Agentic components associated with specific issues.</td></tr><tr><td><strong>POST /api/getReportFilters</strong></td><td>Fetches available filter options for generating reports.</td></tr><tr><td><strong>POST /api/downloadReportPDF</strong></td><td>Downloads a PDF report of scan results and issues.</td></tr><tr><td><strong>POST /api/getThreatReportFilters</strong></td><td>Fetches available filter options for threat reports.</td></tr><tr><td><strong>POST /api/downloadThreatReportPDF</strong></td><td>Downloads a PDF threat report based on current filters.</td></tr><tr><td><strong>POST /api/downloadSamplePdf</strong></td><td>Downloads a sample PDF report for preview or reference.</td></tr><tr><td><strong>POST /api/fetchConversationsFromConversationId</strong></td><td>Fetches conversation history associated with a specific conversation ID.</td></tr></tbody></table>

## POST /api/fetchTestRunResultsCount

> POST request for endpoint /api/fetchTestRunResultsCount

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchTestRunResultsCount":{"post":{"summary":"POST request for endpoint /api/fetchTestRunResultsCount","operationId":"/api/fetchTestRunResultsCount-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"testingRunHexId":{"type":"string"},"filterTestName":{"type":"string"},"filterSeverity":{"type":"array","items":{"type":"string"}},"filterStatus":{"type":"array","items":{"type":"string"}}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer","format":"int32"},"byStatus":{"type":"object"},"bySeverity":{"type":"object"}},"description":"Sample description"}}}}}}}}}
```

## POST /api/fetchSeverityInfoForIssues

> POST request for endpoint /api/fetchSeverityInfoForIssues

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchSeverityInfoForIssues":{"post":{"summary":"POST request for endpoint /api/fetchSeverityInfoForIssues","operationId":"/api/fetchSeverityInfoForIssues-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"testingRunHexId":{"type":"string"}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"severityInfo":{"type":"object"}},"description":"Sample description"}}}}}}}}}
```

## POST /api/fetchIssueFromTestRunResultDetails

> POST request for endpoint /api/fetchIssueFromTestRunResultDetails

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchIssueFromTestRunResultDetails":{"post":{"summary":"POST request for endpoint /api/fetchIssueFromTestRunResultDetails","operationId":"/api/fetchIssueFromTestRunResultDetails-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"testingRunResultHexId":{"type":"string"}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"string"},"testingRunResults":{"type":"string"},"testingRunResultSummaries":{"type":"string"},"runIssues":{"type":"object","properties":{"severity":{"type":"string"},"lastSeen":{"type":"integer","format":"int32"},"creationTime":{"type":"integer","format":"int32"},"testRunIssueStatus":{"type":"string"},"ignoreReason":{"type":"string"},"latestTestingRunSummaryId":{"type":"object","properties":{"date":{"type":"string"},"timestamp":{"type":"integer","format":"int32"}}},"id":{"type":"object","properties":{"testSubCategory":{"type":"string"},"testErrorSource":{"type":"string"},"testCategoryFromSourceConfig":{"type":"string"},"apiInfoKey":{"type":"object","properties":{"method":{"type":"string"},"apiCollectionId":{"type":"integer","format":"int32"},"url":{"type":"string"}}},"testSourceConfig":{"type":"string"}}}}},"selectedTests":{"type":"string"},"maxConcurrentRequests":{"type":"integer","format":"int32"},"testingRuns":{"type":"string"},"recurringDaily":{"type":"boolean"},"workflowTest":{"type":"string"},"authMechanism":{"type":"string"},"testingRunResult":{"type":"string"},"fetchCicd":{"type":"boolean"},"testingRun":{"type":"string"},"testRunTime":{"type":"integer","format":"int32"},"testingRunHexId":{"type":"string"},"endTimestamp":{"type":"integer","format":"int32"},"startTimestamp":{"type":"integer","format":"int32"},"testName":{"type":"string"}},"description":"Sample description"}}}}}}}}}
```

## POST /api/fetchAllSubCategories

> POST request for endpoint /api/fetchAllSubCategories

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchAllSubCategories":{"post":{"summary":"POST request for endpoint /api/fetchAllSubCategories","operationId":"/api/fetchAllSubCategories-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","description":"AKTO_ERROR while building schema"}}}}}}}}}
```

## POST /api/fetchRemediationInfo

> POST request for endpoint /api/fetchRemediationInfo

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchRemediationInfo":{"post":{"summary":"POST request for endpoint /api/fetchRemediationInfo","operationId":"/api/fetchRemediationInfo-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"issueId":{"type":"string"}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"remediationInfo":{"type":"string"},"remediationCode":{"type":"string"}},"description":"Sample description"}}}}}}}}}
```

## POST /api/fetchTestRunResultDetails

> POST request for endpoint /api/fetchTestRunResultDetails

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchTestRunResultDetails":{"post":{"summary":"POST request for endpoint /api/fetchTestRunResultDetails","operationId":"/api/fetchTestRunResultDetails-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"testingRunResultHexId":{"type":"string"}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"string"},"testingRunResults":{"type":"string"},"testingRunResultSummaries":{"type":"string"},"runIssues":{"type":"string"},"selectedTests":{"type":"string"},"maxConcurrentRequests":{"type":"integer","format":"int32"},"testingRuns":{"type":"string"},"recurringDaily":{"type":"boolean"},"workflowTest":{"type":"string"},"testingRunResult":{"type":"object","properties":{"testResults":{"type":"array","items":{"type":"object","properties":{"testInfo":{"type":"string"},"vulnerable":{"type":"boolean"},"percentageMatch":{"type":"number"},"confidence":{"type":"object","properties":{"_name":{"type":"string"}}},"message":{"type":"string"},"originalMessage":{"type":"string"}}}},"testSubType":{"type":"string"},"vulnerable":{"type":"boolean"},"testRunResultSummaryId":{"type":"object","properties":{"date":{"type":"string"},"timestamp":{"type":"integer","format":"int32"}}},"testRunId":{"type":"object","properties":{"date":{"type":"string"},"timestamp":{"type":"integer","format":"int32"}}},"testSuperType":{"type":"string"},"id":{"type":"object","properties":{"date":{"type":"string"},"timestamp":{"type":"integer","format":"int32"}}},"apiInfoKey":{"type":"object","properties":{"method":{"type":"object","properties":{"_name":{"type":"string"}}},"apiCollectionId":{"type":"integer","format":"int32"},"url":{"type":"string"}}},"confidencePercentage":{"type":"integer","format":"int32"},"endTimestamp":{"type":"integer","format":"int32"},"startTimestamp":{"type":"integer","format":"int32"},"hexId":{"type":"string"}}},"authMechanism":{"type":"string"},"fetchCicd":{"type":"boolean"},"testingRun":{"type":"string"},"testRunTime":{"type":"integer","format":"int32"},"testingRunHexId":{"type":"string"},"endTimestamp":{"type":"integer","format":"int32"},"startTimestamp":{"type":"integer","format":"int32"},"testName":{"type":"string"}},"description":"Sample description"}}}}}}}}}
```

## POST /api/findTotalIssuesByDay

> POST request for endpoint /api/findTotalIssuesByDay

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/findTotalIssuesByDay":{"post":{"summary":"POST request for endpoint /api/findTotalIssuesByDay","operationId":"/api/findTotalIssuesByDay-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"startTimestamp":{"type":"integer","format":"int32"},"endTimestamp":{"type":"integer","format":"int32"}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"issuesByDay":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer","format":"int32"},"count":{"type":"integer","format":"int32"}}}}},"description":"Sample description"}}}}}}}}}
```

## POST /api/fetchAllIssues

> POST request for endpoint /api/fetchAllIssues

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchAllIssues":{"post":{"summary":"POST request for endpoint /api/fetchAllIssues","operationId":"/api/fetchAllIssues-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","format":"int32"},"filterStatus":{"type":"array","items":{"type":"string"}},"skip":{"type":"integer","format":"int32"},"startEpoch":{"type":"integer","format":"int32"}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"vulnerableRequests":{"type":"string"},"issueId":{"type":"string"},"similarlyAffectedIssues":{"type":"string"},"filterStatus":{"type":"array","items":{"type":"string"}},"skip":{"type":"integer","format":"int32"},"startEpoch":{"type":"integer","format":"int32"},"issueIdArray":{"type":"string"},"testSourceConfigs":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string"},"lastSeen":{"type":"integer","format":"int32"},"creationTime":{"type":"integer","format":"int32"},"testRunIssueStatus":{"type":"string"},"latestTestingRunSummaryId":{"type":"object","properties":{"date":{"type":"string"},"timestamp":{"type":"integer","format":"int32"}}},"ignoreReason":{"type":"string"},"id":{"type":"object","properties":{"testSubCategory":{"type":"string"},"testErrorSource":{"type":"string"},"testCategoryFromSourceConfig":{"type":"string"},"apiInfoKey":{"type":"object","properties":{"method":{"type":"string"},"apiCollectionId":{"type":"integer","format":"int32"},"url":{"type":"string"}}},"testSourceConfig":{"type":"string"}}}}}},"subCategories":{"type":"string"},"totalIssuesCount":{"type":"integer","format":"int32"},"testingRunResult":{"type":"string"},"ignoreReason":{"type":"string"},"limit":{"type":"integer","format":"int32"},"categories":{"type":"string"},"statusToBeUpdated":{"type":"string"}},"description":"Sample description"}}}}}}}}}
```

## POST /api/fetchTestingRunResultSummaries

> POST request for endpoint /api/fetchTestingRunResultSummaries

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchTestingRunResultSummaries":{"post":{"summary":"POST request for endpoint /api/fetchTestingRunResultSummaries","operationId":"/api/fetchTestingRunResultSummaries-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"testingRunHexId":{"type":"string"},"endTimestamp":{"type":"integer","format":"int32"},"startTimestamp":{"type":"integer","format":"int32"}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"string"},"testingRunResults":{"type":"string"},"testingRunResultSummaries":{"type":"array","items":{"type":"object","properties":{"metadata":{"type":"string"},"totalApis":{"type":"integer","format":"int32"},"testResultsCount":{"type":"integer","format":"int32"},"countIssues":{"type":"object","properties":{"HIGH":{"type":"integer","format":"int32"},"MEDIUM":{"type":"integer","format":"int32"},"LOW":{"type":"integer","format":"int32"}}},"testingRunId":{"type":"object","properties":{"date":{"type":"string"},"timestamp":{"type":"integer","format":"int32"}}},"id":{"type":"object","properties":{"date":{"type":"string"},"timestamp":{"type":"integer","format":"int32"}}},"testingRunHexId":{"type":"string"},"state":{"type":"string"},"endTimestamp":{"type":"integer","format":"int32"},"startTimestamp":{"type":"integer","format":"int32"},"hexId":{"type":"string"}}}},"runIssues":{"type":"string"},"selectedTests":{"type":"string"},"maxConcurrentRequests":{"type":"integer","format":"int32"},"testingRuns":{"type":"string"},"recurringDaily":{"type":"boolean"},"workflowTest":{"type":"string"},"authMechanism":{"type":"string"},"testingRunResult":{"type":"string"},"fetchCicd":{"type":"boolean"},"testingRun":{"type":"object","properties":{"periodInSeconds":{"type":"integer","format":"int32"},"testingRunConfig":{"type":"string"},"testingEndpoints":{"type":"object","properties":{"apiCollectionId":{"type":"integer","format":"int32"},"type":{"type":"string"}}},"maxConcurrentRequests":{"type":"integer","format":"int32"},"testIdConfig":{"type":"integer","format":"int32"},"pickedUpTimestamp":{"type":"integer","format":"int32"},"scheduleTimestamp":{"type":"integer","format":"int32"},"name":{"type":"string"},"userEmail":{"type":"string","format":"email"},"testRunTime":{"type":"integer","format":"int32"},"id":{"type":"object","properties":{"date":{"type":"string"},"timestamp":{"type":"integer","format":"int32"}}},"state":{"type":"string"},"endTimestamp":{"type":"integer","format":"int32"},"hexId":{"type":"string"}}},"testRunTime":{"type":"integer","format":"int32"},"testingRunHexId":{"type":"string"},"endTimestamp":{"type":"integer","format":"int32"},"startTimestamp":{"type":"integer","format":"int32"},"testName":{"type":"string"}},"description":"Sample description"}}}}}}}}}
```

## POST /api/generateReportPDF

> POST request for endpoint /api/generateReportPDF

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/generateReportPDF":{"post":{"summary":"POST request for endpoint /api/generateReportPDF","operationId":"/api/generateReportPDF-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"testingRunHexId":{"type":"string"}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"reportUrl":{"type":"string"}},"description":"Sample description"}}}}}}}}}
```

## POST /api/fetchTestingRunResults

> POST request for endpoint /api/fetchTestingRunResults

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchTestingRunResults":{"post":{"summary":"POST request for endpoint /api/fetchTestingRunResults","operationId":"/api/fetchTestingRunResults-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"testingRunResultSummaryHexId":{"type":"string"}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"string"},"testingRunResults":{"type":"array","items":{"type":"object","properties":{"testResults":{"type":"string"},"testRunResultSummaryId":{"type":"object","properties":{"date":{"type":"string"},"timestamp":{"type":"integer","format":"int32"}}},"testRunId":{"type":"object","properties":{"date":{"type":"string"},"timestamp":{"type":"integer","format":"int32"}}},"singleTypeInfos":{"type":"string"},"vulnerable":{"type":"boolean"},"testSubType":{"type":"string"},"testSuperType":{"type":"string"},"apiInfoKey":{"type":"object","properties":{"method":{"type":"string"},"apiCollectionId":{"type":"integer","format":"int32"},"url":{"type":"string"}}},"id":{"type":"object","properties":{"date":{"type":"string"},"timestamp":{"type":"integer","format":"int32"}}},"confidencePercentage":{"type":"integer","format":"int32"},"endTimestamp":{"type":"integer","format":"int32"},"startTimestamp":{"type":"integer","format":"int32"},"hexId":{"type":"string"}}}},"testingRunResultSummaries":{"type":"string"},"runIssues":{"type":"string"},"selectedTests":{"type":"string"},"maxConcurrentRequests":{"type":"integer","format":"int32"},"testingRuns":{"type":"string"},"recurringDaily":{"type":"boolean"},"workflowTest":{"type":"string"},"authMechanism":{"type":"string"},"testingRunResult":{"type":"string"},"fetchCicd":{"type":"boolean"},"testingRun":{"type":"string"},"testRunTime":{"type":"integer","format":"int32"},"testingRunHexId":{"type":"string"},"endTimestamp":{"type":"integer","format":"int32"},"startTimestamp":{"type":"integer","format":"int32"},"testName":{"type":"string"}},"description":"Sample description"}}}}}}}}}
```

## POST /api/fetchActiveTestRunsStatus

> POST request for endpoint /api/fetchActiveTestRunsStatus

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchActiveTestRunsStatus":{"post":{"summary":"POST request for endpoint /api/fetchActiveTestRunsStatus","operationId":"/api/fetchActiveTestRunsStatus-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"activeTestRuns":{"type":"array","items":{"type":"object","properties":{"hexId":{"type":"string"},"state":{"type":"string"},"name":{"type":"string"}}}}},"description":"Sample description"}}}}}}}}}
```

## POST /api/fetchTestResultsStatsCount

> POST request for endpoint /api/fetchTestResultsStatsCount

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchTestResultsStatsCount":{"post":{"summary":"POST request for endpoint /api/fetchTestResultsStatsCount","operationId":"/api/fetchTestResultsStatsCount-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"testingRunHexId":{"type":"string"}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"stats":{"type":"object","properties":{"totalTests":{"type":"integer","format":"int32"},"issuesFound":{"type":"integer","format":"int32"},"passRate":{"type":"number"}}}},"description":"Sample description"}}}}}}}}}
```

## POST /api/fetchTestingRunResult

> POST request for endpoint /api/fetchTestingRunResult

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchTestingRunResult":{"post":{"summary":"POST request for endpoint /api/fetchTestingRunResult","operationId":"/api/fetchTestingRunResult-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"testingRunResultHexId":{"type":"string"}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"testingRunResult":{"type":"object"},"testingRunResultSummary":{"type":"object"}},"description":"Sample description"}}}}}}}}}
```

## POST /api/fetchVulnerableTestingRunResultsFromIssues

> POST request for endpoint /api/fetchVulnerableTestingRunResultsFromIssues

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchVulnerableTestingRunResultsFromIssues":{"post":{"summary":"POST request for endpoint /api/fetchVulnerableTestingRunResultsFromIssues","operationId":"/api/fetchVulnerableTestingRunResultsFromIssues-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"testingRunHexId":{"type":"string"},"skip":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"vulnerabilities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"endpoint":{"type":"string"},"testName":{"type":"string"},"severity":{"type":"string"}}}}},"description":"Sample description"}}}}}}}}}
```

## POST /api/getAllTestsCountMap

> POST request for endpoint /api/getAllTestsCountMap

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/getAllTestsCountMap":{"post":{"summary":"POST request for endpoint /api/getAllTestsCountMap","operationId":"/api/getAllTestsCountMap-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"testsCountMap":{"type":"object"}},"description":"Sample description"}}}}}}}}}
```

## POST /api/retrieveAllCollectionTests

> POST request for endpoint /api/retrieveAllCollectionTests

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/retrieveAllCollectionTests":{"post":{"summary":"POST request for endpoint /api/retrieveAllCollectionTests","operationId":"/api/retrieveAllCollectionTests-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fetchCicd":{"type":"boolean"}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"string"},"testingRunResults":{"type":"string"},"testingRunResultSummaries":{"type":"string"},"runIssues":{"type":"string"},"selectedTests":{"type":"string"},"maxConcurrentRequests":{"type":"integer","format":"int32"},"recurringDaily":{"type":"boolean"},"workflowTest":{"type":"string"},"authMechanism":{"type":"object","properties":{"authParams":{"type":"array","items":{"type":"object","properties":{"showHeader":{"type":"boolean"},"where":{"type":"string"},"value":{"type":"string"},"key":{"type":"string"}}}},"id":{"type":"object","properties":{"date":{"type":"string"},"timestamp":{"type":"integer","format":"int32"}}},"type":{"type":"string"},"uuid":{"type":"string"}}},"testingRunResult":{"type":"string"},"fetchCicd":{"type":"boolean"},"testingRun":{"type":"string"},"testRunTime":{"type":"integer","format":"int32"},"testingRunHexId":{"type":"string"},"endTimestamp":{"type":"integer","format":"int32"},"startTimestamp":{"type":"integer","format":"int32"},"testName":{"type":"string"}},"description":"Sample description"}}}}}}}}}
```

## POST /api/fetchTestingRunResultsSummary

> POST request for endpoint /api/fetchTestingRunResultsSummary

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchTestingRunResultsSummary":{"post":{"summary":"POST request for endpoint /api/fetchTestingRunResultsSummary","operationId":"/api/fetchTestingRunResultsSummary-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"testingRunHexId":{"type":"string"}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"testingRunResultSummary":{"type":"object"}},"description":"Sample description"}}}}}}}}}
```

## POST /api/fetchIssuesByApis

> POST request for endpoint /api/fetchIssuesByApis

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchIssuesByApis":{"post":{"summary":"POST request for endpoint /api/fetchIssuesByApis","operationId":"/api/fetchIssuesByApis-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"apiCollectionId":{"type":"integer","format":"int32"},"skip":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object"}},"total":{"type":"integer","format":"int32"}},"description":"Sample description"}}}}}}}}}
```

## POST /api/fetchIssuesFromResultIds

> POST request for endpoint /api/fetchIssuesFromResultIds

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchIssuesFromResultIds":{"post":{"summary":"POST request for endpoint /api/fetchIssuesFromResultIds","operationId":"/api/fetchIssuesFromResultIds-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"testingRunResultHexIds":{"type":"array","items":{"type":"string"}}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object"}}},"description":"Sample description"}}}}}}}}}
```

## POST /api/fetchCriticalIssuesTrend

> POST request for endpoint /api/fetchCriticalIssuesTrend

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchCriticalIssuesTrend":{"post":{"summary":"POST request for endpoint /api/fetchCriticalIssuesTrend","operationId":"/api/fetchCriticalIssuesTrend-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"startTimestamp":{"type":"integer","format":"int32"},"endTimestamp":{"type":"integer","format":"int32"}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"criticalIssuesTrend":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer","format":"int32"},"count":{"type":"integer","format":"int32"}}}}},"description":"Sample description"}}}}}}}}}
```

## POST /api/fetchTestCoverageData

> POST request for endpoint /api/fetchTestCoverageData

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchTestCoverageData":{"post":{"summary":"POST request for endpoint /api/fetchTestCoverageData","operationId":"/api/fetchTestCoverageData-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"apiCollectionId":{"type":"integer","format":"int32"}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"coverageData":{"type":"object"},"testedCount":{"type":"integer","format":"int32"},"untestedCount":{"type":"integer","format":"int32"}},"description":"Sample description"}}}}}}}}}
```

## POST /api/fetchCategoryWiseScores

> POST request for endpoint /api/fetchCategoryWiseScores

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchCategoryWiseScores":{"post":{"summary":"POST request for endpoint /api/fetchCategoryWiseScores","operationId":"/api/fetchCategoryWiseScores-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"testingRunHexId":{"type":"string"}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"scores":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"score":{"type":"number"},"issuesCount":{"type":"integer","format":"int32"}}}}},"description":"Sample description"}}}}}}}}}
```

## POST /api/fetchVulnerableTestRunResults

> POST request for endpoint /api/fetchVulnerableTestRunResults

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchVulnerableTestRunResults":{"post":{"summary":"POST request for endpoint /api/fetchVulnerableTestRunResults","operationId":"/api/fetchVulnerableTestRunResults-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"testingRunHexId":{"type":"string"},"skip":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"vulnerabilities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"endpoint":{"type":"string"},"testName":{"type":"string"},"severity":{"type":"string"},"finding":{"type":"object"}}}}},"description":"Sample description"}}}}}}}}}
```

## POST /api/fetchAffectedEndpoints

> POST request for endpoint /api/fetchAffectedEndpoints

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchAffectedEndpoints":{"post":{"summary":"POST request for endpoint /api/fetchAffectedEndpoints","operationId":"/api/fetchAffectedEndpoints-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"issueId":{"type":"object","properties":{"testSubCategory":{"type":"string"},"testErrorSource":{"type":"string"},"testCategoryFromSourceConfig":{"type":"string"},"apiInfoKey":{"type":"object","properties":{"method":{"type":"string"},"apiCollectionId":{"type":"integer","format":"int32"},"url":{"type":"string"}}},"testSourceConfig":{"type":"string"}}}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"filterSubCategory":{"type":"string"},"vulnerableRequests":{"type":"string"},"issueId":{"type":"object","properties":{"testSubCategory":{"type":"string"},"testErrorSource":{"type":"string"},"testCategoryFromSourceConfig":{"type":"string"},"apiInfoKey":{"type":"object","properties":{"method":{"type":"string"},"apiCollectionId":{"type":"integer","format":"int32"},"url":{"type":"string"}}},"testSourceConfig":{"type":"string"}}},"filterCollectionsId":{"type":"string"},"similarlyAffectedIssues":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string"},"lastSeen":{"type":"integer","format":"int32"},"creationTime":{"type":"integer","format":"int32"},"testRunIssueStatus":{"type":"string"},"latestTestingRunSummaryId":{"type":"object","properties":{"date":{"type":"string"},"timestamp":{"type":"integer","format":"int32"}}},"ignoreReason":{"type":"string"},"id":{"type":"object","properties":{"testSubCategory":{"type":"string"},"testErrorSource":{"type":"string"},"testCategoryFromSourceConfig":{"type":"string"},"apiInfoKey":{"type":"object","properties":{"method":{"type":"string"},"apiCollectionId":{"type":"integer","format":"int32"},"url":{"type":"string"}}},"testSourceConfig":{"type":"string"}}}}}},"filterStatus":{"type":"string"},"skip":{"type":"integer","format":"int32"},"filterSeverity":{"type":"string"},"startEpoch":{"type":"integer","format":"int32"},"issueIdArray":{"type":"string"},"testSourceConfigs":{"type":"string"},"issues":{"type":"string"},"subCategories":{"type":"string"},"totalIssuesCount":{"type":"integer","format":"int32"},"testingRunResult":{"type":"string"},"ignoreReason":{"type":"string"},"limit":{"type":"integer","format":"int32"},"categories":{"type":"string"},"statusToBeUpdated":{"type":"string"}},"description":"Sample description"}}}}}}}}}
```

## POST /api/fetchSensitiveSampleData

> POST request for endpoint /api/fetchSensitiveSampleData

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchSensitiveSampleData":{"post":{"summary":"POST request for endpoint /api/fetchSensitiveSampleData","operationId":"/api/fetchSensitiveSampleData-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"method":{"type":"string"},"apiCollectionId":{"type":"integer","format":"int32"},"url":{"type":"string"}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"sensitiveSampleData":{"type":"string"},"sampleDataList":{"type":"string"},"traffic":{"type":"string"}},"description":"Sample description"}}}}}}}}}
```

## POST /api/fetchSubTypeCountMap

> POST request for endpoint /api/fetchSubTypeCountMap

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchSubTypeCountMap":{"post":{"summary":"POST request for endpoint /api/fetchSubTypeCountMap","operationId":"/api/fetchSubTypeCountMap-POST","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"endTimestamp":{"type":"integer","format":"int32"},"startTimestamp":{"type":"integer","format":"int32"}},"description":"Sample description"}}}},"responses":{"200":{"description":"description","content":{"application/json":{"schema":{"type":"object","properties":{"listOfEndpointsInCollection":{"type":"string"},"endpoints":{"type":"string"},"method":{"type":"string"},"skip":{"type":"integer","format":"int32"},"apiCollectionId":{"type":"integer","format":"int32"},"filters":{"type":"string"},"url":{"type":"string"},"filterOperators":{"type":"string"},"urls":{"type":"string"},"sortKey":{"type":"string"},"response":{"type":"object","properties":{"subTypeCountMap":{"type":"object","properties":{"REQUEST":{"type":"object","properties":{"USERNAME":{"type":"integer","format":"int32"},"PHONE_NUMBER":{"type":"integer","format":"int32"},"EMAIL":{"type":"integer","format":"int32"}}},"RESPONSE":{"type":"object","properties":{"JWT":{"type":"integer","format":"int32"},"USERNAME":{"type":"integer","format":"int32"},"IP_ADDRESS":{"type":"integer","format":"int32"},"EMAIL":{"type":"integer","format":"int32"},"TOKEN":{"type":"integer","format":"int32"},"SECRET":{"type":"integer","format":"int32"}}}}}}},"sortOrder":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"}},"description":"Sample description"}}}}}}}}}
```

## Get issue summary info

> Returns a map of test sub-category names to their total issue counts within an optional time range and optional collection filter. Used by the dashboard summary widget.\
> \
> Source: \`StartTestAction.getIssueSummaryInfo()\`

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/getIssueSummaryInfo":{"post":{"summary":"Get issue summary info","description":"Returns a map of test sub-category names to their total issue counts within an optional time range and optional collection filter. Used by the dashboard summary widget.\n\nSource: `StartTestAction.getIssueSummaryInfo()`","operationId":"getIssueSummaryInfo","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"startTimestamp":{"type":"integer","description":"Start of the time window (epoch seconds). Defaults to 0 (all time)."},"endTimestamp":{"type":"integer","description":"End of the time window (epoch seconds). Defaults to `Context.now()` when 0."},"issueSummaryFilterCollectionIds":{"type":"array","items":{"type":"integer"},"description":"Optional list of API collection IDs to restrict the summary to."}}}}}},"responses":{"200":{"description":"Map of sub-category IDs to issue counts.","content":{"application/json":{"schema":{"type":"object","properties":{"issuesSummaryInfoMap":{"type":"object","description":"Map from test sub-category name to total issue count.","additionalProperties":{"type":"integer"}},"actionErrors":{"type":"array","items":{"type":"string"}}}}}}}},"tags":["Issues"]}}}}
```

## Get issues trend over time

> Returns a day-keyed map of issue counts grouped by test sub-category for a given time range. Used to render the trend chart on the Issues dashboard.\
> \
> Source: \`DashboardAction.fetchIssuesTrend()\`

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/getIssuesTrend":{"post":{"summary":"Get issues trend over time","description":"Returns a day-keyed map of issue counts grouped by test sub-category for a given time range. Used to render the trend chart on the Issues dashboard.\n\nSource: `DashboardAction.fetchIssuesTrend()`","operationId":"getIssuesTrend","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"startTimeStamp":{"type":"integer","description":"Start of the trend window (epoch seconds)."},"endTimeStamp":{"type":"integer","description":"End of the trend window (epoch seconds). Defaults to `Context.now()` when 0."}}}}}},"responses":{"200":{"description":"Map of day-epoch integers to lists of sub-category trend objects.","content":{"application/json":{"schema":{"type":"object","properties":{"issuesTrendMap":{"type":"object","description":"Map from day epoch (int) to list of `IssueTrendType` objects, one per sub-category active that day.","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/IssueTrendType"}}},"actionErrors":{"type":"array","items":{"type":"string"}}}}}}}},"tags":["Issues"]}}},"components":{"schemas":{"IssueTrendType":{"type":"object","description":"A single data point in an issues trend series — count of issues for a specific test sub-category on a given day.","properties":{"count":{"type":"integer","description":"Number of issues for the sub-category on the associated day."},"subCategory":{"type":"string","description":"Test sub-category name."}}}}}}
```

## Find total issues count

> Returns two counts for the dashboard summary tile:\
> \- \`totalIssuesCount\`: number of OPEN issues created on or before \`endTimeStamp\` (excluding deactivated collections).\
> \- \`oldOpenCount\`: number of OPEN+FIXED issues created on or before \`startTimeStamp\` (used as the baseline for the period delta).\
> \
> Source: \`DashboardAction.findTotalIssues()\`

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/findTotalIssues":{"post":{"summary":"Find total issues count","description":"Returns two counts for the dashboard summary tile:\n- `totalIssuesCount`: number of OPEN issues created on or before `endTimeStamp` (excluding deactivated collections).\n- `oldOpenCount`: number of OPEN+FIXED issues created on or before `startTimeStamp` (used as the baseline for the period delta).\n\nSource: `DashboardAction.findTotalIssues()`","operationId":"findTotalIssues","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"startTimeStamp":{"type":"integer","description":"Baseline epoch for `oldOpenCount`. Defaults to `now - 24 h` when 0."},"endTimeStamp":{"type":"integer","description":"Upper bound epoch for `totalIssuesCount`."}}}}}},"responses":{"200":{"description":"Total and baseline issue counts.","content":{"application/json":{"schema":{"type":"object","properties":{"totalIssuesCount":{"type":"integer","format":"int64","description":"Number of OPEN issues created on or before `endTimeStamp`, excluding deactivated collections."},"oldOpenCount":{"type":"integer","format":"int64","description":"Number of OPEN+FIXED issues created on or before `startTimeStamp`, used to compute the delta for the period."},"actionErrors":{"type":"array","items":{"type":"string"}}}}}}}},"tags":["Issues"]}}}}
```

## Fetch consolidated issues analytics data

> Consolidated API that returns multiple issues analytics datasets in a single response: issues over time, issues by severity, average issue age per severity, open vs. resolved issues over time, top issues by category, top hostnames by critical/high issues, and compliance-at-risk percentages. Intended for the agentic/consolidated dashboard view.\
> \
> Source: \`AgenticDashboardAction.fetchIssuesData()\`

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchIssuesData":{"post":{"summary":"Fetch consolidated issues analytics data","description":"Consolidated API that returns multiple issues analytics datasets in a single response: issues over time, issues by severity, average issue age per severity, open vs. resolved issues over time, top issues by category, top hostnames by critical/high issues, and compliance-at-risk percentages. Intended for the agentic/consolidated dashboard view.\n\nSource: `AgenticDashboardAction.fetchIssuesData()`","operationId":"fetchIssuesData","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"startTimestamp":{"type":"integer","description":"Start of the analytics window (epoch seconds). Pass 0 for all-time."},"endTimestamp":{"type":"integer","description":"End of the analytics window (epoch seconds). Defaults to `Context.now()` when 0."}}}}}},"responses":{"200":{"description":"Consolidated issues analytics.","content":{"application/json":{"schema":{"type":"object","properties":{"response":{"type":"object","properties":{"issuesOverTime":{"type":"array","description":"OPEN issues grouped by time period.","items":{"$ref":"#/components/schemas/TimePeriodCount"}},"issuesBySeverity":{"type":"object","description":"Count of OPEN issues per severity level.","properties":{"critical":{"type":"integer"},"high":{"type":"integer"},"medium":{"type":"integer"},"low":{"type":"integer"},"total":{"type":"integer"}}},"averageIssueAge":{"type":"object","description":"Average age (in days) of OPEN issues per severity.","properties":{"critical":{"type":"number","format":"double"},"high":{"type":"number","format":"double"},"medium":{"type":"number","format":"double"},"low":{"type":"number","format":"double"}}},"openResolvedIssues":{"type":"object","description":"OPEN and FIXED issue counts grouped by time period.","properties":{"open":{"type":"array","items":{"$ref":"#/components/schemas/TimePeriodCount"}},"resolved":{"type":"array","items":{"$ref":"#/components/schemas/TimePeriodCount"}}}},"topIssuesByCategory":{"type":"array","description":"Top 5 test sub-categories by OPEN issue count.","items":{"type":"object","properties":{"_id":{"type":"string"},"count":{"type":"integer"}}}},"topHostnamesByIssues":{"type":"array","description":"Top 5 hostnames (collections with a hostname set) ranked by CRITICAL+HIGH open issue count.","items":{"type":"object","properties":{"hostname":{"type":"string"},"count":{"type":"integer"}}}},"complianceAtRisks":{"type":"array","description":"Top 4 compliance standards with the highest percentage of tested APIs having related issues.","items":{"type":"object","properties":{"name":{"type":"string"},"percentage":{"type":"number","format":"double"},"count":{"type":"integer"}}}}}},"actionErrors":{"type":"array","items":{"type":"string"}}}}}}}},"tags":["Issues"]}}},"components":{"schemas":{"TimePeriodCount":{"type":"object","description":"A single time-period data point as returned by the Java-based time-grouping utilities.","properties":{"_id":{"type":"string","description":"Time period label. Format depends on the window size: `YYYY-MM-DD` for daily, `YYYY-Www` for weekly, `YYYY-MM` for monthly."},"count":{"type":"integer","format":"int64","description":"Number of events in this time period."}}}}}}
```

## Fetch URLs grouped by test sub-category

> Aggregates OPEN issues from \`testing\_run\_issues\` and groups unique URL+method pairs by test sub-category. Only groups with more than one distinct URL+method pair are included (threshold = 1).\
> \
> \- When \`showTestSubCategories\` is \`false\`: returns only \`totalCount\` (number of qualifying sub-categories).\
> \- When \`showTestSubCategories\` is \`true\`: returns \`testSubCategories\` (full list) and \`totalCount\`.\
> \
> Source: \`IssuesAction.fetchUrlsByIssues()\`

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchUrlsByIssues":{"post":{"summary":"Fetch URLs grouped by test sub-category","description":"Aggregates OPEN issues from `testing_run_issues` and groups unique URL+method pairs by test sub-category. Only groups with more than one distinct URL+method pair are included (threshold = 1).\n\n- When `showTestSubCategories` is `false`: returns only `totalCount` (number of qualifying sub-categories).\n- When `showTestSubCategories` is `true`: returns `testSubCategories` (full list) and `totalCount`.\n\nSource: `IssuesAction.fetchUrlsByIssues()`","operationId":"fetchUrlsByIssues","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"showTestSubCategories":{"type":"boolean","description":"When true, include the full sub-category list in the response. When false, return only the count."}}}}}},"responses":{"200":{"description":"Sub-category URL aggregation.","content":{"application/json":{"schema":{"type":"object","properties":{"response":{"type":"object","properties":{"testSubCategories":{"type":"array","description":"Present only when `showTestSubCategories` is true. List of sub-category objects, each with the set of unique URLs that have an open issue for that category.","items":{"type":"object","properties":{"_id":{"type":"object","description":"Grouped ID containing the test sub-category name.","properties":{"testSubCategory":{"type":"string"}}},"apiInfoKeySet":{"type":"array","description":"Unique URL+method+collectionId combinations with an open issue for this sub-category.","items":{"type":"object","properties":{"url":{"type":"string"},"method":{"type":"string"},"apiCollectionId":{"type":"integer"}}}},"apiInfoKeySetCount":{"type":"integer","description":"Number of unique URL+method pairs for this sub-category."}}}},"totalCount":{"type":"integer","description":"Number of sub-categories (or total count when `showTestSubCategories` is false)."}}},"actionErrors":{"type":"array","items":{"type":"string"}}}}}}}},"tags":["Issues"]}}}}
```

## Get test report filters

> Retrieves the filter configuration and issue IDs that were stored when the report was generated via \`generateTestReport\`. The \`generatedReportId\` is the ObjectId hex string returned by that endpoint.\
> \
> Source: \`IssuesAction.getReportFilters()\`

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/getReportFilters":{"post":{"summary":"Get test report filters","description":"Retrieves the filter configuration and issue IDs that were stored when the report was generated via `generateTestReport`. The `generatedReportId` is the ObjectId hex string returned by that endpoint.\n\nSource: `IssuesAction.getReportFilters()`","operationId":"getReportFilters","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["generatedReportId"],"properties":{"generatedReportId":{"type":"string","description":"ObjectId hex string of the test report document (returned by generateTestReport)."}}}}}},"responses":{"200":{"description":"Report filter configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"response":{"type":"object","properties":{"filtersForReport":{"type":"object","description":"Map of filter keys to filter value lists used when the report was created.","additionalProperties":{"type":"array","items":{"type":"string"}}},"issueIdsForReport":{"type":"array","description":"List of TestingIssuesId objects included in the report.","items":{"$ref":"#/components/schemas/TestingIssuesId"}}}},"actionErrors":{"type":"array","items":{"type":"string"}}}}}}},"400":{"description":"`generatedReportId` is null."}},"tags":["Reports"]}}},"components":{"schemas":{"TestingIssuesId":{"type":"object","description":"Composite identifier for a testing issue. Corresponds to `com.akto.dto.test_run_findings.TestingIssuesId`.","required":["apiInfoKey","testErrorSource","testSubCategory"],"properties":{"apiInfoKey":{"$ref":"#/components/schemas/ApiInfoKey"},"testErrorSource":{"type":"string","description":"Source of the test that generated this issue.","enum":["AUTOMATED_TESTING","TEST_EDITOR","CICD"]},"testSubCategory":{"type":"string","description":"YAML template ID of the test (e.g. `OPEN_REDIRECT`, `SQL_INJECTION`) or an HTTP URL for custom fuzzing tests."},"testCategoryFromSourceConfig":{"type":"string","description":"For custom (HTTP-source) tests only: the source config category identifier."}}},"ApiInfoKey":{"type":"object","description":"Uniquely identifies an API endpoint within Akto. Corresponds to `com.akto.dto.ApiInfo.ApiInfoKey`.","required":["apiCollectionId","method","url"],"properties":{"apiCollectionId":{"type":"integer","description":"ID of the API collection this endpoint belongs to."},"method":{"type":"string","description":"HTTP method of the endpoint.","enum":["GET","POST","PUT","PATCH","DELETE","OPTIONS","HEAD"]},"url":{"type":"string","description":"Full URL (or URL template) of the endpoint."}}}}}}
```

## Download test report as PDF

> Generates or polls for a PDF rendering of a previously created test report (via \`generateTestReport\`). On the first call set \`firstPollRequest: true\`; subsequent polling calls set it to \`false\` and pass back the \`reportId\` returned in the previous response. Returns the PDF as a base64-encoded string when \`status\` is \`COMPLETED\`.\
> \
> Source: \`ReportAction.downloadReportPDF()\`

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/downloadReportPDF":{"post":{"summary":"Download test report as PDF","description":"Generates or polls for a PDF rendering of a previously created test report (via `generateTestReport`). On the first call set `firstPollRequest: true`; subsequent polling calls set it to `false` and pass back the `reportId` returned in the previous response. Returns the PDF as a base64-encoded string when `status` is `COMPLETED`.\n\nSource: `ReportAction.downloadReportPDF()`","operationId":"downloadReportPDF","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reportId":{"type":"string","description":"ObjectId hex string of the report document. On the first call this is the ID returned by `generateTestReport`. On subsequent polling calls it is the `reportId` returned in the previous response."},"organizationName":{"type":"string","description":"Organisation name to embed in the PDF header."},"reportDate":{"type":"string","description":"Human-readable date string to embed in the PDF."},"reportUrl":{"type":"string","description":"URL at which the report is hosted (rendered by the headless browser)."},"username":{"type":"string","description":"Username of the requester to embed in the PDF."},"firstPollRequest":{"type":"boolean","description":"Set to `true` on the initial trigger call; `false` on all subsequent polling calls."}}}}}},"responses":{"200":{"description":"PDF generation status and, when complete, the base64-encoded PDF.","content":{"application/json":{"schema":{"type":"object","properties":{"pdf":{"type":"string","description":"Base64-encoded PDF content. Non-null only when `status` is `COMPLETED`."},"status":{"type":"string","description":"Current generation status.","enum":["PENDING","PROCESSING","COMPLETED","ERROR"]},"reportId":{"type":"string","description":"Report document ObjectId hex string. Use this as `reportId` in subsequent polling calls."},"actionErrors":{"type":"array","items":{"type":"string"}}}}}}}},"tags":["Reports"]}}}}
```

## Get threat report filters

> Retrieves the filter configuration and threat IDs that were stored when the report was generated via \`generateThreatReport\`.\
> \
> Source: \`ThreatReportAction.getThreatReportFilters()\`

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/getThreatReportFilters":{"post":{"summary":"Get threat report filters","description":"Retrieves the filter configuration and threat IDs that were stored when the report was generated via `generateThreatReport`.\n\nSource: `ThreatReportAction.getThreatReportFilters()`","operationId":"getThreatReportFilters","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["generatedReportId"],"properties":{"generatedReportId":{"type":"string","description":"ObjectId hex string of the threat report (returned by `generateThreatReport`)."}}}}}},"responses":{"200":{"description":"Threat report filter configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"response":{"type":"object","properties":{"filtersForReport":{"type":"object","description":"Map of filter keys to filter value lists (as stored at report creation time). Always includes `{label: [THREAT]}`.","additionalProperties":{"type":"array","items":{"type":"string"}}},"threatIdsForReport":{"type":"array","description":"List of threat event IDs included in the report. Null if all matching threats were included.","items":{"type":"string"}}}},"actionErrors":{"type":"array","items":{"type":"string"}}}}}}},"400":{"description":"`generatedReportId` is null, or the threat report document was not found."}},"tags":["Reports"]}}}}
```

## Download threat report as PDF

> Generates or polls for a PDF rendering of a previously created threat report (via \`generateThreatReport\`). Polling semantics are identical to \`downloadReportPDF\`: set \`firstPollRequest: true\` on the first call, then \`false\` on subsequent polling calls.\
> \
> Source: \`ThreatReportAction.downloadThreatReportPDF()\`

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/downloadThreatReportPDF":{"post":{"summary":"Download threat report as PDF","description":"Generates or polls for a PDF rendering of a previously created threat report (via `generateThreatReport`). Polling semantics are identical to `downloadReportPDF`: set `firstPollRequest: true` on the first call, then `false` on subsequent polling calls.\n\nSource: `ThreatReportAction.downloadThreatReportPDF()`","operationId":"downloadThreatReportPDF","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reportId":{"type":"string","description":"ObjectId hex string of the threat report document."},"organizationName":{"type":"string","description":"Organisation name to embed in the PDF header."},"reportDate":{"type":"string","description":"Human-readable date string to embed in the PDF."},"reportUrl":{"type":"string","description":"URL at which the report page is hosted (rendered by the headless browser)."},"username":{"type":"string","description":"Username of the requester to embed in the PDF."},"firstPollRequest":{"type":"boolean","description":"Set to `true` on the initial trigger call; `false` on subsequent polling calls."}}}}}},"responses":{"200":{"description":"PDF generation status and base64 PDF when complete.","content":{"application/json":{"schema":{"type":"object","properties":{"pdf":{"type":"string","description":"Base64-encoded PDF content. Non-null only when `status` is `COMPLETED`."},"status":{"type":"string","enum":["PENDING","PROCESSING","COMPLETED","ERROR"]},"reportId":{"type":"string","description":"Report document ObjectId hex string."},"actionErrors":{"type":"array","items":{"type":"string"}}}}}}}},"tags":["Reports"]}}}}
```

## Download a sample PDF report

> Requests a pre-built sample PDF from the Puppeteer replay service (configured via the \`PUPPETEER\_REPLAY\_SERVICE\_URL\` environment variable). Requires no request body. Returns a base64-encoded PDF on success.\
> \
> Source: \`ReportAction.downloadSamplePdf()\`

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/downloadSamplePdf":{"post":{"summary":"Download a sample PDF report","description":"Requests a pre-built sample PDF from the Puppeteer replay service (configured via the `PUPPETEER_REPLAY_SERVICE_URL` environment variable). Requires no request body. Returns a base64-encoded PDF on success.\n\nSource: `ReportAction.downloadSamplePdf()`","operationId":"downloadSamplePdf","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","description":"Empty body — no request parameters are required."}}}},"responses":{"200":{"description":"Sample PDF content.","content":{"application/json":{"schema":{"type":"object","properties":{"pdf":{"type":"string","description":"Base64-encoded sample PDF content."},"status":{"type":"string","enum":["COMPLETED","ERROR"]},"actionErrors":{"type":"array","items":{"type":"string"}}}}}}},"400":{"description":"The Puppeteer service did not return a `base64PDF` field, or the service URL is not configured."}},"tags":["Reports"]}}}}
```

## Fetch agent conversations by conversation ID

> Returns up to 100 \`AgentConversationResult\` documents for a given \`conversationId\`, sorted by \`lastUpdatedAt\` ascending. Used by the agentic testing flow to replay or inspect a conversation.\
> \
> Source: \`StartTestAction.fetchConversationsFromConversationId()\`

```json
{"openapi":"3.0.1","info":{"title":"AktoSwagger","version":"1.0.0"},"paths":{"/api/fetchConversationsFromConversationId":{"post":{"summary":"Fetch agent conversations by conversation ID","description":"Returns up to 100 `AgentConversationResult` documents for a given `conversationId`, sorted by `lastUpdatedAt` ascending. Used by the agentic testing flow to replay or inspect a conversation.\n\nSource: `StartTestAction.fetchConversationsFromConversationId()`","operationId":"fetchConversationsFromConversationId","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["conversationId"],"properties":{"conversationId":{"type":"string","description":"The conversation ID to retrieve agent conversation results for."}}}}}},"responses":{"200":{"description":"List of conversation turn results ordered by creation time.","content":{"application/json":{"schema":{"type":"object","properties":{"conversationsList":{"type":"array","description":"Up to 100 `AgentConversationResult` documents for the given conversation ID, sorted by `lastUpdatedAt` ascending.","items":{"$ref":"#/components/schemas/AgentConversationResult"}},"actionErrors":{"type":"array","items":{"type":"string"}}}}}}},"400":{"description":"`conversationId` is null or empty."}},"tags":["Issues"]}}},"components":{"schemas":{"AgentConversationResult":{"type":"object","description":"A single turn in an agentic test conversation. Corresponds to `com.akto.dto.testing.AgentConversationResult` (stored in the `agent_conversation_results` collection).","properties":{"id":{"type":"string","description":"MongoDB ObjectId hex string for this conversation turn document."},"conversationId":{"type":"string","description":"Conversation identifier shared by all turns in the same session."},"role":{"type":"string","description":"Role of the speaker in this turn.","enum":["user","assistant","system"]},"content":{"type":"string","description":"Text content of this conversation turn."},"lastUpdatedAt":{"type":"integer","description":"Epoch seconds when this document was last updated. Used for chronological sorting."}}}}}}
```
