Skip to main content

API Overview

Rephole provides a simple REST API for code ingestion and semantic search.

Base URL​

http://localhost:3000

Endpoints Summary​

MethodEndpointDescription
GET/healthHealth check
POST/ingestions/repositoryIngest a repository
GET/jobs/job/:jobIdGet job status
POST/queries/search/:repoIdSemantic code search (full files)
POST/queries/search/:repoId/chunkSearch raw code chunks
GET/jobs/failedList failed jobs
POST/jobs/retry/:jobIdRetry a failed job
POST/jobs/retry/allRetry all failed jobs

Authentication​

Currently, Rephole does not require authentication. For production deployments, we recommend placing it behind a reverse proxy with authentication.

Request Format​

All POST endpoints accept JSON:

curl -X POST http://localhost:3000/endpoint \
-H "Content-Type: application/json" \
-d '{"key": "value"}'

Response Format​

All responses are JSON:

{
"status": "ok",
"data": { }
}

Error Responses​

Status CodeDescription
400Bad Request - Invalid parameters
404Not Found - Resource doesn't exist
500Internal Server Error

Rate Limiting​

No rate limiting is enforced by default. For production, configure rate limiting at the reverse proxy level.

Quick Examples​

Health Check​

curl http://localhost:3000/health

Ingest Repository​

curl -X POST http://localhost:3000/ingestions/repository \
-H "Content-Type: application/json" \
-d '{
"repoUrl": "https://github.com/user/repo.git",
"meta": {"team": "backend"}
}'

Search Code​

# Note: repoId is required in the URL path
curl -X POST http://localhost:3000/queries/search/repo \
-H "Content-Type: application/json" \
-d '{"prompt": "How does authentication work?", "k": 5}'