curl --request GET \ --url 'https://softwaresolutions.mantishub.io/api/rest/issues?filter_id=unassigned' \ --header 'Authorization:h58meqhpRzLfnGRf6Pu8FA8thjWGvBFd'
At MantisHub we have been working for a while on the new modern REST API for remotely accessing MantisHub data and configuration. We now feel that we have enough coverage of MantisHub functionality to encourage our users to switch to it. The API can provide a great way to integrate MantisHub into your build system, IDEs, test management systems, other SaaS applications, or your own applications.
Tools for using the API
Similar to what you expect from any REST API, you should be able to easily leverage it from your preferred language and platform. You can get the documentation for the API from our API documentation. The API is published via Postman API network enabling you to easily download Postman definitions for the API and start hacking away. If you don’t already have Postman, you can download it from Postman website. For command line access to MantisHub, we developed PowerShell module which can be used from Windows, Mac or Linux. You can also use curl which is available by default for Mac and Linux.
For accessing the API you will need to authenticate, and for this you will need to generate a secure API token from within your MantisHub rather than passing username password. Instructions for generating a token can be found in our KB article here. Remember to record your generated token since it will only be displayed on generation and once you exit out you won’t be able to get it again. You should, of course, have separate tokens for each of your integrations which provides you with the ability to manage each integration independently and associate such integrations with appropriate users or system accounts in your system (e.g. a build user account).
Individual users, as well as administrators, can generate tokens so make sure the user has access to the functionality needed for the integration. For example, if a token is generated for user Bob who is a reporter for Project X and you run an API call using the token to update an existing issue or delete it, the call will fail. The only time you won’t need a token is if you have anonymous access enabled for your MantisHub and the integration only requires read-only access.
API endpoint and Resources
The Endpoint for your API will be
Following are examples of API capabilities around entities defined in MantisHub:
- Issues – Retrieve one issue, retrieve issues matching a filter, create, delete or update issues, add notes, tags, relationships, attachments, etc.
- Projects – Get a full list of all projects accessible to logged in user along with project specific configuration like categories, versions, custom fields, etc.
- Filters – Retrieve all filters definitions, a single filter definition, or delete filters.
- Users – Create or delete users or retrieve your user information.
- Configuration – Retrieve one or many configuration options.
- Localized Strings – Retrieve one or many Local Strings.
The API library is still growing so be sure to refer to the documentation for the most up-to-date API definitions.
MantisHub has a wide range of features and customizations that allow you to get the cover most of your software bug tracking and general issue tracking needs. We also provide a number of plugins and integrations including chat apps Slack and Hipchat, Source control integrations with GitHub and Bitbucket, JetBrains, TestLodge for test case management and more. And now with the REST API… your options just got even bigger!
**MantisHub’s previously supported SOAP API is now on the deprecation path in favor of the REST API.
Some of you Mantis users out there are most likely in need or already using a test case management tool to pickup any bugs in your software product. You may be thinking “How useful would it be to have my issue tracker and test case manager work together!” Well there are a number of test case managers out there that do advertise integration with Mantis and their instruction are available for you to test out.
MantisHub team is currently working on testing some of these out for you but if you’re after tried and true, we’ve been working with our friends at TestLodge and have developed step by step instructions to allow you to integrate MantisHub with their popular test case managment tool. Known for its clean and simple interface (sound familiar? 😉 you can starting running through test cases straight away. Linked with your clean and simple MantisHub service, this can save you a heap of time.
It’s really easy to setup the integration, you can check out our knowledge base article for the full procedure and functionality details. TestLodge have even produced a short video tutorial to help get you going that you can find linked in our article.
With the TestLodge integration you can connect to your MantisHub service using an easily generated, secure API token. We recommend you create a new, appropriately named user within MantisHub to use for linking to TestLodge so it’s easy to identify TestLodge generated issues. Once linked, you can automatically create issues with MantisHub when tests cases fail. You can setup within TestLodge the MantisHub project that you want these issues to be created in and also set the MantisHub issue’s assigned user, category, priority and severity all from within TestLodge. There’s even the capability to pull status updates on MantisHub issues via API and re-run tests based on the current issues status (e.g. resolved).
Our friends at TestLodge are offering a great deal to all MantisHub users, sign up for a free TestLodge trial and integrate it with your MantisHub service and they’ll give you a 10% discount on your TestLodge subscription. Reach out to their team at help.testlodge.com quoting the coupon Mantis10 before your free trial ends to receive this offer.
Pair MantisHub’s intuitive powerful tracker with this popular and efficient test case manager to even further simplify your software project delivery process.
Just another way to make your life easier, MantisHub has just rolled out single sign-on support for GitHub and Bitbucket accounts. We know you’ve been waiting for it and now it is a single click away to enable it for all users of your MantisHub!
MantisHub is fast becoming a developers’ best friend. With integrations for IDE, test management, team chat via Slack/Hipchat and now SSO with the most popular code hosting services.
One less password to remember, cause you can now simply head to your MantisHub login page and click on GitHub or Bitbucket to login using these providers.
As well as adding convenience this can also provide extra security. GitHub and Bitbucket support two factor authentication (2FA), so having your users access MantisHub with either of these can deliver even better security for your data. And you’re not potentially re-cycling your passwords from other systems.As the MantisHub administrator, you would just need to install the “Single sign-on via Auth0” plugin. For users to be able to login, their email address registered in MantisHub must be also associated with GitHub/Bitbucket accounts as a verified email address.
If you have customer sign-up enabled on your service you can also utilize this for automatic account creation. If there is no email match with the providers account when a user attempts to login using single sign-on, MantisHub will automatically create a new user account with reporter access to your public projects with the providers primary verified email address and same username as the service used to sign-in.
Check out all the details in our KB article.
In the natural world the praying Mantis and the Grasshopper are not mates. In fact a grasshopper better run if it sees the Mantis coming :).
In our world however they are totally compatible. Using the Grasshopper phone service with your MantisHub is a great little plugin you can utilize.
Grasshopper lets you set up one or more phone numbers and extensions for your business. You can have extensions such as 1 for Sales, 2 for support and direct extensions to talk to an individual team member. These extensions forward onto real numbers or to voicemails and the voicemails can be setup to be emailed to an address of your choice.
Now this is where MantisHub comes into play. Couple Grasshoppers ability to email your voicemails with MantisHub Helpdesk for email reporting and you can capture your customer communications as an issue directly into the right project in your bug tracker!
Voicemails are sent with text transcriptions that are plugged into your issue description as well as attaching the recording as an mp3 file.
Read more about this great plugin in our KB article.
“Toggl’s time tracker is built for speed and ease of use. Time keeping with Toggl is so simple that you’ll actually use it.”
The folks at Toggl have created a simple and fast time tracking feature. For companies that need to match time spent against issues, projects and users, Toggl makes it super easy to record and report on time spent.
So MantisHub have just rolled out a new integration with Toggl to put this great tool at your fingertips. Simply install the Toggl chrome extension and you can now record your time when working on an issues with just a click.
Select the issue that you’re working on in MantisHub and you’ll see the shiny red button at the top of the page. Click the red button to start the toggl timer and it will create a toggl record automatically populated with your MantisHub issue details!
Once you’re done, you can stop the timer or just move straight onto your next issue, where you”ll find that shiny red button again. Install the Toggl app for a great way to manage your timer and you can switch between issues here as well.
Just another example of how the team are working to make your MantisHub experience more productive.
In addition to Slack integration we have recently released, today we are announcing the support for HipChat. HipChat is persistent, searchable, and loaded with goodies: video calling, screen sharing, and the security your IT team craves.
Setup HipChat Plugin in MantisHub
Setting up HipChat integration with MantisHub is pretty easy. Start with installing the HipChat plugin by going to Manage – Manage Plugins and click install button next to the HipChat plugin.
Create Room API token from HipChat
Start with creating an API token in HipChat and use the provided token and room name to include the MantisHub plugin settings. Go to the Rooms page and select the room you want to link a project to.
Select the Tokens page for the room you have selected.
Create a room token to be used by MantisHub, so set the label to “MantisHub”.
Copy the the room token to paste it into MantisHub HipChat configuration
Set the Room Token in MantisHub HipChat Plugin
Go to Manage – Manage Plugins – HipChat and set the room name (case sensitive) and room token for each of the projects that should send notifications to the room we just created a token for. If room/token not set for a project, then no HipChat notifications will be generated for that project.
MantisHub / HipChat integration is all set
Here is a test message generated by “Update and Test” from the HipChat plugin configuration.
Here is a sample notification when an issue is created:
Here is a sample notification when an issue is assigned by a user to themselves.
Slack is a platform for team communication: everything in one place, instantly searchable, available wherever you go.
We are big fans of Slack and believe that it is an effective tool for connecting the team with realtime chat and updates from the services they depend on. We believe it is a great companion service to MantisHub with a great free plan to get MantisHub users started.
Setting up Mantishub + Slack Integration
Setting up Slack integration with MantisHub is pretty easy. Start with creating an incoming webhook integration in Slack and use the provided webhook URL to include the MantisHub plugin settings.
Select “Configure Integrations” from Slack
Select “Incoming WebHooks” as the integration type. Then following the steps until Slack provides the webhook url. Copy the URL and save the integration details.
Go to Manage – Manage Plugins – click install button next to Slack then click on the Slack hyperlink. This will prompt the form below to provide the Slack incoming webhook URL, select the native and custom fields to include in the Slack notifications (assuming they are not empty) and map project names to Slack channels. If a project is mapped to an empty channel name, then notifications will be disabled for that project. Default channel will be used for new projects created in the future, unless they are explicitly mapped via the same form.
Testing the Slack integration
Once done configuring the integration from both Slack and MantisHub sides, use the “Update and Test” button which will trigger a Slack notification like the one below in the default channel.
This is a sample notification when an issue is created:
Another issue creation sample with more fields selected to be included:
This is a sample notification when a team member assigns an issue to themselves:
This is a sample notification when a team member assigns an issue to another team member:
This is a sample notification when a user adds a private note: