API Reference
This section provides detailed information about the CovertScript API.
Authentication
All API requests require authentication using an API key:
curl -H "Authorization: Bearer YOUR_API_KEY" https://api.covertscript.com/v1/endpoint
Endpoints
Scripts
GET /v1/scripts
- List all scriptsPOST /v1/scripts
- Create a new scriptGET /v1/scripts/{id}
- Get script detailsPUT /v1/scripts/{id}
- Update a scriptDELETE /v1/scripts/{id}
- Delete a script
Execution
POST /v1/scripts/{id}/execute
- Execute a scriptGET /v1/executions/{id}
- Get execution statusGET /v1/executions/{id}/logs
- Get execution logs
Templates
GET /v1/templates
- List all templatesPOST /v1/templates
- Create a new templateGET /v1/templates/{id}
- Get template details
Response Format
All API responses are in JSON format:
{
"success": true,
"data": {
// Response data
},
"error": null
}
Error Handling
Errors are returned with appropriate HTTP status codes and error messages:
{
"success": false,
"data": null,
"error": {
"code": "ERROR_CODE",
"message": "Error description"
}
}