API for Reports





Get System Gadget ID

Dashboard key

Dashboards

Dashboard Key

Dashboards

Dashboard Key

My Dashboard

mydashboard

Requirement Report

requirement

Test Case Report

testcase

Issue Analysis Report

issueanalysis

Issue Trends Report

issuetrends

Top Issues Report

topissues

Execution Summary Report

execution-summary

Approval Workflow Report

approval-workflow

Login Report

login

Reusability Report

reusability

Audit Log Report

auditlog

Get System Gadget ID

API

https://<QMetry URL>/rest/analytics/latest/dashboards/<dashboard key>?isSystem=true

Refer the above table to get dashboard key of the dashboard you want to export

API

https://<QMetry URL>/rest/analytics/latest/dashboards/<dashboard key>?isSystem=true

Refer the above table to get dashboard key of the dashboard you want to export

Method

GET

Request Header

apiKey : <Your Open API key>

Content-Type : <application/json>

project : <Project key for which the report to be exported>

Request Body

(empty)

Response

Code : 200

Response success
{ "data": { "gadgets": [ { "mappingID": 8, "gadget": "{\"name\":\"Manual Vs Automated\", \"gadgetID\": \"manualvsautomated\", \"isSystem\": 1, \"isFilter\": true, \"w\": 1, \"h\": 1, \"x\": 0, \"y\": 0 }", "name": "Manual Vs Automated", "description": "Showing summary of Manual vs Automated test cases based on testing type." }, { "mappingID": 9, "gadget": "{\"name\":\"Test Cases With Issues\", \"gadgetID\": \"tcwithissue\", \"isSystem\": 1, \"isFilter\": true, \"w\": 1, \"h\": 1, \"x\": 1, \"y\": 0 }", "name": "Test Cases With Issues", "description": "Showing summary of Test cases where issues are linked and Test cases without issues." }, { "mappingID": 10, "gadget": "{\"name\":\"Planned Test Cases\", \"gadgetID\": \"tcplanned\", \"isSystem\": 1, \"isFilter\": true, \"w\": 2, \"h\": 1, \"x\": 0, \"y\": 1 }", "name": "Planned Test Cases", "description": "Showing summary of test case planned or unplanned for execution. Test case those are linked with test suites are \"Planned\" for execution. Test case those are not linked with test suites are considered \"Unplanned\" for execution." }, { "mappingID": 11, "gadget": "{\"name\":\"Test Case Summary\", \"gadgetID\": \"tcsummary\", \"isSystem\": 1, \"isFilter\": true, \"w\": 2, \"h\": 1, \"x\": 0, \"y\": 2 }", "name": "Test Case Summary", "description": "Showing summary of test cases grouped by their workflow status/priority/test category." } ], "name": "Test Case Report", "dashboardKey": "testcase" } }

Code : 400

Response failure
{ "success": false, "code": "RP.REPORT_DASHBOARD_NOT_FOUND", "message": "Dashboard not exist." }



Export System Gadget without filters

API

https://<QMetry base URL>/rest/analytics/latest/gadget/export

Comments

API

https://<QMetry base URL>/rest/analytics/latest/gadget/export

Comments

Method

POST



Request Header

apiKey : <Your Open API key>

Content-Type : <application/json>

project : <Project key for which the report to be exported>



Request Body

{
"isSystemGadget": 1,
"gadgetKey": "<gadget ID>"
}

Ggadget ID to be retrieved from api - Get System Gadget ID

Response

Code : 200

Response success
{ "requestId": "3041507c-95d0-4628-a49d-d95b7632197c", "success": true }

Code : 400

Response failure



This requestId to be used in API- Check progress and get download link for exported report data

Export System Gadget with filters

API

https://<QMetry base url>/rest/analytics/latest/gadget/export

Comments

API

https://<QMetry base url>/rest/analytics/latest/gadget/export

Comments

Method

POST



Request Header

apiKey : <Your Open API key>

Content-Type : <application/json>

project : <Project key for which the report to be exported>



Request Body

{
     "isSystemGadget": 1,
     "gadgetKey": "<gadget key>",
     "filterValue": [{
                           "type": "multiselect",
                           "field": "`@Filter.project`",
                           "value": [9]
                         }]
}

gadget ID to be retrieved from API - Get System Gadget ID

Response

Code : 200

Response success

Code : 400

Response failure



This requestID can be used in APIs Check progress and get download link for exported report data

Get Dashboard Key for QMetry Custom Dashboards > My Dashboards

API

https://<QMetry Base URL>/rest/analytics/latest/dashboards/custom/search

API

https://<QMetry Base URL>/rest/analytics/latest/dashboards/custom/search

Method

POST

Request Header

apiKey : <Your Open API key>

Content-Type : <application/json>

project : <Project key for which the report to be exported>

Request Body



Request



Response



Response success - Code : 200



Response failure - Code : 400



Get Dashboard Key for QMetry Custom Dashboards > Shared Dashboards

API

Method

POST

Request Header

apiKey : <Your Open API key>

Content-Type : <application/json>

project : <Project key for which the report to be exported>

Request Body



Request



Response



Response success - Code : 200



Response failure - Code : 400



Get Custom Gadget ID

API

https://<QMetry Base URL>/rest/analytics/latest/dashboards/{{dashboard key}}?isSystem=false

Get dashboard key using API for Reports#Get Dashboard Key for Custom Dashboards

API

https://<QMetry Base URL>/rest/analytics/latest/dashboards/{{dashboard key}}?isSystem=false

Get dashboard key using API for Reports#Get Dashboard Key for Custom Dashboards

Method

GET

Request Header

apiKey : <Your Open API key>

Content-Type : <application/json>

project : <Project key for which the report needs to be exported>

Request Body

(empty)

Response



Response success - code 200



Response failure - code 400





Export Custom Gadget with filter

API

https://<QMetry Base URL>/rest/analytics/latest/gadget/export

API

https://<QMetry Base URL>/rest/analytics/latest/gadget/export

Method

POST

Request Header

apiKey : <Your Open API key>

Content-Type : <application/json>

project : <Project key for which the report to be exported>

Request Body

{
     "isSystemGadget": 0,
     "gadgetKey": "gr8uqSL",
     "filterValue": [{
                             "type": "multiselect",
                             "field": "`@Filter.project`",
                             "isSystem": false,
                             "value": [9 ]
                         }]
}

Response



Reponse success



Response failure





Export a Custom Gadget without a Filter

API

https://<QMetry Base URL>/rest/analytics/latest/gadget/export

Comment

API

https://<QMetry Base URL>/rest/analytics/latest/gadget/export

Comment

Method

POST



Request Header

apiKey : <Your Open API key>

Content-Type : <application/json>

project : <Project key for which the report to be exported>



Request Body

{
"isSystemGadget": 0,
"gadgetKey": "<gadget ID>"
}

Gadget ID to be retrieved from API - Get Custom Gadget ID.

Response



Response success - code 200



Response failure - code 400







Check progress and get download link for exported report data

API

https://<QMetry Base URL>/rest/analytics/latest/exports/{{request ID}}/progress

Request ID should be retrieved from API to Export System Gadget with filter

Comments

API

https://<QMetry Base URL>/rest/analytics/latest/exports/{{request ID}}/progress

Request ID should be retrieved from API to Export System Gadget with filter

Comments

Method

GET



Request Header

apiKey : <Your Open API key>

Content-Type : <application/json>

project : <Project key for which the report to be exported>



Request Body

(empty)

gadget ID to be retrieved from API - Get System Gadget ID

Response

Code : 200

Response success



Response success



Code : 400

Response failure



Response success