# HTTP API

FullView for NDI runs on port 9901, and listens on all interfaces. The following HTTP API routes are available.

### GET: /display/{displayNumber}/source/{name}

Changes the NDI source assigned to a given display, starting at display 0.

```
curl http://tractuspc1:9901/display/0/source/ALPHAVII%20%28Test%20Pattern%29
```

### GET: /displays

Gets a list of displays. Will eventually return display bounds and positions.

### GET: /debug

Returns performance information for the main renderer.

| Performance Metric | Description                                                                                                                                                                          |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `SdlEvents`        | The time it took in a given render cycle to process Windows-related UI events (mouseclicks, etc.). This should be < 1 msec.                                                          |
| `BlitRender`       | The time it took to render the scene before sending it to the GPU and waiting for vsync.                                                                                             |
| `RenderLoop`       | The total time, including `SdlEvents` and `BlitRender`, to render and present the scene. Should be close to 1000 / refresh rate (i.e. for a 60Hz refresh rate, this should be 16-17) |

{% hint style="warning" %}
If `BlitRender` is taking more than 16 msec, that means your PC cannot render the entire canvas within 16 milliseconds. When diagnosing performance issues, `BlitRender` is the most important number to interpret.
{% endhint %}


---

# 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://tractus.gitbook.io/tractus-tools-for-ndi/http-api.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.
