@@ -160,25 +160,35 @@ Place the following code snippet in the `<head>` section of your header template
160160# ## Check whether the bundle provides REST data
161161
162162You can verify the import controller of the bundle by calling the local API. 
163- Use the `Accept` header; you may need to add an `Authorization` header if authentication is required. 
163+ As the API uses token based authorization you first need a valid bearer token. 
164+ 
165+ When you publish a Content Item a bearer token will be created and saved to the ibexa_token db table. 
166+ 
167+ Additionally a POST request is send to the Personalization Engine,  containing the token 
168+ and the Rest URL where the Personalization Engine can fetch the changed Content. 
169+ 
170+ The BEARER_TOKEN will be the newest one in `ibexa_token` table having `type=1` and `identifier=update`. The token will by default be valid for 1 day. 
171+ 
172+ You can use this token to check what is provided to the Personalization Engine :
164173
165- To check whether the `content` endpoint is working as expected, perform the following request :
166174
167175` ` ` 
168- GET http://<yourdomain>/ api/ibexa/v2/personalization/v1/content/{contentId}
169- Accept application/vnd.ibexa.api.Content+json 
170- Authorization Basic xxxxxxxx  
176+ curl --location '{PERSONALIZATION_HOST_URI}/ api/ibexa/v2/personalization/v1/content/id/ {contentId}?lang={comma_separated_languages}' \ 
177+ --header ' Accept:  application/vnd.ibexa.api.Content+json' \ 
178+ --header ' Authorization: Bearer {BEARER_TOKEN}' 
171179` ` ` 
172180
173- Additionally, check whether the `contenttypes ` endpoint is working with the following request :
181+ Additionally, check whether the `contentlist ` endpoint is working with the following request :
174182
175183` ` ` 
176- GET http://<yourdomain>/api/ibexa/v2/personalization/v1/contenttypes/38?page=1&page_size=10 
177- Accept application/vnd.ibexa.api.Content+json 
178- Authorization Basic xxxxxxxx 
184+ 
185+ curl --location '{PERSONALIZATION_HOST_URI}/api/ibexa/v2/personalization/v1/contentlist/{comma_separated_content_ids}?lang={comma_separated_languages}' \ 
186+ --header 'Accept: application/vnd.ibexa.api.ContentList+json' \ 
187+ --header 'AUTHORIZATION: Bearer {BEARER_TOKEN}' 
188+ 
179189` ` ` 
180190
181- The `content` endpoint returns one item and the `contenttypes ` endpoint returns many. 
191+ The `content` endpoint returns one item and the `contentlist ` endpoint returns many. 
182192
183193` ` `  json
184194{ 
@@ -227,18 +237,7 @@ To get recommendations you must first export the item information to the Persona
227237After you [define item types to be tracked and recommended](#set-up-item-type-tracking), 
228238start the full export. 
229239
230- You do it with the `ibexa:personalization:run-export` command. 
231- 
232- If your installation hosts only one SiteAccess, run the following command to export your data :
233- 
234- ` ` `  bash
235- php bin/console ibexa:personalization:run-export 
236-     --item-type-identifier-list=<item_type>,<item_type> 
237-     --languages=<language>,<language> 
238- ` ` ` 
239- 
240- If your installation hosts multiple SiteAccesses with different customer IDs,  
241- you must run the export separately for each of the `<site_access_name>`/`<customer_id>` pairs. 
240+ You need to run the `ibexa:personalization:run-export command per SiteAccesses that you want to use together with Personalization. Please note that you need different customer IDs for different SiteAccesses. 
242241
243242` ` `  bash
244243php bin/console ibexa:personalization:run-export 
0 commit comments