Menu

Profile System

Stephan Zavrel
Attachments
ProfileAPITester.png (21845 bytes)

Overview

easyrec version 1.0 includes a JSON based profile system, i.e. the ability to store meta data for items and actions. The profile system consists of several API calls that allow for storing and retrieving meta data for items and plugin mechanisms to enable basic analysis of the meta information. Profile support in the API is twofold:

  1. You can store/access item information using the Profile API:
    Use these API calls to manage additional information about specific items. E. g. for a movie this would be the place to store infos like genre, release date, actors, directors,... Basically any bit of information that describes the item in more detail and may be useful when gernerating recommendations. Please note that the profile system is not designed to be a primary datastore. Store as much information as necessary, but as little as possible. Storing kilobytes of movie review texts for example will hamper perfomance and quality.
    For more details check out the Profile API description.

    (insert sample)

  2. You can pass along small chunks of meta data with action API calls:
    Sometimes it can be helpful and valuable to pass along additional information whenever a user perfoms an action on an item. For example when sending a buy action for a user it can be interesting to store the price of that purchase. The information can be passed along with action calls using the actioninfo parameter and is limited to a 500 character JSON string. Use this method to store more volatile properties (e.g. price, promotion codes,...) or properties that describe characteristics of a specific item instance (e.g. size of clothing, showe size,...).

    (insert sample)

JSONPath

Some API calls and the profile system based generators/plugins use the JSONPath system to address specific fields in the JSON objects. Please refer to our introduction to JSONPath to get an understanding of how this works.

API

easyrec provides a REST APIs with calls to add and manage profiles. You can

  • store a profile for an existing item (store)
  • store items including a profile (storeitemwithprofile)
  • store/update parts of a profile (field store, field push)
  • delete the complete profile of an item (delete)
  • delete only a part of a profile (field delete)
  • load a profile, e.g. to display in frontend (load)
  • load only parts of a profile (field load)

To get a full description refer to the Profile API page.
If you host your own easyrec installation you may find the API tester page very helpful that you can access from the admin GUI if you navigate to the API tab:

profileAPITester


Related

Wiki: UPA

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.