Recommendations - Huddle/huddle-apis GitHub Wiki
Recommendations are a relevance-ordered list of documents suggested for a user. The resource is served by the Files API; public URLs use the /files/ prefix.
The userId in the path must be the currently authenticated user; you cannot request another user’s list.
| Method | Path | Purpose | Details |
|---|---|---|---|
GET |
/files/documents/recommendations/123 |
Get recommended documents | Jump |
| Method | Path |
|---|---|
GET |
/files/documents/recommendations/{userId} |
Optional query keys (present on the URI template only; not used to slice results in the current implementation): page, pagesize.
GET /files/documents/recommendations/123 HTTP/1.1
Accept: application/vnd.huddle.data+xml
Authorization: Bearer frootymcnooty/vonbootycherootyHTTP/1.1 200 OK
Content-Type: application/vnd.huddle.data+xml<recommendations>
<link rel="self" href="https://api.example.com/files/documents/recommendations/123" />
<recommendation>
<document>
<link rel="self" href="https://api.example.com/files/documents/1001" />
</document>
</recommendation>
<recommendation>
<document>
<link rel="self" href="https://api.example.com/files/documents/1002" />
</document>
</recommendation>
</recommendations>Each recommendation uses the compact shape: a document element whose link entries identify the document (typically rel="self"). Titles, descriptions, and workspace blocks are not emitted by the current Files API view builder (a fuller RecommendationFullView type exists in code but is not used for this endpoint today).
HTTP/1.1 204 No ContentGET /files/documents/recommendations/123 HTTP/1.1
Accept: application/vnd.huddle.data+json
Authorization: Bearer frootymcnooty/vonbootycherootyHTTP/1.1 200 OK
Content-Type: application/vnd.huddle.data+json{
"links": [
{ "rel": "self", "href": "https://api.example.com/files/documents/recommendations/123" }
],
"recommendations": [
{
"document": {
"links": [
{ "rel": "self", "href": "https://api.example.com/files/documents/1001" }
]
}
},
{
"document": {
"links": [
{ "rel": "self", "href": "https://api.example.com/files/documents/1002" }
]
}
}
]
}| Name | Description |
|---|---|
recommendation |
One suggested document, as a compact document with links. |
document |
Use GET on the document self URI for full metadata (Document). |
| Name | Description | Methods |
|---|---|---|
self |
This recommendations list | GET |
| Code | Meaning |
|---|---|
200 OK |
Body contains recommendations
|
204 No Content |
No recommendations for this user |
401 Unauthorized |
Missing or invalid token |
403 Forbidden |
Authenticated user is not allowed to read this resource (e.g. userId does not match the token) |
Responses may be cacheable per Files API policy (private, short max-age in typical setups).
recommendations = element recommendations {
link+,
recommendation*
}
recommendation = element recommendation {
element document {
link+
}
}
-
Document — full document representation behind each
selflink