Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

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

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

 

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

...

...

languagenone

curl

...

-u

...

admin:admin

...

-X

...

DELETE

...

http://localhost:9000/api/favourites/org.codehaus.sonar:sonar

Parameters

Parameter

Description

Required

Default Value

Example Value

key

id or key of the resource

Yes

None

org.codehaus.sonar:sonar