TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

MantisBT

MantisBT Rest API Guide

Mantis Bug Tracker, Most Visited

Overview

In this tutorial, we will learn how to enable the Mantis API token and execute a sample MantisBT Rest API call. Rest API is default enabled on the Mantis instance. However, we need to enable the API token for authorization. This token is specific to the user and can be enabled on the My Account page.

Create API Mantis Token

Steps to create an API token

https://www.testingdocs.com/create-api-token-in-mantisbt/

API Test Tool

This tutorial uses the Postman API tool. To know more about the tool please follow the link:

https://www.testingdocs.com/postman-api-tool/

Server-side Resources

Mantis Rest Web services operate on the MantisBT Server-side resources without any user interface. Some of the resources are:

  • Projects/ Sub-Projects
  • Issues / Attachments
  • Versions
  • Filters

MantisBT Rest API

Mantis Bug Tracker API calls have to be authenticated by creating an API token for the user executing the calls. We need to pass the API token in the Authorization HTTP header. Authorization and the token form a KV(Key-value pair). The absence of this token or passing an invalid token would result in 401 or 403 errors.

Specify the Authorization header.

API Authorization

 

API Request

Specify the API URL Endpoint.

To retrieve an issue, use the GET /issues/<issue_id> API call.

For example, to retrieve the details of the issue id 2

http://localhost/mantis/api/rest/issues/2

Mantis Rest API

API Response

Sample response for the above API request in JSON format:

{
 "issues": [
 {
 "id": 2,
 "summary": "[TestingDocs.com] Sample Bug Summary",
 "description": " Sample Bug Description",
 "steps_to_reproduce": "Sample Steps to Reproduce:\r\nStep1\r\nStep2",
 "project": {
 "id": 1,
 "name": "TestingDocsProject"
 },
 "category": {
 "id": 1,
 "name": "General"
 },
 "reporter": {
 "id": 1,
 "name": "administrator",
 "email": "root@localhost"
 },
 "status": {
 "id": 10,
 "name": "new",
 "label": "new",
 "color": "#fcbdbd"
 },
 "resolution": {
 "id": 10,
 "name": "open",
 "label": "open"
 },
 "view_state": {
 "id": 10,
 "name": "public",
 "label": "public"
 },
 "priority": {
 "id": 40,
 "name": "high",
 "label": "high"
 },
 "severity": {
 "id": 60,
 "name": "major",
 "label": "major"
 },
 "reproducibility": {
 "id": 70,
 "name": "have not tried",
 "label": "have not tried"
 },
 "sticky": false,
 "created_at": "2019-08-10T04:39:57+00:00",
 "updated_at": "2019-08-10T04:39:57+00:00",
 "history": [
 {
 "created_at": "2019-08-10T04:39:57+00:00",
 "user": {
 "id": 1,
 "name": "administrator",
 "email": "root@localhost"
 },
 "type": {
 "id": 1,
 "name": "issue-new"
 },
 "message": "New Issue"
 }
 ]
 }
 ]
}

Create Issue Rest API call

https://www.testingdocs.com/create-issue-using-mantis-rest-api/

Related

TestLink Test Management Tool Rest API Guide

https://www.testingdocs.com/testlink-rest-api-guide/

Rest API Automation

https://www.testingdocs.com/rest-api-automation-with-karate-automation-tool/

—

Mantis Bug Tracker Tutorial:

https://www.testingdocs.com/mantis-bug-tracker-tutorial/

Mantis Website:

https://www.mantisbt.org/

Related Posts

Mantis Download Button

MantisBT /

Download and Install MantisBT

Mantis Tool Email Notifications

MantisBT /

MantisBT Tool Features

Mantis Manage Button

MantisBT /

Create New Mantis Project

Mantis Releases

MantisBT /

Mantis Bug Tracker Releases

HTTP Request Header

MantisBT /

Create Issue using Mantis REST API

‹ Download and Install MantisBT

Recent Posts

  • Update draw.io on Windows
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com