Favorites

Controller class for executing operations on User's Favorite Items

Get a list of all Favorite Items marked by the user

GET https://account.sf-api.com/sf/v3/Users(id)/Favorites 
userIdString

Returns: A list of Favorite Items

Get a single Favorite Item for a User with a given streamid of the Item

GET https://account.sf-api.com/sf/v3/Favorites(userid=uid,streamid=sid) 
useridString
streamidString

Returns: A single Favorite Item

Mark an Item as Favorite

POST https://account.sf-api.com/sf/v3/Users(userid)/Favorites 
            { 
              "Item": { "StreamID" : "itemStreamId" }, 
              "Alias" : "FileName", 
              "DisplayPosition" : 1 
            } 

Alias and DisplayPostion are not mandatory, the API assigns them if not provided

userIdString
itemToMarkFavoriteFavorite Favorite instance

Returns: A single Favorite Item which was created with this request

Replace the Favorite Items for a User with the given list of new Favorite Items

PUT https://account.sf-api.com/sf/v3/Users(userid)/Favorites 
            [ 
             { 
              "Item": { "StreamID" : "item1StreamId" }, 
              "Alias" : "FileName1", 
              "DisplayPosition" : 1 
             }, 
             { 
              "Item": { "StreamID" : "item2StreamId" }, 
              "Alias" : "FileName2", 
              "DisplayPosition" : 2 
             } 
            ] 

The DisplayPosition and Alias for each Item should be unique

userIdString
favoriteItemsFavorite[] List of Favorite instance

Remove the given Favorite Item for a User

DELETE https://account.sf-api.com/sf/v3/Favorites(userid=uid,streamid=sid) 
userIdString
streamidString Favorite Item stream id

Remove all Favorite Items for a User

DELETE https://account.sf-api.com/sf/v3/Favorites 
userIdString