# Get Flow Graph

<mark style="color:green;">`GET`</mark> `/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**

{% tabs %}
{% tab title="200" %}

```json
[
    {
        "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": []
            }
        ]
    }
]
```

{% endtab %}

{% tab title="400" %}

```json
{
    "status_code": 400,
    "detail": "Project Details not found."
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.momentum.sh/using-momentum/get-flow-graph.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
