momentum.sh
  • 💡Introduction to Momentum
    • Overview
    • How can momentum help you?
    • Why is it open source
    • Contributing to momentum
    • Troubleshooting & Feedback
  • Getting Started
    • Hers's what you will need
    • Installation
      • Cloud Integrations (Optional)
        • Portkey
        • Firebase
        • Setting up Github App
        • Enabling Github Auth on Firebase
        • Google Cloud
    • Running Momentum
    • Known bugs & fixes
  • Using Momentum
    • Underlying API structure
    • Auth
    • Logging in
    • User Registration
    • Parsing codebase
    • Getting list of all parsed projects
    • Getting list of all branches in a project
    • Listing all endpoints of a branch
    • Understanding Changes & Impacts
    • Generating Blast Radius
    • Get Flow Graph
    • Get Dependencies
    • Get More Dependencies (AI)
    • Getting code of a specific node
    • Testing your code
    • Generating a test plan
    • Setting up the test plan
    • Preferences
      • Setting preferences of a specific endpoint
      • Getting preferences for specific endpoint
    • Generating tests
  • Using Momentum CLI
Powered by GitBook
On this page

Was this helpful?

  1. Using Momentum

Parsing codebase

Reminder: The github app we created earlier will need access to the repo.

Steps to Grant Access to Repositories

  1. Go to your GitHub account.

  2. Navigate to the GitHub app installation settings.

  3. Select the app you created.

  4. Update the repository access permission to repository you want to parse.

POST /parse

This endpoint allows you to parse the codebases that the GitHub app has access to. Ensure the app has the necessary permissions to access the repositories you want to parse. You can update the app's access permissions through the GitHub app installation settings.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Sample

repo_name

string

username/repo-name

branch_name

string

feature

Response

{
  "status": "success",
  "message": "The project has been parsed successfully"
}
{
    "detail": "Invalid authentication from Firebase. Token expired, 1718882208 < 1718886290"
}
{"detail":"Failed to get installation ID"}
{"detail":"404 Client Error: Not Found for url"}

Notes

  • Ensure that the Authorization header contains a valid token obtained during the login process.

  • The repo_name should be in the format username/repo-name , do not use a complete url.

  • The branch_name should be a valid branch in the specified repository.

PreviousUser RegistrationNextGetting list of all parsed projects

Last updated 10 months ago

Was this helpful?