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

Get Flow Graph

GET /endpoints/flow/graph

This endpoint helps you understand the flow from the endpoint to further neighbours in code in a parent - child relationship.

Headers

Name
Value

Authorization

Bearer <token>

Query Params

Name
Type
Description

project_id

string

The project id generated during parsing of the code

endpoint_id

string

The endpoint identifier that points to the specific node you want to generate graph from

Response

[
    {
        "function": "/server.py:list", //the function that was hit by the endpoint
        "params": "[{\"identifier\": \"_\", \"type\": null}]", // the parameters of the function
        "response_object": "", // response object attached to the function
        "children": [ //further nodes and flow
            {
                "function": "/server.py:API.get",
                "params": "[{\"identifier\": \"self\", \"type\": null}, {\"identifier\": \"path\", \"type\": null}]",
                "response_object": "",
                "children": []
            }
        ]
    }
]
{
    "status_code": 400,
    "detail": "Project Details not found."
}
PreviousGenerating Blast RadiusNextGet Dependencies

Last updated 10 months ago

Was this helpful?