Cannot get quality gate status by analysisid in private org

Please note: It’s a private organization.

  • Versions used: Sonarcloud.io && sonar-scanner-cli-4.6.2.2472

  • Error message:

  • “[{“msg”:“Analysis with id \u1234AX7AqP3shI-HlYXBDAdd\u is not found”}]}”

  • Steps to reproduce
    Tried to execute different variations of the curl request to get desired results but the analysis still returns “not found”

Below are the requests
curl -u {apitoken}: “https://sonarcloud.io/api/qualitygates/project_status?analysisId=1234AX7AqP3shI-HlYXBDAdd

curl -u {apitoken}: “https://sonarcloud.io/api/qualitygates/project_status?organization=orgname&analysisId=1234AX7AqP3shI-HlYXBDAdd

curl -u {apitoken}: “https://sonarcloud.io/api/qualitygates/project_status?organization=orgname&projectKey=projectKey&analysisId=1234AX7AqP3shI-HlYXBDAdd

  • Potential workaround
    None
  • Scanner command used when applicable (private details masked)
  • In case of SonarCloud:
    • CI system used: Circle CI

Hey there.

  1. What about a simple browser request?
  2. You could avoid a manual API call entirely be setting sonar.qualitygate.wait=true as an analysis parameter, which will poll for the Quality Gate status.

This resolved the use case. Thanks for that.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.