QMetry Open API 4.2.0

Detailed documentation on QMetry REST API provides all the details a developer would need for each of the API calls that are supported with code samples. The Headers, Body and Response provided here are for your reference only. You can use tools like Postman to try these APIs.

Overview of QMetry for Jira Open API Documentation

Go to https://qtm4jserver420.docs.apiary.io to view and try all APIs.

The main page of API documentation is divided into three sections:

A. Introduction

B. Authentication

C. Grouping of APIs

Benefits of using QMetry API tool

  • Headers and Parameters are predefined, just give API key and trigger the testing.

Authentication

The Open API needs the below two parameters for authentication.

(1) APIKeyAuth: Supply the apikey generated from the app from QMetry > Configuration > Open API.

(2) The authentication depends upon the settings of basic authentication in Jira (Settings > System > Authentication Methods > Allow basic authentication on API calls). Administrators can enable/disable basic authentication.

Option 1: If the Allow basic authentication on API calls option is enabled in Jira, then BasicAuth is required for authentication.

BasicAuth: Authorization (Basic authentication with Jira's credentials)

This Automation REST API is protected by the restrictions provided by Jira. You need to log in to Jira using the Basic Auth header. Follow the below steps to generate basic Auth and pass it to the request header :

1. Build a string of the form username:password

2. Encode the string in Base64 format.

3. Supply an "Authorization" header with content "Basic" followed by the encoded string. For example, the string "fred:fred" encodes to "ZnJlZDpmcmVk" in base64, so you would make the request as follows.

Authorization: Basic ZnJlZDpmcmVk

Option 2: If the Allow basic authentication on API calls option is disabled in Jira, then Personal Access Token is required for authentication.

Bearer Token: Authorization (Personal Access Token)

This Automation REST API is protected by the restrictions provided by Jira. You need to use the Bearer Token header to call the REST APIs.

To use personal access token, perform the following steps:

  1. Go to User Profile.

  2. Click on Personal Access Tokens and click on Create token.

  3. Supply an "Authorization" header with content "Bearer" followed by generated token.

Authorization: Bearer NTE1NTYzMTg4MDEzOit5OlIjghTQQEH/YZ7HNrpSxvcU

Grouping of APIs

You can see the groups of APIs listed on the panel at the left. Just click on the section you want to view and use the APIs of. The section is expanded on the left as well as on the right panel showing APIs under it.

To access an example of a particular API, click on it in the right panel.

For example,

You want to use the API of Create new Test Case.

  1. Expand the Test Case API group on the panel at left and select Create New Test Case API.

  2. On the right panel, again click on the Create new Test Case API. It displays relevant Examples on the third panel.

Understanding the Example

The Example panel displays corresponding details of the selected API.

  • Request Type: API request type.

  • URL: The base URL will be as per your Jira instance.

  • Request:

    • Headers: Provide headers.

Content-Type : application/json

apiKey : {generated-api-key from QMetry > Configuration > Open API}

Authorization :Basic ZnJlZDpmcmVk

  • Body: The section displays mandatory parameters for the API. If you want to view more available parameters, then click on Show JSON Schema as shown in the Additional Body Parameters.

  • Response: You can view the corresponding response to the request.

 

Additional Body Parameters

To see additional parameters to be passed in the request body click on 'SHOW JSON SCHEMA'. 

See Examples here - how to use additional fields from json schema.