Parse Directory
Initiate parsing of a repository or directory to build Potpie’s knowledge graph. This analyzes your codebase structure, relationships, and creates the foundational data that enables AI agents to understand and work with your code.
Use Cases
- Initiate repository parsing to build knowledge graph
- Parse specific branches for version-specific analysis
- Index local repositories during development
- Parse remote public or private GitHub repositories
- Build semantic understanding of codebase structure
Request
owner/repo format (e.g., "facebook/react")"main")repo_name or repo_path must be provided. In development mode, when both are provided, repo_path takes precedence. In production, repo_path is not accepted.Response
submitted (queued for parsing), processing (parsing in progress), inferring (knowledge graph inference in progress), ready (fully parsed), or error (parse failed)Complete Workflow
Error Responses
400 Bad Request
400 Bad Request
repo_name to parse remote repositories in production. For local development, enable development mode in your environment configuration.401 Unauthorized
401 Unauthorized
500 Internal Server Error
500 Internal Server Error
- Database connection failures
- File system errors during parsing
- Memory errors with very large repositories
- Network failures when cloning remote repositories
- Third-party service unavailability
project_id for debugging assistance.Troubleshooting
Repository not accessible
Repository not accessible
- Verify the repository name uses
owner/repoformat (e.g.,"facebook/react") - Ensure the repository is public or you have access
- Check if the repository exists and hasn’t been deleted or moved
- For private repositories, ensure proper authentication
Branch doesn't exist
Branch doesn't exist
- Verify the branch name is correct (case-sensitive)
- Check that the branch exists in the repository
- Use the default branch name (usually “main” or “master”) if unsure
- List available branches in your repository to confirm the name
Parsing takes too long
Parsing takes too long
- Large repositories naturally take longer (10-30 minutes)
- Check parsing status regularly to monitor progress
- Very large monorepos may timeout — consider parsing specific directories
- Contact support if parsing exceeds 1 hour
Local path not working
Local path not working
repo_path for local repositories fails.Solution:- Local repository parsing only works in development mode
- Production environments must use
repo_namefor remote repositories - Use
repo_namewithowner/repoformat for production deployments
Authorizations
API key authentication. Get your key from potpie settings page
Body
Repository name in owner/repo format (optional if repo_path is provided)
"facebook/react"
Local filesystem path to repository (development mode only, optional if repo_name is provided)
"/path/to/local/repo"
Branch to parse (optional)
"main"
Specific commit SHA to parse (optional)
"2c3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e"

