# trame: add custom endpoint

**URL:** https://discourse.paraview.org/t/trame-add-custom-endpoint/11596
**Category:** Web Support
**Created:** [March 8, 2023, 6:02pm UTC](https://discourse.paraview.org/t/trame-add-custom-endpoint/11596 "2023-03-08T18:02:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [March 8, 2023, 6:02pm UTC](https://discourse.paraview.org/t/trame-add-custom-endpoint/11596/1 "2023-03-08T18:02:08Z")

</div>

For my trame-based application, I want to simply add an endpoint so that the user can `get`/`post` that endpoint url and get some computed value.

For example, if my server is running on `localhost:8080`, I want to register a callback so that if the user accesses `localhost:8080/get_results`, it’ll call a Python function which will return some custom results.

Any suggestions for doing that? thanks!

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [March 8, 2023, 6:57pm UTC](https://discourse.paraview.org/t/trame-add-custom-endpoint/11596/2 "2023-03-08T18:57:01Z")

</div>

You can add new route endpoints by doing something similar to [that](https://github.com/banesullivan/trame-tileserver/blob/main/app.py#L80-L83).

HTH,

Seb

---

<div class="post-metadata">

### Author: ![jackshen2028](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jackshen2028/32/17191_2.png) [@jackshen2028](https://discourse.paraview.org/u/jackshen2028)
#### Post date: [November 5, 2025, 1:35am UTC](https://discourse.paraview.org/t/trame-add-custom-endpoint/11596/3 "2025-11-05T01:35:01Z")

</div>

Hi VTK community,

I have a similar issue with trame binding a custome endpoint (eg: [http://localhost:8080/home/](http://localhost:8080/home/)) to trame app index page ([http://localhost:8080](http://localhost:8080)). Is there a quick way to achieve this?

Best regards!

Jack Shen

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [November 6, 2025, 1:33pm UTC](https://discourse.paraview.org/t/trame-add-custom-endpoint/11596/4 "2025-11-06T13:33:17Z")

</div>

I’m not sure to understand what you are asking? Are you wondering how to setup a reverse proxy (apache/nginx) or something else?
