1

I want to extract status report from coverity using rest api calls for particular report name. Is there a way to extract the reports via api.

I tried multiple api calls and went through their api webservice documentation but did not find anything. Like:https:///doc/en/api/cov_platform_web_service_api_ref.html#Overview

api call: https://:/api/viewContents/projects/v1/All%20Projects?projectId=*

Columns enabled for All Projects. All Project Column Settings

This is how We want to pull data via API call: Status Report

  • First, what exactly do you want to get as a "status report"? Show an example of the output you are hoping to see. Second, show at least one of your attempted solutions, ideally one that successfully obtains at least some portion of the information you are after. As it stands, this question is too vague to attempt to answer. – Scott McPeak Jun 12 '22 at 08:31
  • Hi @ScottMcPeak, Sorry for late reply. I am trying to generate a report which contains below columns: [ Impact(Medium,High) , False Positive, outstandingCount, dismissedCount, Fixed, Projectname ] . As of now I can get outstandingCount, dismissedCount, Fixed and Projectname columns using below api URL. URL: https://sast.host.com:port/api/viewContents/projects/v1/All%20Projects?projectId=* Is there a way by which I can get all the above mentioned columns via api call for all projects? – monstermind Jun 17 '22 at 09:04
  • I suggest adding the new information to the body of the question (click "Edit"). But it does not make sense to me. If the output of the report contains "Projectname", then it is a list of Projects. But a Project cannot have an associated Impact or Classification (the latter being what "False Positive") is. Are you looking for issue *counts* of those things within the project? – Scott McPeak Jun 17 '22 at 11:40
  • @ScottMcPeak Yes, I am trying to fetch the issue counts for all projects. I have edited the all projects body for having the required columns but few of them are not available as mentioned. Also I have edited my question for Attaching Image of required status report output. – monstermind Jun 17 '22 at 13:17
  • In that case, I don't think it is possible to do with a `projects` query since, like you say, the counts for those specific conditions are not available. Instead, you could use an `issues` query and then do the filtering and counting yourself. – Scott McPeak Jun 17 '22 at 16:01
  • Hi @ScottMcPeak, I tried getting the issues but was unsuccessful. Could you please let me know what I am doing wrong here. Getting Below error: 400Bad Request - {"message": "Cant find view with id {0} of type {1}"} API Url: https://sast.{protalName}.com:443/api/viewContents/issues/v1/All%20Projects?projectId=ProjectName&rowCount=-1 – monstermind Jun 20 '22 at 06:48
  • You probably do not have an `issues` view called `All Projects`. – Scott McPeak Jun 20 '22 at 16:03

0 Answers0