# How to add path prefix to api endpoints?

**URL:** <https://community.traefik.io/t/how-to-add-path-prefix-to-api-endpoints/2974>\
**Category:** Traefik v2\
**Tags:** rest-api\
**Created:** [November 16, 2019, 1:08am UTC](https://community.traefik.io/t/how-to-add-path-prefix-to-api-endpoints/2974 "2019-11-16T01:08:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![huangjunwen](https://avatars.discourse-cdn.com/v4/letter/h/43a26b/32.png) [@huangjunwen](https://community.traefik.io/u/huangjunwen)\
**Post date:** [November 16, 2019, 1:08am UTC](https://community.traefik.io/t/how-to-add-path-prefix-to-api-endpoints/2974/1 "2019-11-16T01:08:48Z")

</div>

Hi, i want to serve api and dashboard endpoints with a path prefix (e.g. `/intra/traefik/api` and `/intra/traefik/dashboard`) and protected by a forwardAuth middleware using our intranet's session cookie (with path `/intra`).

As [this issue](https://github.com/containous/traefik/issues/5374) has been fixed, now i can serve dashboard with PathPrefix successfully in v2.1.0-rc2, but failed to load api endpoints (e.g. `/api/overview` `/api/entrypoints`)

It seems that these api endpoints' prefix is determined by enviroment [APP\_API](https://github.com/containous/traefik/blob/master/webui/src/_helpers/APP.js#L4) (at build time?)

---

<div class="post-metadata">

**Author:** ![MichaelSchmidle](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/michaelschmidle/32/1119_2.png) [@MichaelSchmidle](https://community.traefik.io/u/MichaelSchmidle)\
**Post date:** [November 18, 2019, 8:22am UTC](https://community.traefik.io/t/how-to-add-path-prefix-to-api-endpoints/2974/2 "2019-11-18T08:22:33Z")

</div>

+1

Also, the corresponding and valid Github issue has been closed by your bot. See [https://github.com/containous/traefik/issues/5853](https://github.com/containous/traefik/issues/5853). Please reopen to further discuss on Github.
