π API Endpoints
The SecTrail CM API provides various endpoints to automate your certificate management operations. For detailed documentation of all endpoints, you can use the Swagger interface:
https://your-sectrailcm-server/documentation
Primary Use Casesβ
1. Certificate Signingβ
You can perform certificate signing operations in various formats through the API:
Supported Signing Types:
- CSR (Certificate Signing Request) signing
- Self-Signed certificate creation
- Template-based certificate generation
- JKS (Java KeyStore) format certificate creation
Endpoint:
POST /api/generate
For certificate signing operations, the operation type is determined using the requestType parameter. Please review the Swagger documentation for a detailed parameter list.
2. Certificate Upload and Distributionβ
You can automatically distribute your certificates to target servers and devices through the API:
Features:
- Distribution to multiple target devices (F5, Apache, Nginx, IIS, etc.)
- Virtual host-based distribution
- Scheduled distribution support
- Retry mechanism for failed distributions
- Distribution status querying and monitoring
Endpoint:
POST /api/deployment
3. Discovery List Managementβ
You can manage your discovery lists in bulk through the API:
Features:
- Discovery list creation
- Bulk domain/IP addition
- Querying discovery results
- Scheduling discovery plans
Endpoint:
POST /api/discoverList
4. Certificate Inventoryβ
You can query certificates in the inventory and retrieve their information:
Features:
- Retrieving bulk certificate list
- Viewing certificate details
- Querying certificate status
Endpoint:
POST /api/getCertificates
API Usage Examplesβ
Authenticationβ
You must use an authentication token in all API requests:
curl -X POST https://your-sectrailcm-server/api/endpoint \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"key": "value"}'
Error Handlingβ
The API uses standard HTTP status codes:
200 OK- Request successful201 Created- Resource created400 Bad Request- Invalid request401 Unauthorized- Authentication error403 Forbidden- Authorization error404 Not Found- Resource not found500 Internal Server Error- Server error
Swagger Documentationβ
Use the Swagger interface for detailed descriptions of all endpoints, parameter definitions, and example request/response structures:
https://your-sectrailcm-server/documentation
Through the Swagger interface, you can:
- Explore all endpoints
- View request/response schemas
- Test API calls interactively
You can use the "Try it out" feature in the Swagger documentation to test your API calls directly and see the results.