Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
iconfalse
titleTable of Contents

Table of Contents
maxLevel1

Get a List of Profiles

DescriptionGet a list of profiles

URL

/api/profiles/list

HTTP MethodGET
Response Formatsjson

Security

None
Available sinceVersion 3.3

Examples

Response Format

Code Block
titleJSON
languagejavascript
[
  {
    "name":"Sonar way with Findbugs",
    "language":"java",
    "default":false
  },
  {
    "name":"Sonar way",
    "language":"java",
    "default":false
  },
  ...
]

Parameters

Parameter

Description

Required

Default Value

Example Value

language

Profile language

No

None

java

project

Project key or id

No

None

org.codehaus.sonar:sonar

format

Response format can be set through:

  • Parameter format: json
  • Or the 'Accept' property in the HTTP header:
  • Accept:application/json

If nothing is set, json is used.

NoNonejson

Get Coding Rules Activated in a Quality Profile

...

Parameter

Description

Required

Default Value

Example Value

language

Project language

Yes

None

java

name

Profile name. If not set, the default profile for the selected language is used.

No

None

Sonar%20way

rule_repositories

Comma-separated list of rules repository keys.

No

None

pmd,findbugs

rule_severities

Comma-separated list of rule severities.
Possible values: BLOCKER | CRITICAL | MAJOR | MINOR | INFO.

No

None

BLOCKER,CRITICAL

format

Response format can be set through:

  • Parameter format: xml | json
  • Or the 'Accept' property in the HTTP header:
    • Accept:text/xml
    • Accept:application/json
If nothing is set, json is used.
NoNonejson

...

DescriptionBackup a quality profile

URL

/api/profiles/backup

HTTP MethodGET
Response Formatsjson | xml
Security

Requires Global Administrator roleAdminister Quality Profiles permission

Available sinceVersion 3.1

...

DescriptionRestore a quality profile backup

URL

/api/profiles/restore

HTTP MethodPOST
Security

Requires Global Administrator roleAdminister Quality Profiles permission

Available sinceVersion 3.1

...

DescriptionDelete a quality profile

URL

/api/profiles/destroy

HTTP MethodPOST
Security

Requires Global Administrator roleAdminister Quality Profiles permission

Available sinceVersion 3.3

...

DescriptionDelete a quality profile

URL

/api/profiles/set_as_default

HTTP MethodPOST
Security

Requires Global Administrator roleAdminister Quality Profiles permission

Available sinceVersion 3.3

...