Code Analysis

API
Description

POST /api/fetchCodeAnalysisApiInfos

Fetch code-analysis API info for a given traffic collection, returning matched endpoints discovered from source code.

POST /api/fetchCodeAnalysisRepos

Fetch all registered source-code repositories, optionally filtered by source-code type.

POST /api/getSourceCodeCollectionsForDirectories

Return all code analysis collections that have at least one endpoint under a given backend directory path prefix.

POST /api/getApisForChosenCollectionForSourceCode

Fetch request/response schema information for all API endpoints in the specified code analysis collections.

POST /api/addCodeAnalysisRepo

Add one or more source-code repositories for code-analysis scanning (upsert — re-adding an existing repo is a no-op).

POST /api/runCodeAnalysisRepo

Trigger an immediate scan for one or more registered repositories by setting their schedule time to now.

POST /api/deleteCodeAnalysisRepo

Delete a source-code repository registration, removing all documents matching the given project and repo name.

POST request for endpoint /api/fetchCodeAnalysisApiInfos

post
Header parameters
content-typestringOptionalExample: application/json
X-API-KEYstringOptionalExample: YOUR_API_KEY from Settings > Integrations > Akto APIs
Body
apiCollectionIdintegerOptionalExample: 1111111
Responses
chevron-right
200

Code analysis API info retrieved successfully

application/json
post
/api/fetchCodeAnalysisApiInfos
200

Code analysis API info retrieved successfully

POST request for endpoint /api/fetchCodeAnalysisRepos

post
Header parameters
content-typestringOptionalExample: application/json
X-API-KEYstringOptionalExample: YOUR_API_KEY from Settings > Integrations > Akto APIs
Body
sourceCodeTypestring · enumOptional

Filter by SCM provider. Omit or set to BITBUCKET to also match legacy repos without a type field.

Example: GITHUBPossible values:
Responses
chevron-right
200

Repositories fetched successfully

application/json
post
/api/fetchCodeAnalysisRepos
200

Repositories fetched successfully

POST request for endpoint /api/getSourceCodeCollectionsForDirectories

post
Header parameters
content-typestringOptionalExample: application/json
X-API-KEYstringOptionalExample: YOUR_API_KEY from Settings > Integrations > Akto APIs
Body
chosenBackendDirectorystringRequired

Directory path prefix used as a regex anchor (^prefix.*) to filter CodeAnalysisApiInfo by location.filePath

Example: src/main/java/com/example/payments
Responses
chevron-right
200

Matching collections retrieved successfully

application/json
post
/api/getSourceCodeCollectionsForDirectories
200

Matching collections retrieved successfully

POST request for endpoint /api/getApisForChosenCollectionForSourceCode

post
Header parameters
content-typestringOptionalExample: application/json
X-API-KEYstringOptionalExample: YOUR_API_KEY from Settings > Integrations > Akto APIs
Body
chosenCodeAnalysisCollectionIdsstring[]Required

Hex ObjectId strings of CodeAnalysisCollections to load. Pass an empty array to return an empty result.

Example: ["64a1f2e3b5c7d8e9f0a1b2c3","64a1f2e3b5c7d8e9f0a1b2d7"]
Responses
chevron-right
200

API endpoints with schemas retrieved successfully

application/json
post
/api/getApisForChosenCollectionForSourceCode
200

API endpoints with schemas retrieved successfully

POST request for endpoint /api/addCodeAnalysisRepo

post
Header parameters
content-typestringOptionalExample: application/json
X-API-KEYstringOptionalExample: YOUR_API_KEY from Settings > Integrations > Akto APIs
Body
Responses
chevron-right
200

Repositories added (or already existed) successfully

application/json
objectOptional
post
/api/addCodeAnalysisRepo

POST request for endpoint /api/runCodeAnalysisRepo

post
Header parameters
content-typestringOptionalExample: application/json
X-API-KEYstringOptionalExample: YOUR_API_KEY from Settings > Integrations > Akto APIs
Body
Responses
chevron-right
200

Scan triggered successfully — scheduleTime updated to current timestamp

application/json
objectOptional
post
/api/runCodeAnalysisRepo

POST request for endpoint /api/deleteCodeAnalysisRepo

post
Header parameters
content-typestringOptionalExample: application/json
X-API-KEYstringOptionalExample: YOUR_API_KEY from Settings > Integrations > Akto APIs
Body
Responses
chevron-right
200

Repository deleted successfully

application/json
objectOptional
post
/api/deleteCodeAnalysisRepo

Last updated