Skip to content
MantisHub
Home Features Pricing Migrate to MantisHub Knowledge Base Tutorials Blog

Announcing MantisHub REST API

API_image3

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 leverage it easily from your preferred language and platform. You can get the documentation for the API from our REST API reference, which documents every endpoint with parameters, responses, and copy-paste examples. For command-line access to MantisHub, we developed a PowerShell module that can be used from Windows, Mac, or Linux. You can also use Curl, which is available by default for Mac and Linux.

API Access

To access the API, you will need to generate a secure API token for authentication, rather than passing a username and 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 once; after you exit, you won’t be able to retrieve it. You should, of course, have separate tokens for each of your integrations, which provide you with the ability to manage each integration independently and associate them with appropriate users or system accounts (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 https://<yourmantishubname>.mantishub.io/api/rest/

Here’s a sample request using curl from a terminal window for MantisHub name “softwaresolutions” using an API token that will get all issues that are unassigned:

curl --request GET \
  --url 'https://softwaresolutions.mantishub.io/api/rest/issues?filter_id=unassigned' \
  --header 'Authorization:h58meqhpRzLfnGRf6Pu8FA8thjWGvBFd'

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 the logged-in user, along with project-specific configuration such as categories, versions, and custom fields.
  • 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 cover your software bug-tracking and general issue-tracking needs. We also provide a number of plugins and integrations, including chat integrations for Slack and MS Teams, source-control integrations for GitHub and Bitbucket, the JetBrains integration, and TestLodge for test case management. 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.

Ready to bring your team together?

Start tracking issues, tickets, and knowledge in one hub today.

Start a free trial now!
No credit card required