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 17 Next »

Table of Contents

This page lists all the available Web Services to be used by any HTTP clients.

Available Web Services

Web Service

Possible Actions

Related Pages
/sessions/login
  • authenticate
Security

/api/events

  • get a list of events from a project
  • get a list of global events
  • create an event
Events
/api/favourites
  • get the logged in user's list of favourites
  • create a favourite
  • delete a favourite
Favourites, Filters
/api/updatecenter/installed_plugins
  • get the list of all the plugins installed on the Sonar instance
Update Center
/api/manual_measures
  • get a list of manual measures
  • create a manual measure
  • delete a manual measure
Manual Measures
/api/metrics
  • get a list of metrics
  • create a metric
  • update a metric
  • delete a metric
Metrics

/api/projects

  • delete a project
Project Settings
/api/profiles
  • get the list of coding rules activated in a quality profile
  • backup a quality profile
  • restore a quality profile
Quality Profiles
/api/properties
  • get a list of properties
  • create a property
  • update a property
  • delete a property
 
/api/resources
  • get a list of resources
  • get the measures of a list of metrics on a given resource
Metrics
/api/reviews
  • get a list of reviews
  • create a review
  • update a review (add comment, reassign it, etc.)
Reviews
/api/rules
  • get a list of rules
Quality Profiles
/api/server
  • returns the status of the Sonar server.
 
/api/sources
  • get a list of lines from source files
 
/api/server/system
  • returns system properties, server info (Java, OS), database configuration, JVM statistics and installed plugins
 
/api/timemachine
  • get past measures
Time Machine
/api/user_properties
  • get a list of user properties
  • create a user property
  • update a user property
  • delete a user property
 
/api/server/setup
  • Upgrade Sonar database
 
/api/violations
  • get a list of violations on a given resource
Violations

Simple MS Excel Samples

  1. Extracting a list of Measures of a Project: download the MS Excel sample

  2. Extracting all the Violations of a Project: download the MS Excel sample

Authentication

Icon

In case your Sonar server is secured, you will also have to manage authentication. Here's an MS Excel sample to deal with it.

Response Formats

The API provides several response formats such as XML, JSON (ie. JavaScript Object Notation) plain text or CSV.

Check the proper web service documentation to get the list of available format responses.

HTTP Status Codes

HTTP Code

Description

200

OK

400

Bad request.
The request could not be understood by the server due to malformed syntax.

401

Unauthorized

403

Forbidden.
The request was a legal request, but the server is refusing to respond to it.

404

The requested resource could not be found.

500

Internal server error.

  • No labels