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 Favourites

DescriptionGet the logged in user's list of favourites

URL

/api/favourites

HTTP MethodGET
Response Formatsjson | xml

Security

Authentication required

Examples

...

Use CaseExample Request
Get the logged in user's list of favourites

...

...

languagenone

GET

...

Parameter

Description

Required

Default ValueExample Value
formatResponse formats.
Possible values: xml or | json
NoxmlNonejson

Create a Favourite

 

DescriptionCreate a favourite

URL

/api/favourites

HTTP MethodPOST

Security

Authentication required

Examples

Use CaseExample Request
Create a favourite on project Sonar (key = org.codehaus.sonar:sonar) for the user admin/admin

...

...

languagenone

curl

...

-u

...

admin:admin

...

-d

...

"key=org.codehaus.sonar:sonar"

...

http://localhost:9000/api/favourites

 

Parameters

Parameter

Description

Required

Default Value

Example Value

key

id or key of the resource

Yes

None

org.codehaus.sonar:sonar

...

 

DescriptionDelete a favourite

URL

/api/favourites/:key

HTTP MethodDELETE

Security

Authentication required

Examples

Use CaseExample Request
Create a favourite on project Sonar (key = org.codehaus.sonar:sonar) for the user admin/admin

curl -u admin:admin -d "key=org.codehaus.sonar:sonar" http://localhost:9000/api/favourites

 

  1. Delete the favourite flag on project Sonar (key =  org.codehaus.sonar:sonar) for the user admin/admin:

    Code Block
    languagenone
    curl -u admin:admin -X DELETE http://localhost:9000/api/favourites/org.codehaus.sonar:sonar

...