Full documentation for SonarQube has moved to a new location: http://docs.sonarqube.org/display/SONAR

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

DescriptionGet a list of events from a project or a list of global events

URL

/api/events

HTTP MethodGET
Response Formatsjson | xml

Security

Requires User role to get the list of events for a specific project
Requires Global Administrator role to get the list of global events

Examples

Use CaseExample Request
Get all the versions from project Sonar (key = org.codehaus.sonar:sonar)

...

...

languagenone

GET

...

http://nemo.sonarsource.org/api/events?resource=org.codehaus.sonar:sonar&categories=Version

Get all the versions and alerts from project Sonar (key = org.codehaus.sonar:sonar) between January 1st, 2012 and August 31st, 2012

...

languagenone

...

...

languagenone

...

Response Format

Code Block
titleJSON
languagejavascript
 

Parameters

Parameter

Description

Required

Default Value

Example Value

resource

id or key of the project

No

Get global events if not set

org.codehaus.sonar:sonar

categories

Comma-separated list of category filters (case-sensitive)

No

None

Version,Alert

fromDateTime

ISO-8601 datetime (inclusive)

No

None

2010-12-25T23:59:59+0100

toDateTime

ISO-8601 datetime (inclusive)

No

None

2010-12-25T23:59:59+0100

fromDate

Date (inclusive)

No

None

2010-12-25

toDate

Date (inclusive)

No

None

2010-12-25

formatResponse formatsformat.
Possible values: xml or | json
NoxmlNone json

Create an Event

DescriptionCreate an event

URL

/api/events

HTTP MethodPOST
Security

Requires Project Administrator role

...