A Collection represents the source of your API endpoints and acts as the starting point for both unauthenticated and authenticated API scans. You can use it to scan public (unauthenticated) APIs right away, or later configure authentication for APIs that require it.
Here’s how you can create a collection in ZeroThreat.
First, you need to create a Target that defines the base URL of your API and sets the scan type.
https://api.example.com
).Once your target is set up:
ZeroThreat offers four options for importing your API collection:
Source Type | Description |
---|---|
Swagger File / URL | Upload a Swagger file or provide a public Swagger URL. |
OpenAPI File | Upload an OpenAPI (OAS) YAML or JSON file. |
Postman API | Import directly from a Postman collection. |
HAR File | Upload a HAR (HTTP Archive) file from captured API traffic. |
In this example, let’s choose the Swagger Source method:
ZeroThreat will only display endpoints that fall within your defined Target URL scope. This ensures scans are limited to assets you own and control.
Once the API specification is parsed, click the View Collection () button to see and review all the extracted API endpoints.
ZeroThreat highlight any endpoints that have missing or empty request bodies, these are commonly found in incomplete API specs. These endpoints will be marked with a Payload Unmapped ( ) symbol to help you identify them.
While filling body for such API's is not mandatory to start a scan, it’s highly recommended. Providing sample data in request bodies helps ZeroThreat interact more accurately with your APIs, leading to more effective testing.
(Optional Step) Map Missing Payloads
Click any endpoint marked with the Payload Unmapped () icon and provide sample request body data where needed.
You can also hover over the Collection Analysis () button to get an overview of how many endpoints were parsed, and how many of them are missing request bodies.
Once you're done reviewing and configuring the endpoints, click Save.
Your collection is now ready to use. You can proceed to run an Unauthenticated API Scan or, if your APIs require authentication, configure API Authentication settings for this collection.
Ready to scan? Continue to Unauthenticated API Scan. Your APIs need authentication to access? Learn how to set up Authenticated API Scans.