For the complete documentation index, see llms.txt. This page is also available as Markdown.

Modify Data

API
Description

POST /api/createCollection

Create a new API collection in Akto.

POST /api/createCustomCollection

Create a custom API collection by grouping selected APIs.

POST /api/addApisToCustomCollection

Add APIs to an existing custom collection.

POST /api/saveCollectionDescription

Save or update the description of a collection.

POST /api/updateEnvType

Update the environment type (e.g., prod, staging) for a collection.

POST /api/toggleCollectionsOutOfTestScope

Mark/unmark collections as out of test scope.

POST /api/deactivateCollections

Deactivate specific collections so they are no longer active.

POST /api/deleteMultipleCollections

Delete multiple collections at once.

POST /api/redactCollection

Redact sensitive data within a collection.

POST /api/saveEndpointDescription

Save or update the description of a specific API endpoint.

POST /api/loadParamsOfEndpoint

Load the parameters (query, path, body) of a given API endpoint.

POST /api/loadSensitiveParameters

Load parameters identified as sensitive for a given endpoint/collection.

POST /api/importDataFromOpenApiSpec

Import APIs and collections from an OpenAPI specification file.

POST /api/uploadHar

Upload a HAR (HTTP Archive) file to create or update API data in Akto.

POST /api/importSwaggerLogs

Approve and ingest a Swagger/OpenAPI file upload by pushing approved records to the API inventory via Kafka.

POST /api/importImpervaSchema

Parse an Imperva JSON schema and push the traffic asynchronously to the API inventory via Kafka.

POST /api/importFromUrl

Create an API collection by firing an HTTP request to the given URL and ingesting the response asynchronously.

POST /api/addOrUpdatePostmanCred

Save or update the Postman API key and workspace ID for the current account.

POST /api/createPostmanApi

Build an OpenAPI spec from a collection and export it to the Postman API asynchronously.

POST /api/savePostmanCollection

Fetch a specified Postman collection via the stored API key, convert it, and store it in Akto.

POST /api/ingestPostman

Approve and ingest a Postman file upload by pushing approved records to the API inventory via Kafka.

POST /api/deletePostmanImportLogs

Mark a Postman upload record for deletion so it is excluded from future import log listings.

/api/addApisToCustomCollection

post
Header parameters
x-api-keystringRequired

You can get this from Settings > Integrations > Akto APls > Generate token

Example: API_KEY
Body
collectionNamestringRequiredExample: Medium Risk APIs
Responses
200

description

application/json
post
/api/addApisToCustomCollection
200

description

/api/saveEndpointDescription

post
Header parameters
x-api-keystringRequired

You can get this from Settings > Integrations > Akto APls > Generate token

Example: API_KEY
Body
methodstringRequiredExample: GET
descriptionstringRequiredExample: ldklewmldk
apiCollectionIdinteger · int32RequiredExample: 1111111111
urlstringRequiredExample: https://vulnerable-server.akto.io/api/college/revenue/32483
Responses
200

description

application/json
post
/api/saveEndpointDescription
200

description

/api/updateEnvType

post
Header parameters
x-api-keystringRequired

You can get this from Settings > Integrations > Akto APls > Generate token

Example: API_KEY
Body
resetEnvTypesbooleanRequiredExample: false
apiCollectionIdsinteger · int32[]RequiredExample: 1756885433
Responses
200

description

application/json
post
/api/updateEnvType
200

description

/api/toggleCollectionsOutOfTestScope

post
Header parameters
x-api-keystringRequired

You can get this from Settings > Integrations > Akto APls > Generate token

Example: API_KEY
Body
currentIsOutOfTestingScopeValbooleanRequiredExample: false
apiCollectionIdsinteger · int32[]RequiredExample: 1111111111
Responses
200

description

application/json
post
/api/toggleCollectionsOutOfTestScope
200

description

/api/uploadHar

post
Header parameters
x-api-keystringRequired

You can get this from Settings > Integrations > Akto APls > Generate token

