Overview
The projects API provides full CRUD operations for managing analyzed repositories, including metadata, thumbnails, roles, and evidence.
List Projects
Get all projects, excluding soft-deleted ones.
curl http://127.0.0.1:8000/projects?limit=10&offset=0
Query Parameters:
Max results to return (min: 1)
Number of results to skip (min: 0)
Response:
[
{
"id": 1,
"project_name": "my-app",
"project_path": "/path/to/my-app",
"languages": ["Python", "JavaScript"],
"frameworks": ["FastAPI", "React"],
"first_commit": "2023-01-15T10:00:00",
"last_commit": "2024-03-05T14:30:00",
"is_collaborative": true,
"thumbnail_url": "/uploads/thumbnails/abc123.png"
}
]
Unique project identifier (RepoStat primary key)
Display name of the project
File system path to the project repository
Programming languages detected in the project
Frameworks detected in the project
Timestamp of the first commit in the repository
Timestamp of the most recent commit
Whether the project has multiple contributors
URL to the project thumbnail image
Get Project Details
Retrieve a single project with related skills, resume items, and evidence.
GET /projects/{project_id}
curl http://127.0.0.1:8000/projects/1
Path Parameters:
Response:
{
"id": 1,
"project_name": "my-app",
"project_path": "/path/to/my-app",
"languages": ["Python", "JavaScript"],
"frameworks": ["FastAPI", "React"],
"first_commit": "2023-01-15T10:00:00",
"last_commit": "2024-03-05T14:30:00",
"is_collaborative": true,
"total_commits": 342,
"primary_language": "Python",
"ranking_score": 85.5,
"health_score": 92.0,
"role": "Lead Developer",
"thumbnail_url": "/uploads/thumbnails/abc123.png",
"skills": [
{
"skill_name": "Python",
"category": "Programming Languages",
"proficiency": 0.9
}
],
"resume_items": [
{
"id": 1,
"title": "Built REST API",
"content": "Developed FastAPI backend...",
"category": "Backend Development"
}
],
"evidence": [
{
"id": 1,
"type": "metric",
"content": "Improved test coverage to 95%",
"source": "pytest",
"date": "2024-03-01",
"project_id": 1
}
]
}
Skills demonstrated in this projectShow ProjectSkillItem properties
Skill category (e.g., “Programming Languages”)
Proficiency level (0.0-1.0)
Resume items generated for this projectShow ProjectResumeItem properties
Resume item content/description
Evidence of success for this projectShow EvidenceResponse properties
Evidence type: metric, feedback, evaluation, award, custom, testing, documentation, code_quality, test_coverage
Evidence content/description
Set Project Thumbnail
Upload or set a thumbnail image for a project.
POST /projects/{project_id}/thumbnail
Path Parameters:
Request Body (Form Data):
Image file to upload (PNG or JPG, max 5 MB). Use this OR thumbnail_url, not both
External URL to use as thumbnail. Use this OR file, not both
Response:
{
"project_id": 1,
"project_name": "my-app",
"thumbnail_url": "/uploads/thumbnails/abc123def456.png"
}
Errors:
422 - Must provide exactly one of file or thumbnail_url
422 - Only PNG and JPG images are allowed
413 - Thumbnail exceeds 5 MB size limit
404 - Project not found
Set Project Role
Define your role in a project.
PUT /projects/{project_id}/role
curl -X PUT http://127.0.0.1:8000/projects/1/role \
-H "Content-Type: application/json" \
-d '{"role": "Lead Developer"}'
Path Parameters:
Request Body:
Your role in this project (e.g., “Lead Developer”, “Contributor”). Max 120 characters
Response:
{
"project_id": 1,
"project_name": "my-app",
"role": "Lead Developer"
}
Create Evidence
Add evidence of success to a project.
POST /projects/{project_id}/evidence
curl -X POST http://127.0.0.1:8000/projects/1/evidence \
-H "Content-Type: application/json" \
-d '{
"type": "metric",
"content": "Reduced API response time by 40%",
"source": "Performance testing",
"date": "2024-03-01"
}'
Path Parameters:
Project ID to add evidence to
Request Body:
Evidence type: metric, feedback, evaluation, award, custom, testing, documentation, code_quality, test_coverage
Description of the evidence (min 1 character)
Date of the evidence (YYYY-MM-DD)
Response:
{
"id": 1,
"type": "metric",
"content": "Reduced API response time by 40%",
"source": "Performance testing",
"date": "2024-03-01",
"project_id": 1
}
List Evidence
Get all evidence for a project with optional type filter.
GET /projects/{project_id}/evidence?type=metric
curl http://127.0.0.1:8000/projects/1/evidence?type=metric
Query Parameters:
Response:
[
{
"id": 1,
"type": "metric",
"content": "Reduced API response time by 40%",
"source": "Performance testing",
"date": "2024-03-01",
"project_id": 1
}
]
Delete Evidence
Remove an evidence item from a project.
DELETE /projects/{project_id}/evidence/{evidence_id}
curl -X DELETE http://127.0.0.1:8000/projects/1/evidence/5
Response:
{
"success": true,
"deleted_id": 5
}
Delete Project
Soft-delete a project (sets deleted_at timestamp).
DELETE /projects/{project_id}
curl -X DELETE http://127.0.0.1:8000/projects/1
Response:
{
"success": true,
"message": "Project 'my-app' deleted successfully",
"deleted_id": 1
}
Soft deletion preserves the project in the database but excludes it from queries. Related skills, resume items, and evidence are preserved.
Get Project Timeline
Retrieve project activity windows with optional filtering.
GET /projects/timeline?active_only=true
curl "http://127.0.0.1:8000/projects/timeline?active_only=true"
Query Parameters:
Filter projects starting after this date (YYYY-MM-DD)
Filter projects starting before this date (YYYY-MM-DD)
Only show projects active in the last 6 months
Response:
[
{
"id": 1,
"project_name": "my-app",
"first_commit": "2023-01-15T10:00:00",
"last_commit": "2024-03-05T14:30:00",
"duration_days": 415,
"was_active": true
}
]
Get Project Ranking
Rank projects by user contribution percentage.
curl "http://127.0.0.1:8000/projects/ranking?projects_dir=/path/to/projects&[email protected]"
Query Parameters:
Directory containing projects to rank
Email to filter user contributions
Response:
[
{
"name": "my-app",
"score": 85.5,
"total_commits": 342,
"user_commits": 292
}
]