Skip to content

Recommendations

Toby Henderson edited this page Aug 12, 2015 · 3 revisions

Summary

Recommendations represent the list of recommended documents for a given user.

Status

Operation Status
Retrieving a list of recommended documents Beta

Operations

Retrieving a recommendations list

You can GET the recommended documents for a user and this will display a relevance ordered list of recommended documents based on the actions of the given user.

Recommendations will be paged, you can navigate between pages by following the next and prev links. The URI advertised by the user will always point to the most relevant recommendations.

The least relevant set of recommendations are advertised by the last link. The most relevant recommendations are available at the first link.

Please see Document for more details of this resource.

Example

In this example we are asking for the list of recommendations for user with id 123.

Request

GET /documents/recommendations/123 HTTP/1.1
Accept: application/vnd.huddle.data+xml
Authorization: OAuth2 frootymcnooty/vonbootycherooty

Response

HTTP/1.1 200 OK
Content-Type: application/vnd.huddle.data+xml
<recommendations xmlns="http://schema.huddle.net/2011/02/">
   <link rel="self" href="..." />
  
   <recommendation>
     <document title="..." description="...">
       <link rel="self" href="..." />

       ... other document elements ...  
     </document>

     <workspace title="...">
       <link rel="self" href="..." />
     </workspace>  

   </recommendation>
   <recommendation>
     <document title="..." description="...">
       <link rel="self" href="..." />

       ... other document elements ...  
     </document>

     <workspace title="...">
       <link rel="self" href="..." />
     </workspace>  

   </recommendation>
</recommendations>

Syntax

Examples

<recommendations xmlns="http://schema.huddle.net/2011/02/">
   <link rel="self" href="..." />
  
   <recommendation>
     <document title="..." description="...">
       <link rel="self" href="..." />

       ... other document elements ...  
     </document>

     <workspace title="...">
       <link rel="self" href="..." />
     </workspace>  

   </recommendation>
   <recommendation>
     <document title="..." description="...">
       <link rel="self" href="..." />

       ... other document elements ...  
     </document>

     <workspace title="...">
       <link rel="self" href="..." />
     </workspace>  

   </recommendation>
</recommendations>

Parameters

Name Description Methods Optional
pagesize Number of elements to return per page, between 50 - 2000. Default: 50 GET Yes

Request with parameter

GET /documents/recommendations/123?pagesize=150 HTTP/1.1
Accept: application/vnd.huddle.data+xml
Authorization: OAuth2 frootymcnooty/vonbootycherooty

Properties

Name Description
recommendation A recommendation element is a representation of the single recommended Document for the user.

Link relations

Name Description Methods
self The current URI of this recommendation list. GET
next The URI of the next set of recommendation ordered from most to least relevant. GET
prev The URI of the previous set of recommendation ordered from most to least relevant. GET
first The URI of the most relevant set of recommendations. GET
last The URI of the least relevant set of recommendations. GET

Schema


start = recommendations

recommendations = element h:recommendations {
	  link+,
          recommendation+
}

recommendation = element h:recommendation  {
  link+,
  element h:document{},
  element h:workspace{}
}

Classic
Clone this wiki locally