Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Table of Contents
maxLevel4

...

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 Block
{
    "requestId": "3041507c-95d0-4628-a49d-d95b7632197c",
    "success": true
}

Code : 400

Response failure
Code Block
{
    "success": false,
    "code": "RP.REPORT_GADGET_NOT_FOUND",
    "message": "Gadget not exist. "
}


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

...

Get Dashboard Key for QMetry Custom Dashboards > Shared Dashboards

API

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

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
Code Block
{
	"start": 0,
	"limit": 50,
	"page": 1,
	"isSystem": false
}


Response


Response success - Code : 200
Code Block
{
    "data": [
        {
            "name": "My Custom Dasboard",
            "isPrivate": 0,
            "dashboardKey": "REFpSr",
            "isSystem": 0
        },
        {
            "name": "Traceability Dashboard",
            "isPrivate": 1,
            "dashboardKey": "G3hoS5",
            "isSystem": 0
        }
    ],
    "total": 2
}


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


...

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
Code Block
{
    "data": {
        "gadgets": [
            {
                "mappingID": 134,
                "gadget": "{\"name\":\"Custom Traceability Report\",\"dashboardKey\":\"G3hoS5\",\"gadgetID\":\"gr8uqSL\",\"id\":\"gadget-134\",\"isSystem\":false,\"cols\":1,\"rows\":1,\"isFilter\":true,\"hideLoader\":false,\"metadata\":\"[{\\\"type\\\":\\\"table\\\"}]\",\"filterValue\":[{\"type\":\"multiselect\",\"field\":\"`@Filter.project`\",\"isProject\":true,\"userID\":[13],\"value\":[9]}],\"filterAlias\":\"Default Filter\",\"mappingID\":134,\"x\":0,\"y\":0,\"w\":1,\"h\":1,\"validFilter\":true,\"validGadgetName\":true,\"errorMessage\":\"\",\"isDirty\":false,\"description\":\"Project Filter Traceability Report\",\"renameFlag\":false,\"projectKeys\":[{\"id\":\"project\",\"name\":\"project\"}],\"releaseKeys\":[],\"projectKeyIndex\":[],\"releaseKeyIndex\":[],\"showFilter\":false,\"filterId\":59}",
                "name": "Custom Traceability Report",
                "description": "This is a custom Traceability Report"
            },
            {
                "mappingID": 135,
                "gadget": "{\"name\":\"Tabular Matrix Tracebility Report \",\"dashboardKey\":\"G3hoS5\",\"gadgetID\":\"1pohRSv\",\"id\":\"gadget-1\",\"isSystem\":false,\"cols\":1,\"rows\":1,\"isFilter\":0,\"hideLoader\":false,\"metadata\":\"[{\\\"type\\\":\\\"table\\\"}]\",\"filterValue\":\"[]\",\"filterAlias\":\"Default Filter\"}",
                "name": "Tabular Matrix Traceability Report ",
                "description": "This is Tabular Matrix  Traceability Report "
            }
        ],
        "name": "Traceability Report Dashboard",
        "dashboardKey": "G3hoS5",
        "isShared": false
    }
}


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


...

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
Code Block
{
    "totalRecords": 5,
    "processedRecords": 5,
    "status": "Completed",
    "downloadUrl": "https://<QMetry URL>/rest/analytics/latest/exports/e431...-7c94da91419b/download?token=eyJhbG.....0e4H47c"
}


Response success
Code Block
{
    "totalRecords": 500,
    "processedRecords": 5,
    "status": "In_progress",
    "downloadUrl": 
}


Code : 400

Response failure
Code Block
{
    "success": false,
    "code": "RP.REPORT_GADGET_NOT_FOUND",
    "message": "Gadget not exist. "
}


Response success
Code Block
{
    "totalRecords": 5,
    "processedRecords": 0,
    "status": "Failed",
    "downloadUrl":
}



...