Example: API_KEY
Body
skipKafkastringRequiredExample: false
harStringstringRequiredExample: { "log": { "version": "1.2", "creator": { "name": "ChatGPT HAR Generator", "version": "1.0" }, "entries": [ { "startedDateTime": "2025-05-12T10:00:00.000Z", "time": 120, "request": { "method": "GET", "url": "https://example.com/api/data", "httpVersion": "HTTP/1.1", "headers": [ { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "HAR-Demo/1.0" } ], "queryString": [], "headersSize": 150, "bodySize": 0 }, "response": { "status": 200, "statusText": "OK", "httpVersion": "HTTP/1.1", "headers": [ { "name": "Content-Type", "value": "application/json" } ], "content": { "size": 74, "mimeType": "application/json", "text": "{\"id\":123,\"name\":\"Test Item\",\"description\":\"Sample data for HAR\"}" }, "redirectURL": "", "headersSize": 160, "bodySize": 74 }, "timings": { "send": 20, "wait": 80, "receive": 20 } } ] } }
hsFilestringRequiredExample: { "log": { "version": "1.2", "creator": { "name": "ChatGPT HAR Generator", "version": "1.0" }, "entries": [ { "startedDateTime": "2025-05-12T10:00:00.000Z", "time": 120, "request": { "method": "GET", "url": "https://example.com/api/data", "httpVersion": "HTTP/1.1", "headers": [ { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "HAR-Demo/1.0" } ], "queryString": [], "headersSize": 150, "bodySize": 0 }, "response": { "status": 200, "statusText": "OK", "httpVersion": "HTTP/1.1", "headers": [ { "name": "Content-Type", "value": "application/json" } ], "content": { "size": 74, "mimeType": "application/json", "text": "{\"id\":123,\"name\":\"Test Item\",\"description\":\"Sample data for HAR\"}" }, "redirectURL": "", "headersSize": 160, "bodySize": 74 }, "timings": { "send": 20, "wait": 80, "receive": 20 } } ] } }
apiCollectionIdinteger · int32RequiredExample: 1756891710
Responses
200

description

application/json
post
/api/uploadHar
200

description

/api/deleteMultipleCollections

post
Header parameters
x-api-keystringRequired

You can get this from Settings > Integrations > Akto APls > Generate token

Example: API_KEY
Body
Responses
200

description

application/json
post
/api/deleteMultipleCollections
200

description

/api/saveCollectionDescription

post
Header parameters
x-api-keystringRequired

You can get this from Settings > Integrations > Akto APls > Generate token

Example: API_KEY
Body
descriptionstringRequiredExample: mlewmdmweldmew
apiCollectionIdinteger · int32RequiredExample: 1111111111
Responses
200

description

application/json
post
/api/saveCollectionDescription
200

description

/api/loadSensitiveParameters

post
Header parameters
x-api-keystringRequired

You can get this from Settings > Integrations > Akto APls > Generate token

Example: API_KEY
Body
apiCollectionIdinteger · int32RequiredExample: 1111111111
Responses
200

description

application/json
post
/api/loadSensitiveParameters
200

description

/api/loadParamsOfEndpoint

post
Header parameters
x-api-keystringRequired

You can get this from Settings > Integrations > Akto APls > Generate token

Example: API_KEY
Body
methodstringRequiredExample: GET
apiCollectionIdinteger · int32RequiredExample: 1111111111
urlstringRequiredExample: https://vulnerable-server.akto.io/api/college/revenue/32483
Responses
200

description

application/json
post
/api/loadParamsOfEndpoint
200

description

/api/createCollection

post
Header parameters
x-api-keystringRequired

You can get this from Settings > Integrations > Akto APls > Generate token

Example: API_KEY
Body
collectionNamestringRequiredExample: kmlkm
Responses
200

description

application/json
post
/api/createCollection
200

description

/api/redactCollection

post
Header parameters
x-api-keystringRequired

You can get this from Settings > Integrations > Akto APls > Generate token

Example: API_KEY
Body
redactedbooleanRequiredExample: true
apiCollectionIdinteger · int32RequiredExample: 1111111111
Responses
200

description

application/json
post
/api/redactCollection
200

description

/api/importDataFromOpenApiSpec

post
Header parameters
x-api-keystringRequired

You can get this from Settings > Integrations > Akto APls > Generate token

