# API/Controllers

In desktop applications it is common for controls such as Grids, Lists, Drop Downs, among many others to load a heavy amount of data, that in many cases is all displayed at once. In a web environment display controls are also common, but they don’t tend to load a heavy among of data at once, they rather invoke Web API Controllers to collect its data as needed.

WebMap also provides several Web API Controllers created to avoid sending big amount of data as part of the DTO/Mapper mechanism.

Controllers are responsible for responding to requests made from the front-end. In WebMAP, the items or nodes of any display control are not sent within the standard WebMAP request, so these kind of items and nodes are sent by means of a Controller Action.

```
[Route("api/treeview/FetchItems")]
[ApiController]
public class TreeViewController
{
    [HttpGet("{id}")]
    public Dictionary GetTreeViewItem(WebTreeView tv)
    {
        //...
    }
}
```

![](/files/jfTZ7jjp5i6Cp8S26Xhp)


---

# 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.gapvelocity.ai/webmap/general/backend/dcp-desktop-compatibly-platform/library-bundles/bundle-dto/api-controllers.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.
