Api/qualitygates/project_status

  • which versions are you using: 9.9 Enterprise, web-api
  • how is SonarQube deployed: no-idea
  • what are you trying to achieve:
    I’m trying to know the status of a Customized quality-gate by project
  • what have you tried so far to achieve this:
    I tried calling this api path:
    api/qualitygates/project_status?projectKey=project-x&branch=staging

Response:

{
“projectStatus”: {
“status”: “ERROR”,
“conditions”: [
{
“status”: “OK”,
“metricKey”: “new_reliability_rating”,
“comparator”: “GT”,
“periodIndex”: 1,
“errorThreshold”: “3”,
“actualValue”: “1”
},
{
“status”: “ERROR”,
“metricKey”: “reliability_rating”,
“comparator”: “GT”,
“errorThreshold”: “3”,
“actualValue”: “4”
},
{
“status”: “OK”,
“metricKey”: “new_security_rating”,
“comparator”: “GT”,
“periodIndex”: 1,
“errorThreshold”: “1”,
“actualValue”: “1”
},
{
“status”: “OK”,
“metricKey”: “security_rating”,
“comparator”: “GT”,
“errorThreshold”: “1”,
“actualValue”: “1”
}
],
“periods”: [TRIMMED],
“ignoredConditions”: false, “period”: {TRIMMED},
“caycStatus”: “non-compliant”
}
}

is caycStatus is the compliance status for my customized quality-gate associated with project-x or it is only Clean-As-You-Code sompliance status?
and if it is for CAYC compliance only, how can I know the Compliance status for my CUSTOMIZED Quality-gate, is projectStatus.status enough?

Hi,

caycStatus should be about the Quality Gate itself, not about your project.

 
HTH,
Ann