Skip to end of metadata
Go to start of metadata
DescriptionGet a list of events from a project

URL

/api/events

HTTP MethodGET
Response Formatsjson | xml

Security

Requires Browse permission on project

 

Examples

Use CaseExample Request
Get all the versions from project org.codehaus.sonar:sonar

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

Get all the versions and quality gate status from project org.codehaus.sonar:sonar between January 1st, 2012 and August 31st, 2012

GET http://nemo.sonarsource.org/api/events?resource=org.codehaus.sonar:sonar&categories=Alert,Version&fromDate=2012-01-01&toDate=2012-08-31

Response Format

JSON

Parameters

Parameter

Description

Required

Default Value

Example Value

resource

id or key of the project

Yes

None

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

format

Response format can be set through:

  • Parameter format: xml | json
  • Or the 'Accept' property in the HTTP header:
    • Accept:text/xml
    • Accept:application/json
If nothing is set, json is used.
NoNonejson
  • No labels