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

Table of Contents

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

Available Web Services

To get the list of all the available web services and their parameters: /api/webservices/list (available since SonarQube 4.2).

 Notes:

  • This list is limited to web services written in Java. Web services written in Ruby are not listed.
  • Only web services marked as "internal: false" should be used.

/api/webservices/list

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
Add tags to a rule
Remove tags from a rule 

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

rule_tags

Create a rule tag
Get the list of available rule tags

action_plans

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

issue_filters

Get the Detail of an Issue Filter

Get a list of favorite Issue filters

Project Measures

Web Service

Examples of use cases that can be fulfilled

resources (Components)

Get a list of components

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

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

metrics

Get a list of metrics
Create / Update / Delete a manual metric 

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
Create a user
Update a user

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 favorites
Create a favorite
Delete a favorite

authentication

Check authentication

permissionsAdd or remove user permissions

Administration

Web Service

Examples of use cases that can be fulfilled

projects

Delete a project
Provision a project 

properties

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

server

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

updatecenter/installed_plugins

Get the list of all the plugins installed on the SonarQube 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