Problem in using community version web api

  • I am using version 9.4 of sonar qube.
  • I am creating my own dashboard by using sonar qube web api.
  • My question is can any one tell me what is analysis key while using api ( POST api/project_analyses/create_event). Analysis key is mandatory in the body while sending this request.

Hi,

Welcome to the community!

Check out the other services on that page, particularly api/project_analysis/search, which will get you analyses for a project.

And BTW, I wouldn’t expect the create_event service to be particularly helpful in creating a dashboard. I guess you’re just exploring at this point?

 
Ann

1 Like

Hi Thanks for your response.
Yeah i was just exploring the api actually i am trying to build something new for my final year project like to scan user code in an online coding competition. And generate reports through web api.
My question is that if create_event is not what i need to do then how can i configure analysis for a project. I have already created the project but it is saying that projects main branch is not analyzed yet. I need to do this from web api not from dashboard.

Hi,

You can’t analyze from a Web API. You analyze with a scanner, e.g. the SonarScanner

 
HTH,
Ann

1 Like

Got it Thanks

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