Must-share information (formatted with Markdown):
- Version 8.9.10
- Through Zip file
- what are you trying to achieve: Trying to get the different report metrics using the web API
- I have my code as the following:
metricsKeys = ['code_smells', 'critical_violations', 'minor_violations', 'major_violations',
'blocker_violations', 'security_hotspots_reviewed', 'complexity', 'duplicated_blocks', 'last_commit_date', 'reliability_remediation',
'functions', 'comment_lines_density', 'comment_lines', 'ncloc_language_distribution', 'lines', 'security_remediation_effort',
'quality_profiles', 'duplicated_lines', 'sqale_index', 'ncloc', 'sqale_rating', 'coverage', 'security_review_rating', 'confirmed_issues',
'reliability_rating', 'files', 'line_coverage', 'alert_status', 'security_rating', 'quality_gate_details', 'development_cost',
'bugs', 'sqale_debt_ratio', 'open_issues', 'duplicated_lines_density', 'statements', 'cognitive_complexity', 'vulnerabilities', 'security_hotspots', 'security_hotspots_reviewed' ]
sample = sq_user.measures.get_component_with_specified_measures(component= project_name,
fields="metrics, periods",
metricKeys=metricsKeys)
But the returned object is:
{'component': {'key': project_key,
'name': project_name,
'qualifier': 'TRK',
'measures': [{'metric': 'code_smells', 'value': '7', 'bestValue': False}]}}
Why am I not getting the rest of the metrics?
Do I have to use some other fields?
I tried searching the web API documentation but could not find a list of the fields which can be used for the web API.
Any help?