Base URL: http://localhost:8080 (development)
Version: 1.0.0
- Authentication
- Services API
- Deployments API
- Infrastructure API
- Teams API
- Platform Stats API
- Error Handling
Status: Not yet implemented
Future versions will include authentication via:
- JWT tokens
- API keys for programmatic access
Manage platform services and applications.
GET /api/servicesQuery Parameters:
| Parameter | Type | Description |
|---|---|---|
status |
string | Filter by status: active, inactive, deploying, failed |
template |
string | Filter by template: api, frontend, worker, database |
team_id |
UUID | Filter by team ID |
Example Request:
curl http://localhost:8080/api/services?status=activeExample Response:
{
"success": true,
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "user-api",
"template": "api",
"owner": "john.doe@example.com",
"team_id": "660e8400-e29b-41d4-a716-446655440000",
"github_url": "https://github.com/company/user-api",
"status": "active",
"description": "User management API service",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
]
}GET /api/services/:idPath Parameters:
| Parameter | Type | Description |
|---|---|---|
id |
UUID | Service ID |
Example Request:
curl http://localhost:8080/api/services/550e8400-e29b-41d4-a716-446655440000POST /api/servicesRequest Body:
{
"name": "user-api",
"template": "api",
"owner": "john.doe@example.com",
"team_id": "660e8400-e29b-41d4-a716-446655440000",
"github_url": "https://github.com/company/user-api",
"description": "User management API service"
}Validation Rules:
name: Required, 1-255 characterstemplate: Required, must be one of:api,frontend,worker,databaseowner: Required, valid email addressteam_id: Required, valid UUIDgithub_url: Optional, valid URLdescription: Optional, max 500 characters
Example Request:
curl -X POST http://localhost:8080/api/services \
-H "Content-Type: application/json" \
-d '{
"name": "user-api",
"template": "api",
"owner": "john.doe@example.com",
"team_id": "660e8400-e29b-41d4-a716-446655440000"
}'PUT /api/services/:idRequest Body:
{
"name": "user-api-v2",
"status": "active",
"github_url": "https://github.com/company/user-api-v2",
"description": "Updated user management API"
}Note: All fields are optional in updates.
DELETE /api/services/:idTrack service deployments across environments.
GET /api/deploymentsQuery Parameters:
| Parameter | Type | Description |
|---|---|---|
service_id |
UUID | Filter by service |
environment |
string | Filter by environment: development, staging, production |
status |
string | Filter by status: running, stopped, deploying, failed |
limit |
integer | Limit results (1-100) |
offset |
integer | Offset for pagination |
Example Request:
curl http://localhost:8080/api/deployments?environment=production&limit=10Example Response:
{
"success": true,
"data": [
{
"id": "770e8400-e29b-41d4-a716-446655440000",
"service_id": "550e8400-e29b-41d4-a716-446655440000",
"service_name": "user-api",
"environment": "production",
"aws_region": "us-east-1",
"status": "running",
"cost_estimate": 125.50,
"deployed_by": "john.doe@example.com",
"deployed_at": "2024-01-20T14:30:00Z",
"resources": {
"ec2": ["i-1234567890abcdef0"],
"rds": ["mydb-instance"]
},
"created_at": "2024-01-20T14:30:00Z",
"updated_at": "2024-01-20T14:30:00Z"
}
]
}GET /api/deployments/:idPOST /api/deploymentsRequest Body:
{
"service_id": "550e8400-e29b-41d4-a716-446655440000",
"environment": "production",
"aws_region": "us-east-1",
"status": "deploying",
"cost_estimate": 125.50,
"deployed_by": "john.doe@example.com",
"resources": {
"ec2": ["i-1234567890abcdef0"]
}
}Validation Rules:
service_id: Required, valid UUIDenvironment: Required, must be:development,staging, orproductionaws_region: Required, valid AWS region format (e.g.,us-east-1)status: Required, must be:running,stopped,deploying, orfailedcost_estimate: Optional, non-negative numberdeployed_by: Required, valid emailresources: Optional, JSON object
DELETE /api/deployments/:idManage AWS infrastructure resources.
GET /api/infrastructureQuery Parameters:
| Parameter | Type | Description |
|---|---|---|
service_id |
UUID | Filter by service |
resource_type |
string | Filter by type: ec2, rds, vpc, s3, lambda, cloudfront, elb |
status |
string | Filter by status: running, stopped, terminated, pending |
aws_region |
string | Filter by AWS region |
Example Request:
curl http://localhost:8080/api/infrastructure?resource_type=ec2&status=runningExample Response:
{
"success": true,
"data": [
{
"id": "880e8400-e29b-41d4-a716-446655440000",
"service_id": "550e8400-e29b-41d4-a716-446655440000",
"service_name": "user-api",
"resource_type": "ec2",
"aws_id": "i-1234567890abcdef0",
"aws_region": "us-east-1",
"status": "running",
"cost_per_month": 75.00,
"metadata": {
"instance_type": "t3.medium",
"availability_zone": "us-east-1a"
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
]
}GET /api/infrastructure/:idPOST /api/infrastructureRequest Body:
{
"service_id": "550e8400-e29b-41d4-a716-446655440000",
"resource_type": "ec2",
"aws_id": "i-1234567890abcdef0",
"aws_region": "us-east-1",
"status": "running",
"cost_per_month": 75.00,
"metadata": {
"instance_type": "t3.medium"
}
}Validation Rules:
service_id: Required, valid UUIDresource_type: Required, must be one of:ec2,rds,vpc,s3,lambda,cloudfront,elbaws_id: Required, stringaws_region: Required, valid AWS region formatstatus: Required, must be:running,stopped, orterminatedcost_per_month: Required, non-negative numbermetadata: Optional, JSON object
GET /api/infrastructure/costsExample Response:
{
"success": true,
"data": {
"total_monthly_cost": 450.00,
"by_service": [
{
"service_name": "user-api",
"cost": 175.00
},
{
"service_name": "payment-service",
"cost": 275.00
}
],
"by_resource_type": [
{
"resource_type": "ec2",
"cost": 250.00
},
{
"resource_type": "rds",
"cost": 200.00
}
],
"by_team": [
{
"team_name": "Backend Team",
"cost": 300.00
}
]
}
}DELETE /api/infrastructure/:idManage development teams.
GET /api/teamsExample Response:
{
"success": true,
"data": [
{
"id": "660e8400-e29b-41d4-a716-446655440000",
"name": "Backend Team",
"description": "Handles all backend services",
"owner": "team-lead@example.com",
"members": [
"dev1@example.com",
"dev2@example.com"
],
"slack_channel": "#backend-team",
"created_at": "2024-01-10T09:00:00Z",
"updated_at": "2024-01-10T09:00:00Z"
}
]
}GET /api/teams/:idPOST /api/teamsRequest Body:
{
"name": "Backend Team",
"description": "Handles all backend services",
"owner": "team-lead@example.com",
"members": ["dev1@example.com"],
"slack_channel": "#backend-team"
}Validation Rules:
name: Required, 1-255 charactersowner: Required, valid emaildescription: Optional, max 500 charactersmembers: Optional, array of email stringsslack_channel: Optional, string
PUT /api/teams/:idDELETE /api/teams/:idGET /api/teams/:id/servicesReturns all services owned by the team.
Get dashboard statistics and metrics.
GET /api/platform/statsExample Response:
{
"success": true,
"data": {
"totalServices": 12,
"servicesChange": 5.5,
"activeDeployments": 8,
"deploymentsChange": 10.2,
"monthlyAwsCost": 1250.00,
"costChange": -3.5,
"totalTeams": 4,
"teamsChange": 0
}
}Response Fields:
totalServices: Total number of servicesservicesChange: Percentage change vs. last monthactiveDeployments: Number of running deploymentsdeploymentsChange: Percentage change vs. last monthmonthlyAwsCost: Total AWS costs (USD)costChange: Percentage change vs. last monthtotalTeams: Number of teamsteamsChange: Percentage change vs. last month
All errors follow this structure:
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed for the request",
"details": [
{
"field": "email",
"message": "Must be a valid email address"
}
]
}
}| Code | Meaning |
|---|---|
200 |
Success |
201 |
Created successfully |
400 |
Bad Request (validation error) |
404 |
Not Found |
500 |
Internal Server Error |
| Code | Description |
|---|---|
VALIDATION_ERROR |
Request validation failed |
NOT_FOUND |
Resource not found |
DATABASE_ERROR |
Database operation failed |
INTERNAL_ERROR |
Unexpected server error |
Status: Not yet implemented
Future versions will include rate limiting:
- 100 requests per minute per IP
- Authenticated users: 1000 requests per minute
For endpoints that return lists, use:
GET /api/services?limit=20&offset=40limit: Number of items per page (default: 50, max: 100)offset: Number of items to skip
Response includes total count:
{
"success": true,
"data": [...],
"pagination": {
"total": 150,
"limit": 20,
"offset": 40
}
}- Initial API release
- Services, Deployments, Infrastructure, Teams endpoints
- Platform statistics
- Cost tracking
- GitHub Issues: github.com/GoddeyUwamari/devcontrol/issues
- Email: projectmanager@wayuptechn.com
- Documentation: Check
/docsfolder for additional guides
Happy Building! 🚀