Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Next »

This Web Service deals with Events. It offers to:

Get Events

DescriptionGet data from project events or global events.

URL

/api/events

MethodGET
Response formatsXML (default) or JSON
Possible responses
Icon
To be completed

Security

Requires User role to get data on events for a specific project.
Requires Global Administrator role to get data on global events.

Examples

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



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



  3. Get global events from October 8th, 2012:



Parameters

Parameter

Description

Required

Example

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

Version,Alert

fromDateTime

ISO-8601 datetime (inclusive)

No

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

toDateTime

ISO-8601 datetime (inclusive)

No

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

fromDate

Date (inclusive)

No

2010-12-25

toDate

Date (inclusive)

No

2010-12-25

Response Formats

XML

XML Response

JSON

JSON Response

Create Event

DescriptionCreate an event.

URL

/api/events

MethodPOST
Response formatsNone
Possible responses
Icon
To be completed
 Security

Requires Global Administrator role to create an event.

Examples

  1. Create an event on project org.apache.struts:struts with administrator admin/admin:
    • Category: Alert
    • Name: myAlertName
    • Description: myAlertDescription
       

Parameters

Parameter

Description

Required

Example

resource

id or key of the project

?

org.codehaus.sonar:sonar

category

Category

?

Version
Alert 

name

 

  

description

 

  
Icon
To be reviewed and completed
   

 

 

  • No labels