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.Update a feature
Update a feature’s properties.
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
An optional tag to match against the specified feature.
Path Parameters
The name of a collection.
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 includeidField(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), andqueriesForQuery(enable or disable queries-for-query recommendations).
Available options:
signals, recommendations Query Parameters
Additional commands to execute.
Body
application/json
JSON-formatted configuration values.
The body is of type object.
Response
200 - undefined
Was this page helpful?
⌘I