Suggestions while the caller types a search
GET
/api/v1/saga/search/suggestions
const url = 'https://api.yggy.tech/api/v1/saga/search/suggestions?q=';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.yggy.tech/api/v1/saga/search/suggestions?q=' \ --header 'Authorization: Bearer <token>'A few things yggy recognised and a few notes whose name matches, for the search field. Names only; the full search also reads the text. Ignores case, accents and the German sharp s.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” q
What to look for. Fewer than 2 characters finds nothing.
string
What to look for. Fewer than 2 characters finds nothing.
Responses
Section titled “ Responses ”Suggestions
Media type application/json
object
query
required
string
topics
required
At most 4 things whose name matches; only things a note outside the trash backs.
Array<object>
object
id
required
The thing’s graph node id, the same the graph explorer uses.
string
label
required
string
group
required
string
noteCount
required
Notes outside the trash that mention it, at most 20.
number
notes
required
At most 4 notes whose name matches, newest first.
Array<object>
object
id
required
string
title
required
string
createdAt
required
string
Example
{ "topics": [ { "group": "people" } ]}Invalid request
Media type application/json
object
success
required
boolean
error
required
object
code
required
string
message
required
string
details
Example
{ "success": false}Not a yggy notes workspace
Media type application/json
object
success
required
boolean
error
required
object
code
required
string
message
required
string
details
Example
{ "success": false}Too many searches
Media type application/json
object
success
required
boolean
error
required
object
code
required
string
message
required
string
details
Example
{ "success": false}