Newer Version Available

This content describes an older version of this product. View Latest

User Recommendations for a Specific Action and Key Prefix

Returns the recommendations for the specified action and key prefix for the context user.
Resource
1/chatter/users/userId/recommendations/action/idPrefix
1/connect/communities/communityId/chatter/users/userId/recommendations/action/idPrefix

userId must be the ID of the context user or the alias me.

Note

  • Valid values for action:
    • follow
    • join
    • view
  • The key prefix, or idPrefix in the resource URL, is the first three characters of the object ID and indicates the object type. Valid values for idPrefix in this URL are:
    • If action is follow, idPrefix is the key prefix for users (005), files (069), or records (such as 001 or 003).
    • If action is join, idPrefix is the key prefix for groups (0F9).
    • If action is view, idPrefix is the key prefix for users (005), files (069), groups (0F9), records (such as 001 or 003), custom recommendations (0RD) in version 34.0 and later, or static recommendations (T) in version 35.0 and later.
Available since version
26.0
Requires Chatter
Yes
HTTP methods
GET or HEAD
Request parameters for GET
Parameter Name Type Description Available Version
contextAction String Action that the user just performed. Supported values are:
  • follow
  • view
Use contextAction and contextObjectId together to get new recommendations based on the action just performed.
33.0
contextObjectId String ID of the object that the user just perfomed an action on.
  • If contextAction is follow, contextObjectId is user ID, file ID, or record ID.
  • If contextAction is view, contextObjectId is user ID, file ID, group ID, or record ID.
Use contextAction and contextObjectId together to get new recommendations based on the action just performed.
33.0
followed String ID of a user. Provides new recommendations based on the context of this user ID.

Use contextAction and contextObjectId in version 33.0 and later.

Important

23.0–32.0
maxResults Integer Maximum number of recommendation results; default is 10. Value must be greater than 0. 23.0
viewed String ID of a file. Provides new recommendations based on the context of this file ID.

Use contextAction and contextObjectId in version 33.0 and later.

Important

23.0–33.0
Example request URL
1/chatter/users/me/recommendations/view/001
Response body for GET
Recommendations