Versions Compared

Key

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

...

Parameter

Description

Required

Default Value
formatResponse formats: xml or jsonNoxml

Create a Favourite

 

DescriptionCreate a favourite

URL

/api/favourites

MethodPOST

Security

Authentication required

Examples

  1. Create a favourite on resource resourceToFlag project Sonar (key = org.codehaus.sonar:sonar) for the user admin/admin:

    Code Block
    languagenone
    curl -u admin:admin -d "key=resourceToFlagorg.codehaus.sonar:sonar" http://localhost:9000/api/favourites

...

Parameter

Description

Required

Default Value

Value

key

id or key of the resource

Yes

None

org.codehaus.sonar:sonar

Delete a Favourite

 

DescriptionDelete a favourite

URL

/api/favourites/:key

MethodDELETE

Security

Authentication required

Examples

  1. Delete the favourite flag on resource resourceToUnflag 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

Parameters

Parameter

Description

Required

Default Value

Value

key

id or key of the resource

Yes

None

org.codehaus.sonar:sonar