Getting Started
This guide walks you through running your first scan with API Scanning.
Prerequisites
Before you begin, you need:
- A Detectify account with API Scanning enabled. To get access, contact support@detectify.com
- An API definition for your target (see supported formats below)
- Authentication credentials for your API (if applicable)
- The server addresses in your API definition added and verified as assets in Detectify. See Asset Verification
Step 1: Prepare Your API Definition
REST APIs
Prepare your OpenAPI specification file. Supported formats:
| Format | Supported |
|---|---|
| OpenAPI v2 (Swagger) | Yes |
| OpenAPI v3.0 | Yes |
| OpenAPI v3.1 | Yes |
JSON format (.json) | Yes |
YAML format (.yaml, .yml) | Yes |
| Postman collections and HAR files | No |
The file must define at least one server address: in the servers field for OpenAPI v3, or in host for OpenAPI v2 (Swagger).
For the best scan coverage, your spec should:
- Define all endpoints you want tested. Only endpoints present in the spec are scanned.
- Use accurate default values. Detectify pre-fills parameter fields with the default values in your file. Without valid parameter values, the scanner can’t make working API calls, which significantly reduces what the scan can find.
If you do not have an OpenAPI spec, many API frameworks can generate one automatically (for example, FastAPI, Spring Boot with Springdoc, or Express with swagger-jsdoc).
GraphQL APIs
Export your GraphQL schema definition file from your framework (for example, Apollo Server, graphql-java, Strawberry, or the graphql-codegen CLI). Supported file formats: .graphql, .gql, .json, and .txt. Only queries and mutations can be tested.
Step 2: Create a Scan Profile
- Navigate to API Scanning in the Detectify dashboard.
- Click Create API Scan Profile.
- Select your API type: REST (OpenAPI) or GraphQL.
- Upload your OpenAPI spec or GraphQL schema file (10 MB maximum).
- Detectify parses the definition. If there are parsing errors, you will see a summary of issues. See Troubleshooting for common parsing issues.
If any server address in your file is an asset you haven’t verified, you’re asked to add and verify it before you can continue. You can only scan the server addresses in the file.
Step 3: Scan Profile Details
Enter a Profile name and choose the server address to scan. For GraphQL, choose the Domain to scan and enter the full Server URL, including subdomain and path if required. You can also set a Rate Limit (see Configuration).
Scan every 3 days (Starting now) is on by default.
Step 4: Configure Authentication
If your API requires authentication, configure it so the scanner can access protected endpoints. See Configuration for setup details.
Without working API calls, including valid authentication, the scanner can only look for shallow security issues and you don’t get full coverage.
Step 5: Custom Headers
Optionally, add custom headers to include in all API requests for this profile.
Step 6: Operations
Choose which operations to include in the scan. For GraphQL APIs, select the queries and mutations and provide sample values for their arguments. Parameter fields are pre-filled with the default values from your file; set them to values that work for your API.
Use Test operation to send a single request and check that your configuration, including server address, authentication and parameter values, produces a working API call. You can do this when creating or editing a scan profile.
Step 7: Save and Run Your First Scan
- Click Save profile.
- With Scan every 3 days (Starting now) on, the first scan starts right away. Otherwise, click Scan once on the API Scanning page.
- The scan begins sending payloads to your API endpoints. See Configuration for factors that affect scan duration.
While a scan runs, its Scan once button shows Ongoing. When it finishes, the Last scan status column shows Success, With warnings or Failed.
Step 8: Review Results
Once the scan completes, review its outcome in the table on the API Scanning page. The link in Open vulnerabilities takes you to the findings on the Vulnerabilities page, and Vulnerabilities tested for lists every vulnerability the scan tested for. For each vulnerability found, Detectify provides:
- The affected endpoint and parameter
- Severity level (Critical, High, Medium, Low, or Information)
- A description of the vulnerability
- The exact request and response that confirmed the issue
- Remediation guidance
See Results & Remediation for a detailed guide on interpreting your findings.
Next Steps
- Configure scheduling to run scans automatically
- Review coverage to understand what vulnerability types are tested
- Set up integrations to route findings to Jira, Slack, or other tools