Skip to main content
PUT
/
collections
/
{collection}
/
features
/
{feature}
import requests

url = "https://{FUSION HOST}/api/collections/{collection}/features/{feature}"

payload = {
    "name": "recommendations",
    "collectionId": "tempy",
    "params": {
        "idField": "id",
        "itemsForUser": True,
        "itemsForQuery": False,
        "itemsForItem": True,
        "queriesForQuery": False
    },
    "enabled": True
}
headers = {"Content-Type": "application/json"}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
This response has no body data.

Headers

If-Match
string
default:"-1"

An optional tag to match against the specified feature.

Path Parameters

collection
string
required

The name of a collection.

feature
enum<string>
required

The feature to update. Allowed values:

  • signals: Create a parallel collection for storing signals data (such as user clicks or ratings). Signals need to be indexed and aggregated before they can be used.
  • recommendations: Get configuration information about recommendations. Parameters include idField (document ID field), itemsForUser (enable or disable items-for-user recommendations), itemsForQuery (enable or disable items-for-query recommendations), itemsForItem (enable or disable items-for-item recommendations), and queriesForQuery (enable or disable queries-for-query recommendations).
Available options:
signals,
recommendations

Query Parameters

callback
boolean
default:true

Additional commands to execute.

Body

application/json

JSON-formatted configuration values.

The body is of type object.

Response

200 - undefined