danubeRecommendation

Recommendations for your data can be acquired by using the danubeRecommendation endpoint of the danube.ai cloud API. danubeRecommendation will send your dataset to danube.ai, where it is used to build correlation information with all other data elements. The endpoint returns a list of recommendated data elements based on the correlation from all previous requests.

Request

Below, the danubeRecommendation request's structure is shown.

body: {
  "query": String,
  "variables": {
    "data": RecommendationInputData
  }
}

The query parameter specifies which GraphQL endpoint to call (see example).

The RecommendationInputData has the following structure:

type RecommendationInputData: {
  "data": String,
  "n": Integer
}
  • data: A stringified json array, holding all session entries until now, where a session entry is an object of key-value pairs.
  • n: The maximum number of recommendations which will be returned (sorted by relevance). Has a hard limit of 20.

Response

A response from the danubeRecommendation endpoint has the following structure:

{
  "data": {
    "danubeRecommendation": {
      "correlatedData": String
    }
  }
}
  • correlatedData: A stringified json array, holding all recommended session entries (objects of key-value pairs) sorted by relevance.