Get metrics from JIRAΒΆ
The below example gets issues for an empty jql of a cloud-based JIRA system.
Empty jql string means that all issues are taken as result.
As no user/password are provided and this JIRA system as no free-accessible projects, the result should be 0.
Hint
You may need to create a API-token for JIRA-cloud, because using your password in JIRA-cloud is not allowed. In this case, simply use the token for the password field.
See JIRA api token docs.
{
"metrics": {
"jira_issues": {
"source": {
"type": "rest_jira",
"jql": ""
}
}
},
"sources": {
"rest_jira": {
"class": "mf.rest",
"url": "https://useblocks.atlassian.net/rest/api/3/search",
"method": "POST",
"payload": {
"jql": ":MF_REPLACE:jql",
"maxResults": 1,
"fields": [ "summary"],
"startAt": 0
},
"result_call": "result['total']"
}
},
"targets": {
"print": {
"class": "mf.print"
}
}
}