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

Table of Contents

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

Available Web Services

Issues

Web Service

Examples of use cases that can be fulfilled

issues

Get a list of issues
Assign/Unassign as issue
Create a manual issue

rules

Get a list of rules

profiles

Get a list of profiles
Get the list of coding rules activated in a quality profile
Backup a quality profile
Restore a quality profile
Delete a profile
Set a profile as default

action_plans

Get a list of action plans
Create / Update / Delete an action plan

violations

Deprecated since Sonar 3.6. Replace by the 'issues' web service.

reviews

Deprecated since Sonar 3.6. Replace by the 'issues' web service.

Project Measures

Web Service

Examples of use cases that can be fulfilled

resources (Resource)

Get a list of resources 

resources (Measures)Get the measures of a list of metrics on a given resource
manual_measures

Get a list of manual measures
Create or update a manual measure
Delete a manual measure

metrics

Get a list of metrics

timemachine

Get past measures

sources

Get a list of lines from source files

events

Get a list of events from a project

User

Web Service

Examples of use cases that can be fulfilled

users

Get a list of users

user_properties

Get a list of user properties
Create a user property
Update a user property
Delete a user property

favourites

Get the logged in user's list of favourites
Create a favourite
Delete a favourite

authentication

Check authentication

Administration

Web Service

Examples of use cases that can be fulfilled

projects

Delete a project

properties

Get a list of properties
Create a property
Update a property
Delete a property

server

Get the status of the Sonar server
Upgrade the Sonar database
Get the system properties

updatecenter/installed_plugins

Get the list of all the plugins installed on the Sonar instance

Response Formats

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

Check the available formats on the page of each web service.

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.

Authentication

Use Case

Example Request

Basic HTTP authentication.
Example with curl to get the server system properties with the user admin/admin. 

curl -u admin:admin http://localhost:9000/api/server/system

  • No labels