Overview
The Faction REST API provides programmatic access to all core functionality of the Faction penetration testing platform. Use the API to automate assessment workflows, manage vulnerabilities, integrate with CI/CD pipelines, and build custom integrations.Base URL
The API is accessible at:{contextPath} is your Faction server’s context path. For example:
https://faction.example.com/apihttps://your-server.com/faction/api
API Version
Current API version: 1.1.0Interactive Documentation
Faction provides interactive API documentation using Swagger/OpenAPI at:- Explore all available endpoints
- View request/response schemas
- Test API calls directly from your browser
- Download the OpenAPI specification
Response Format
All API responses use JSON format with UTF-8 encoding.Success Response
Successful operations return a 200 status code with a result object:Error Response
Errors return appropriate HTTP status codes with an error message:HTTP Status Codes
The API uses standard HTTP status codes:| Status Code | Description |
|---|---|
200 | Success - Request completed successfully |
400 | Bad Request - Invalid parameters or malformed request |
401 | Unauthorized - Authentication failed or missing API key |
404 | Not Found - Resource does not exist |
500 | Internal Server Error - Server-side error |
Error Handling
When an error occurs, the API returns:- An appropriate HTTP status code
- A JSON response with
result: "ERROR" - A descriptive
messagefield explaining the error
Common Errors
401 Not Authorized
401 Not Authorized
400 Bad Request
400 Bad Request
- Missing required parameters
- Invalid parameter format
- Resource locked (e.g., assessment in peer review)
404 Not Found
404 Not Found
- Requested resource ID does not exist
- Invalid endpoint path
Rate Limiting
Faction does not currently implement API rate limiting. However, we recommend implementing client-side throttling for bulk operations to avoid overwhelming the server.
Content Types
The API supports multiple content types depending on the endpoint:- JSON -
application/json(primary format) - Form Data -
application/x-www-form-urlencoded(for certain POST/PUT operations) - CSV -
text/csv(for bulk import/export operations)
Data Encoding
For certain fields that support rich text (descriptions, recommendations, exploit details):- Base64 encoding is used for HTML and Markdown content
- The API automatically converts Markdown to HTML
- Content is sanitized to prevent XSS attacks
Pagination
Most list endpoints currently return all matching results without pagination. For large datasets, consider using date ranges or filters to limit result sets.
Best Practices
Use HTTPS
Always use HTTPS to protect API keys and sensitive data in transit.
Handle Errors
Implement proper error handling for all API calls. Don’t assume success.
Validate Input
Validate all input data before sending to the API to avoid 400 errors.
Store Keys Securely
Never commit API keys to version control. Use environment variables or secrets management.
Next Steps
Authentication
Learn how to authenticate API requests with API keys
Assessments
Manage penetration testing assessments
Vulnerabilities
Create and track security vulnerabilities
Users
Manage user accounts and permissions
