| Table of Contents |
Get a List of Events
| Description | Get a list of events from a project or a list of global events. |
URL | /api/events |
| Method | GET |
Security | Requires User role to get the list of events for a specific project. |
Examples
Get all the versions from project Sonar (key = org.codehaus.sonar:sonar):
Get all the versions and alerts from project Sonar (key = org.codehaus.sonar:sonar between January 1st, 2012 and August 31st, 2012):
Get global events from October 8th, 2012:
Parameters
Parameter | Description | Required | Default Value | 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 |
| format | Response formats: xml or json | No | xml |
Create an Event
| Description | Create an event. |
URL | /api/events |
| Method | POST |
| Security | Requires Project Administrator role to create an event. |
Examples
- Create an event on project org.apache.struts:struts with administrator admin/admin:
- Category: Alert
- Name: myAlertName
Description: myAlertDescription
Parameters
Parameter | Description | Required | Default Value | Value | ||
|---|---|---|---|---|---|---|
resource | id or key of the project | ? | org.codehaus.sonar:sonar | |||
category | Category | ? | Version | |||
name |
| |||||
description |
| |||||
| Autres paramètres ??? | ||||||
|

