dosubot[bot] commented on issue #8704: URL: https://github.com/apache/incubator-devlake/issues/8704#issuecomment-3871022217
<!-- Answer --> You're right—DevLake does not intentionally hit the SAML servlet. The root cause is that DevLake builds Jira REST API calls by appending paths like `api/2/serverInfo` or `agile/1.0/board` directly to the endpoint you provide. If your endpoint does not end with `/rest/`, DevLake will construct URLs like `https://<jira-host>/jira/agile/1.0/board`, which are UI endpoints that redirect to the SAML servlet and return HTML instead of JSON. This is why your curl command works (it targets the correct REST API path), but DevLake fails when the endpoint is misconfigured. To fix this, make sure your Jira endpoint in DevLake ends with `/rest/` (for example: `https://<jira-host>/jira/rest/`). This will ensure all API calls go to the correct REST endpoints and avoid the SAML servlet redirect. There’s no hardcoded use of the SAML servlet in the plugin—this behavior is a side effect of the endpoint configuration logic. It would be helpful for the UI or docs to warn users if `/rest/` is missing from the endpoint, since this is a common pitfall. Let me know if updating the endpoint resolves the issue for you. [Reference: Jira plugin connection logic](https://github.com/apache/incubator-devlake/blob/2c15ad880dce830c6512fa58039527cbf4745b8b/backend/plugins/jira/api/connection_api.go#L41-L116) <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/b26824f0-f8f1-4cd2-a414-3a8da8a81bb8?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/b26824f0-f8f1-4cd2-a414-3a8da8a81bb8?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/b26824f0-f8f1-4cd2-a414-3a8da8a81bb8?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/b26824f0-f8f1-4cd2-a414-3a8da8a81bb8?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b26824f0-f8f1-4cd2-a414-3a8da8a81bb8?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/b26824f0-f8f1-4cd2-a414-3a8da8a81bb8?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b26824f0-f8f1-4cd2-a414-3a8da8a81bb8?feedback_type=other)</sup> [](https://app.dosu.dev/b4e8e847-d479-4541-83a8-d88d83fea5c9/ask?utm_source=github) [](https://cursor.com/link/prompt?text=You%27re%20right%E2%80%94DevLake%20does%20not%20intentionally%20hit%20the%20SAML%20servlet.%20The%20root%20cause%20is%20that%20DevLake%20builds%20Jira%20REST%20API%20calls%20by%20appending%20paths%20like%20%60api/2/serverInfo%60%20or%20%60agile/1.0/board%60%20directly%20to%20the%20endpoint%20you%20provide.%20If%20your%20endpoint%20does%20not%20end%20with%20%60/rest/%60%2C%20DevLake%20will%20construct%20URLs%20like%20%60https%3A//%3Cjira-host%3E/jira/agile/1.0/board%60%2C%20which%20are%20UI%20endpoints%20that%20redirect%20to%20the%20SAML%20servlet%20and%20return%20HTML%20instead%20of%20JSON.%20This%20is%20why%20your%20curl%20command%20works%20%28it%20targets%20the%20correct%20REST%20API%20path%29%2C%20but%20DevLake%20fails%20when%20the%20endpoint%20 is%20misconfigured.%0A%0ATo%20fix%20this%2C%20make%20sure%20your%20Jira%20endpoint%20in%20DevLake%20ends%20with%20%60/rest/%60%20%28for%20example%3A%20%60https%3A//%3Cjira-host%3E/jira/rest/%60%29.%20This%20will%20ensure%20all%20API%20calls%20go%20to%20the%20correct%20REST%20endpoints%20and%20avoid%20the%20SAML%20servlet%20redirect.%20There%E2%80%99s%20no%20hardcoded%20use%20of%20the%20SAML%20servlet%20in%20the%20plugin%E2%80%94this%20behavior%20is%20a%20side%20effect%20of%20the%20endpoint%20configuration%20logic.%20It%20would%20be%20helpful%20for%20the%20UI%20or%20docs%20to%20warn%20users%20if%20%60/rest/%60%20is%20missing%20from%20the%20endpoint%2C%20since%20this%20is%20a%20common%20pitfall.%20%0A%0ALet%20me%20know%20if%20updating%20the%20endpoint%20resolves%20the%20issue%20for%20you.%20%20%0A%5BReference%3A%20Jira%20plugin%20connection%20logic%5D%28https%3A//github.com/apache/incubator-devlake/blob/2c15ad880dce830c6512fa58039527cbf4745b8b/backend/plugins/jira/api/connection_api.g o%23L41-L116%29) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/incubator-devlake/issues/8704) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
