Skip to main content

Overview

The resume API generates resume items by analyzing your project contributions and extracting demonstrable insights. Resume items are stored as ProjectEvidence records linked to projects.

Get Resume Items

Retrieve all resume items, sorted by project recency.
GET /resume
curl http://127.0.0.1:8000/resume?project_id=1
Query Parameters:
project_id
integer
Filter resume items by project (repo_stat_id). Omit to get items from all projects
Response:
[
  {
    "id": 1,
    "title": "Built REST API with FastAPI",
    "content": "Developed a scalable REST API using FastAPI with SQLAlchemy ORM, serving 10k+ requests/day",
    "category": "Backend Development",
    "project_name": "my-app",
    "role": "Lead Developer",
    "created_at": "2024-03-05T10:00:00"
  }
]
id
integer
Resume item ID
title
string
Resume item title/headline
content
string
Detailed description of the accomplishment
category
string
Category (e.g., “Backend Development”, “DevOps”)
project_name
string
Associated project name
role
string
Your role in the project
created_at
datetime
When the resume item was created
Resume items are sorted by project’s last commit (newest first) to prioritize recent work.

Get Single Resume Item

Retrieve a specific resume item by ID.
GET /resume/{resume_id}
curl http://127.0.0.1:8000/resume/1
Path Parameters:
resume_id
integer
required
Resume item ID to retrieve
Response:
{
  "id": 1,
  "title": "Built REST API with FastAPI",
  "content": "Developed a scalable REST API...",
  "category": "Backend Development",
  "project_name": "my-app",
  "created_at": "2024-03-05T10:00:00"
}
Errors:
  • 404 - Resume item not found or associated project is deleted

Generate Resume Items

Generate resume items for selected projects using AI analysis.
POST /resume/generate
curl -X POST http://127.0.0.1:8000/resume/generate \
  -H "Content-Type: application/json" \
  -d '{
    "project_ids": [1, 2, 3],
    "regenerate": false
  }'
Request Body:
project_ids
array
required
List of project IDs (repo_stat IDs) to generate resume items for. Must contain at least one ID
regenerate
boolean
default:"false"
If true, delete existing ProjectEvidence and legacy ResumeItem rows before regenerating
Response:
{
  "success": true,
  "items_generated": 24,
  "resume_items": [],
  "consent_level": "local",
  "errors": [],
  "warnings": [
    "Could not collect additions for project-x: No commits found"
  ]
}
success
boolean
true if generation completed without critical errors
items_generated
integer
Total number of evidence items created (not resume items)
resume_items
array
Always empty list. Insights are stored as ProjectEvidence, not ResumeItem rows
Consent level used for generation: full, no_llm, or none
errors
array
List of critical errors encountered during generation
warnings
array
List of non-critical warnings (e.g., git metadata collection failures)

Success Semantics

Important: This endpoint persists insights as ProjectEvidence rows, not ResumeItem rows. The success field indicates whether generation completed without critical errors, not whether the resume_items list is non-empty.
  • success=true: All projects were processed without errors
  • success=false: One or more projects encountered critical errors
  • items_generated: Count of evidence items created
  • resume_items: Always empty (insights stored as ProjectEvidence)

How to Get Project IDs

Project IDs are the database primary keys for RepoStat entries:
  1. List all projects: GET /projects returns all projects with IDs
  2. Get specific project: GET /projects/{project_id} returns details
  3. After analysis: POST /analyze/{zip_id} response includes project IDs
Example workflow:
import requests

BASE_URL = 'http://127.0.0.1:8000'

# Step 1: Get all projects
projects = requests.get(f'{BASE_URL}/projects').json()
project_ids = [p['id'] for p in projects[:3]]  # Top 3 projects

# Step 2: Generate resume items
response = requests.post(
    f'{BASE_URL}/resume/generate',
    json={'project_ids': project_ids, 'regenerate': False}
)

result = response.json()
print(f"Generated {result['items_generated']} evidence items")
if result['errors']:
    print(f"Errors: {result['errors']}")
Errors:
  • 400 - User email not configured
  • 404 - One or more project IDs not found or deleted
  • 500 - Database commit failed

Edit Resume Item

Update a resume item’s title, content, and/or category.
POST /resume/{resume_id}/edit
curl -X POST http://127.0.0.1:8000/resume/1/edit \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Built Scalable REST API",
    "content": "Developed a high-performance REST API...",
    "category": "Backend Engineering"
  }'
Path Parameters:
resume_id
integer
required
Resume item ID to edit
Request Body:
title
string
New title for the resume item (min 1 character)
content
string
New content for the resume item (min 1 character)
category
string
New category for the resume item (min 1 character)
At least one field (title, content, or category) must be provided. Partial updates are supported.
Response:
{
  "id": 1,
  "title": "Built Scalable REST API",
  "content": "Developed a high-performance REST API...",
  "category": "Backend Engineering",
  "project_name": "my-app",
  "role": "Lead Developer",
  "created_at": "2024-03-05T10:00:00"
}
Errors:
  • 404 - Resume item not found or associated project is deleted
  • 422 - No fields provided or validation error
  • 500 - Database update failed

Generation Process

When you call POST /resume/generate, the following happens:
  1. Validation: Verify all project IDs exist and are not soft-deleted
  2. User Context: Retrieve user email and consent level
  3. For Each Project:
    • Optionally delete existing evidence/resume items (if regenerate=true)
    • Collect user contributions from git history
    • Run DeepRepoAnalyzer to extract skills and insights
    • Persist insights as ProjectEvidence (not ResumeItem)
  4. Response: Return generation results with evidence count

Regeneration

When regenerate=true:
  • Deletes existing ProjectEvidence rows for the project
  • Deletes legacy ResumeItem rows for the project
  • Re-analyzes the project from scratch
  • Useful for updating insights after code changes
Regeneration permanently deletes existing evidence and resume items. This cannot be undone.

Example: Complete Resume Workflow

import requests

BASE_URL = 'http://127.0.0.1:8000'

# Step 1: Upload and analyze projects
with open('projects.zip', 'rb') as f:
    upload = requests.post(f'{BASE_URL}/zip/upload', files={'file': f}).json()
    zip_id = upload['zip_id']

analysis = requests.post(f'{BASE_URL}/analyze/{zip_id}').json()
project_ids = [r['project_path'] for r in analysis['repos_analyzed'] if not r.get('error')]

# Step 2: Get actual project IDs from database
projects = requests.get(f'{BASE_URL}/projects').json()
project_ids = [p['id'] for p in projects[:5]]  # Top 5 projects

# Step 3: Generate resume items
generation = requests.post(
    f'{BASE_URL}/resume/generate',
    json={'project_ids': project_ids, 'regenerate': False}
).json()

print(f"Success: {generation['success']}")
print(f"Evidence items: {generation['items_generated']}")

# Step 4: Retrieve and review resume items
resume_items = requests.get(f'{BASE_URL}/resume').json()

for item in resume_items[:3]:
    print(f"\n{item['title']}")
    print(f"  Project: {item['project_name']}")
    print(f"  {item['content'][:100]}...")

# Step 5: Edit a resume item
if resume_items:
    item_id = resume_items[0]['id']
    updated = requests.post(
        f'{BASE_URL}/resume/{item_id}/edit',
        json={'title': 'Enhanced API Performance'}
    ).json()
    print(f"\nUpdated: {updated['title']}")

Build docs developers (and LLMs) love