Example: API_KEY
Body
openAPIStringstringRequiredExample: { "title": "Akto on akto", "steps": [ { "type": "setViewport", "width": 1290, "height": 326, "deviceScaleFactor": 1, "isMobile": false, "hasTouch": false, "timeout": 40000, "isLandscape": false }, { "type": "navigate", "url": "https://app-akto.us.auth0.com/u/login?state=hKFo2SB3UzduUmpsWnVnSnpjYmptelpkaVYydWV1QmFFTjBGQqFur3VuaXZlcnNhbC1sb2dpbqN0aWTZIFluNlEtdk9qXzVRQkVtVjFEQV90NUU4VHpuVE1adnFYo2NpZNkgY0tFNFZOVXlvTG41SnVlb25kdFY2RDlmUGJKZ1ZpajM", "assertedEvents": [ { "type": "navigation", "url": "https://app-akto.us.auth0.com/u/login?state=hKFo2SB3UzduUmpsWnVnSnpjYmptelpkaVYydWV1QmFFTjBGQqFur3VuaXZlcnNhbC1sb2dpbqN0aWTZIFluNlEtdk9qXzVRQkVtVjFEQV90NUU4VHpuVE1adnFYo2NpZNkgY0tFNFZOVXlvTG41SnVlb25kdFY2RDlmUGJKZ1ZpajM", "title": "Log in | Akto saas prod" } ] }, { "type": "keyDown", "target": "main", "timeout": 40000, "key": "Meta" }, { "type": "keyUp", "key": "Meta", "target": "main", "timeout": 40000 }, { "type": "change", "value": "bovepe1640@cavoyar.com", "selectors": [ [ "aria/Email address" ], [ "#username" ], [ "xpath///*[@id=\"username\"]" ], [ "pierce/#username" ] ], "target": "main", "timeout": 40000 }, { "type": "click", "target": "main", "selectors": [ [ "aria/Password" ], [ "#password" ], [ "xpath///*[@id=\"password\"]" ], [ "pierce/#password" ] ], "offsetY": 25, "offsetX": 140 }, { "type": "keyDown", "target": "main", "key": "Meta" }, { "type": "keyUp", "key": "Meta", "target": "main", "timeout": 40000 }, { "type": "change", "value": "Lollot@2", "selectors": [ [ "aria/Password" ], [ "#password" ], [ "xpath///*[@id=\"password\"]" ], [ "pierce/#password" ] ], "target": "main", "timeout": 40000 }, { "type": "click", "target": "main", "timeout": 40000, "selectors": [ [ "aria/Continue" ], [ "div.ca17d988b > button" ], [ "xpath//html/body/div/main/section/div/div/div/form/div[2]/button" ], [ "pierce/div.ca17d988b > button" ] ], "offsetY": 21, "offsetX": 173, "assertedEvents": [ { "type": "navigation", "url": "https://app.akto.io/dashboard/observe/inventory", "title": "" } ] } ] }
apiCollectionIdinteger · int32RequiredExample: 1111111111
Responses
200

description

application/json
post
/api/importDataFromOpenApiSpec
200

description

/api/createCustomCollection

post
Header parameters
x-api-keystringRequired

You can get this from Settings > Integrations > Akto APls > Generate token

Example: API_KEY
Body
collectionNamestringRequiredExample: k
Responses
200

description

application/json
post
/api/createCustomCollection
200

description

/api/deactivateCollections

post
Header parameters
x-api-keystringRequired

You can get this from Settings > Integrations > Akto APls > Generate token

Example: API_KEY
Body
Responses
200

description

application/json
post
/api/deactivateCollections
200

description

Approve and ingest a Swagger file upload

post

Pushes approved records from the specified Swagger/OpenAPI upload to Kafka (topic akto.api.logs) for async ingestion into the Akto API inventory. Only endpoints matching the chosen importType are included.

Source: OpenApiAction.importFile()

Body
uploadIdstringRequired

ID of the Swagger file upload to ingest.

Example: upload_abc123def456
importTypestring · enumRequired

Whether to ingest only successfully parsed endpoints (ONLY_SUCCESSFUL_APIS) or all endpoints including those with non-fatal parse errors (ALL_APIS).

Example: ONLY_SUCCESSFUL_APISPossible values:
Responses
200

Import queued successfully. Ingestion happens asynchronously via Kafka.

No content

post
/api/importSwaggerLogs

No content

Import Imperva schema

post

Parses a raw Imperva JSON string (max 10 MB), creates or finds an API collection named after the extracted hostname, and pushes the parsed traffic asynchronously to Kafka for ingestion into the API inventory. generateMultipleSamples controls whether multiple sample request/response pairs are generated per endpoint.

