Some MantisBT installations expose the REST API through an API root such as /api/rest/index.php instead of pretty routes under /api/rest.
mantisbt-cli currently reads MANTISBT_URL, but command routes also include the /api/rest prefix. That means MANTISBT_URL can only be a web root. For an instance whose working endpoint is:
https://example.com/api/rest/index.php/users/me
there is no value that produces the correct URL today:
MANTISBT_URL=https://example.com
-> https://example.com/api/rest/users/me
MANTISBT_URL=https://example.com/api/rest
-> https://example.com/api/rest/api/rest/users/me
MANTISBT_URL=https://example.com/api/rest/index.php
-> https://example.com/api/rest/index.php/api/rest/users/me
Expected behavior: MANTISBT_URL should support both existing web-root configuration and REST API roots, including /api/rest and /api/rest/index.php, without duplicating the /api/rest path segment.
This keeps the current documented setup working while allowing deployments that require index.php in REST URLs.
Some MantisBT installations expose the REST API through an API root such as
/api/rest/index.phpinstead of pretty routes under/api/rest.mantisbt-clicurrently readsMANTISBT_URL, but command routes also include the/api/restprefix. That meansMANTISBT_URLcan only be a web root. For an instance whose working endpoint is:there is no value that produces the correct URL today:
Expected behavior:
MANTISBT_URLshould support both existing web-root configuration and REST API roots, including/api/restand/api/rest/index.php, without duplicating the/api/restpath segment.This keeps the current documented setup working while allowing deployments that require
index.phpin REST URLs.