Source: ImpervaImportAction.execute()

Body
impervaStringstringRequired

Raw Imperva JSON string. Maximum size is 10 MB.

Example: {"services":[{"hostname":"api.example.com","traffic":[]}]}
generateMultipleSamplesbooleanOptional

If true, generates multiple sample messages per endpoint instead of just one.

Default: falseExample: false
Responses
200

Import initiated successfully.

application/json
messagestringOptional

Human-readable success message.

Example: Imperva schema imported successfully. Collection: api.example.com
actionErrorsstring[]Optional
post
/api/importImpervaSchema

Import APIs from a URL

post

Creates an API collection named after the URL's hostname (tagged as GenAI), then fires an HTTP request to the given URL asynchronously and ingests the response via Kafka. Omit requestBody to use GET; provide it to send a POST with that body. An optional testRoleId enables authenticated fetching using a pre-configured test role.

Source: AgentImportAction.importFromUrl()

Body
urlstringRequired

Full URL to fetch. The hostname is used as the collection name.

Example: https://api.example.com/openapi.json
testRoleIdstringOptional

Optional ObjectId hex of the test role to use for authentication when fetching the URL.

Example: 60a7b2c3d4e5f6a7b8c9d0e1
requestBodystringOptional

Optional POST body. If set, the URL is fetched with HTTP POST using this as the body. Omit to use GET.

Responses
200

Import initiated. Ingestion happens asynchronously.

No content

post
/api/importFromUrl

No content

Add or update Postman API key

post

Upserts the Postman credential (API key and workspace ID) for the current account in third_party_access. Used by subsequent Postman integration calls (createPostmanApi, savePostmanCollection).

Source: PostmanAction.addOrUpdateApiKey()

Body
api_keystringRequired

Postman API key.

Example: [REDACTED_POSTMAN_API_KEY]
workspace_idstringRequired

Postman workspace UUID.

Example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Responses
200

Credentials saved successfully.

No content

post
/api/addOrUpdatePostmanCred
200

Credentials saved successfully.

No content

Export a collection to Postman

post

Builds an OpenAPI spec from the stored sample data for the given collection and pushes it to the Postman API asynchronously using the API key stored via addOrUpdatePostmanCred. An optional apiInfoKeyList restricts the export to a specific subset of endpoints; if omitted, the entire collection is exported.

Source: PostmanAction.createPostmanApi()

Body
apiCollectionIdintegerRequired

ID of the API collection to export.

Example: 1234567890
Responses
200

Export queued successfully. Upload to Postman happens asynchronously.

No content

post
/api/createPostmanApi
200

Export queued successfully. Upload to Postman happens asynchronously.

No content

Import a Postman collection into Akto

post

Fetches the specified Postman collection via the stored Postman API key, converts it through Akto's Node.js conversion service, and stores the resulting APISpec document in MongoDB.

Source: PostmanAction.savePostmanCollection()

Body
postmanCollectionIdstringRequired

Postman collection UUID (found in the Postman share URL).

Example: 12345678-abcd-ef01-2345-67890abcdef0
apiCollectionIdintegerRequired

Akto collection ID to associate with the imported Postman collection.

Example: 1234567890
Responses
200

Collection imported and APISpec stored.

No content

post
/api/savePostmanCollection
200

Collection imported and APISpec stored.

No content

Approve and ingest a Postman file upload

post

Pushes approved records from the specified Postman file upload to Kafka (topic akto.api.logs) for async ingestion. Only endpoints matching the chosen importType are included.

Source: PostmanAction.importFile()

Body
uploadIdstringRequired

ID of the Postman file upload to ingest.

Example: postman_upload_xyz789
importTypestring · enumRequired

Whether to ingest only successfully parsed endpoints or all endpoints including those with non-fatal parse errors.

Example: ALL_APISPossible values:
Responses
200

Import queued successfully.

No content

post
/api/ingestPostman
200

Import queued successfully.

No content

Mark a Postman upload for deletion

post

Sets markedForDeletion: true on the specified upload record so it is excluded from future import log listings.

Source: PostmanAction.markImportForDeletion()

Body
uploadIdstringRequired

ID of the Postman upload to mark for deletion.

Example: postman_upload_xyz789
Responses
200

Upload marked for deletion.

No content

post
/api/deletePostmanImportLogs
200

Upload marked for deletion.

No content

Last updated