<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to ImportAPI</title><link>https://sourceforge.net/p/easyrec/wiki/ImportAPI/</link><description>Recent changes to ImportAPI</description><atom:link href="https://sourceforge.net/p/easyrec/wiki/ImportAPI/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 11 Mar 2016 10:43:34 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/easyrec/wiki/ImportAPI/feed" rel="self" type="application/rss+xml"/><item><title>ImportAPI modified by Stephan Zavrel</title><link>https://sourceforge.net/p/easyrec/wiki/ImportAPI/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v8
+++ v9
@@ -109,3 +109,38 @@
 ### Response

 ### Error Codes
+
+## add itemtype
+You can add an item type to your tenant using the following API call 
+
+### Sample Call
+**HTTP GET**
+&amp;gt; &lt;code&gt;{*yourServerURL*}/api/1.1/additemtype?apikey=8ab9dc3ffcdac576d0f298043a60517a&amp;amp;tenantid=EASYREC_DEMO&lt;/code&gt;
+
+### Parameters
+parameter | occurrence | description
+----------|-----------|------------
+apikey | required | The required API Key to access this service. (e.g. "8ab9dc3ffcdac576d0f298043a60517a") 
+tenantid | required | tenant id to identify your website. (e.g. "EASYREC_DEMO")
+
+### Response
+
+### Error Codes
+
+## delete itemtype
+You can delete an item type from your tenant using the following API call.
+**Be aware that deleting an item type will also deltee all actions, rules and items with the given itemtype!**
+
+### Sample Call
+**HTTP GET**
+&amp;gt; &lt;code&gt;{*yourServerURL*}/api/1.1/additemtype?apikey=8ab9dc3ffcdac576d0f298043a60517a&amp;amp;tenantid=EASYREC_DEMO&lt;/code&gt;
+
+### Parameters
+parameter | occurrence | description
+----------|-----------|------------
+apikey | required | The required API Key to access this service. (e.g. "8ab9dc3ffcdac576d0f298043a60517a") 
+tenantid | required | tenant id to identify your website. (e.g. "EASYREC_DEMO")
+
+### Response
+
+### Error Codes
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stephan Zavrel</dc:creator><pubDate>Fri, 11 Mar 2016 10:43:34 -0000</pubDate><guid>https://sourceforge.net10d330bdfa2366281624e7fe5e38fdd2037e3a18</guid></item><item><title>ImportAPI modified by Stephan Zavrel</title><link>https://sourceforge.net/p/easyrec/wiki/ImportAPI/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v7
+++ v8
@@ -68,11 +68,12 @@
 itemurl | required | url that links to the item page on your Website.&lt;br/&gt;&lt;b&gt;Note:&lt;/b&gt;Please encode &amp;amp;'s in url with %26
 userid | optional | An optional anonymised id of a user. (e.g. "24EH1723322222A3")
 itemimageurl | optional | An optional item image url that links to a image of the item.&lt;br/&gt;&lt;b&gt;Note:&lt;/b&gt;Please encode  timestamp of the action. The parameter has the format "dd_MM_yyyy_HH_mm_ss" (e.g."01_01_2009_23_59_59").        
-itemtype | optional; default:ITEM |An optional item type that denotes the type of the item (e.g. IMAGE, VIDEO, BOOK, etc.). 
+itemtype | optional; default:ITEM |An optional item type that denotes the type of the item (e.g. IMAGE, VIDEO, BOOK, etc.).
+If not supplied the default value ITEM will be used.

 ### Response

-### Error CodesIf not supplied the default value ITEM will be used.
+### Error Codes

 ## set item active
 This call sets an item active or inactive. 
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stephan Zavrel</dc:creator><pubDate>Wed, 05 Aug 2015 14:01:40 -0000</pubDate><guid>https://sourceforge.net7b86b0cbfa04fd0c846b7f644336d366ce20d5e1</guid></item><item><title>ImportAPI modified by Stephan Zavrel</title><link>https://sourceforge.net/p/easyrec/wiki/ImportAPI/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v6
+++ v7
@@ -34,7 +34,7 @@

 ### Parameters

-parameter | occurence | description
+parameter | occurrence | description
 ----------|-----------|------------
 token | required | The required security token ("b08f41cfa92b430538146cf474116c6d") to access this service. This token is only valid for the current session.Note: The token invalidates, if you sign out.
 tenantid | required | tenant id to identify your Website. (e.g. "EASYREC_DEMO")
@@ -44,6 +44,10 @@
 assoctype | required | A required association type. This parameter may be set to one of the following predefined values: VIEWED_TOGETHER, BOUGHT_TOGETHER, GOOD_RATED_TOGETHER, IS_RELATED. You can add more arbitrary accoy types using the Admin GUI.
 itemfromtype | optional; default:ITEM | item type that denotes the type of the base item (e.g. IMAGE, VIDEO, BOOK, etc.). If not supplied the default value ITEM will be used.
 itemtotype | optional; default:ITEM | item type that denotes the type of the partner item (e.g. IMAGE, VIDEO, BOOK, etc.). If not supplied the default value ITEM will be used. 
+
+### Response
+
+### Error Codes

 ## import/update item
 This call imports or updates an item. 
@@ -64,7 +68,11 @@
 itemurl | required | url that links to the item page on your Website.&lt;br/&gt;&lt;b&gt;Note:&lt;/b&gt;Please encode &amp;amp;'s in url with %26
 userid | optional | An optional anonymised id of a user. (e.g. "24EH1723322222A3")
 itemimageurl | optional | An optional item image url that links to a image of the item.&lt;br/&gt;&lt;b&gt;Note:&lt;/b&gt;Please encode  timestamp of the action. The parameter has the format "dd_MM_yyyy_HH_mm_ss" (e.g."01_01_2009_23_59_59").        
-itemtype | optional; default:ITEM |An optional item type that denotes the type of the item (e.g. IMAGE, VIDEO, BOOK, etc.). If not supplied the default value ITEM will be used.
+itemtype | optional; default:ITEM |An optional item type that denotes the type of the item (e.g. IMAGE, VIDEO, BOOK, etc.). 
+
+### Response
+
+### Error CodesIf not supplied the default value ITEM will be used.

 ## set item active
 This call sets an item active or inactive. 
@@ -76,10 +84,27 @@

 ### Parameters

-parameter | occurence | description
+parameter | occurrence | description
 ----------|-----------|------------
 token | required | The required security token ("b08f41cfa92b430538146cf474116c6d") to access this service. This token is only valid for the current session.Note: The token invalidates, if you sign out.
 tenantid | required | tenant id to identify your website. (e.g. "EASYREC_DEMO")
 itemid | required | The id of the item you want to activate or deactivate 
 active | required | This value is used to activate or deactivate an item - set it to true(active)or false(deactivate)     
 itemtype | optional; default:ITEM | item type that denotes the type of the partner item (e.g. IMAGE, VIDEO, BOOK, etc.). If not supplied the default value ITEM will be used. 
+
+## item types
+If you want to load all item types of your tenant you can use the following API call 
+
+### Sample Call
+**HTTP GET**
+&amp;gt; &lt;code&gt;{*yourServerURL*}/api/1.0/itemtypes?apikey=8ab9dc3ffcdac576d0f298043a60517a&amp;amp;tenantid=EASYREC_DEMO&lt;/code&gt;
+
+### Parameters
+parameter | occurrence | description
+----------|-----------|------------
+apikey | required | The required API Key to access this service. (e.g. "8ab9dc3ffcdac576d0f298043a60517a") 
+tenantid | required | tenant id to identify your website. (e.g. "EASYREC_DEMO")
+
+### Response
+
+### Error Codes
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stephan Zavrel</dc:creator><pubDate>Wed, 05 Aug 2015 14:00:33 -0000</pubDate><guid>https://sourceforge.net8ac71915ca25989a83e9d4697ef99df9a9aa9b75</guid></item><item><title>ImportAPI modified by Stephan Zavrel</title><link>https://sourceforge.net/p/easyrec/wiki/ImportAPI/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -75,3 +75,11 @@
 &amp;gt; &lt;code&gt;{*yourServerURL*}/api/1.1/setitemactive?token=8ab9dc3ffcdac576d0f298043a60517a&amp;amp;tenantid=EASYREC_DEMO&amp;amp;itemid=42&amp;amp;active=true&amp;amp;itemtype=ITEM&lt;/code&gt;

 ### Parameters
+
+parameter | occurence | description
+----------|-----------|------------
+token | required | The required security token ("b08f41cfa92b430538146cf474116c6d") to access this service. This token is only valid for the current session.Note: The token invalidates, if you sign out.
+tenantid | required | tenant id to identify your website. (e.g. "EASYREC_DEMO")
+itemid | required | The id of the item you want to activate or deactivate 
+active | required | This value is used to activate or deactivate an item - set it to true(active)or false(deactivate)     
+itemtype | optional; default:ITEM | item type that denotes the type of the partner item (e.g. IMAGE, VIDEO, BOOK, etc.). If not supplied the default value ITEM will be used. 
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stephan Zavrel</dc:creator><pubDate>Tue, 04 Aug 2015 16:22:26 -0000</pubDate><guid>https://sourceforge.net4cf8b6b33f6a02f4b68dfa2aa10f145a155149e2</guid></item><item><title>ImportAPI modified by Stephan Zavrel</title><link>https://sourceforge.net/p/easyrec/wiki/ImportAPI/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -34,13 +34,24 @@

 ### Parameters

+parameter | occurence | description
+----------|-----------|------------
+token | required | The required security token ("b08f41cfa92b430538146cf474116c6d") to access this service. This token is only valid for the current session.Note: The token invalidates, if you sign out.
+tenantid | required | tenant id to identify your Website. (e.g. "EASYREC_DEMO")
+itemfromid | required | A required base item id for the relation (e.g. "ID001")
+itemtoid | required | A required partner item id for the relation (e.g. "ID003")     
+assocvalue | required | A required association value (0-100) to describe the relation strength between the two items. (e.g. "95.443"). **Note:**If you want to "delete" an imported rule, simply pass 0.0 as assoc value and the rule will not be shown in any recommendation, as long the ruleminer did not compute the same rule. If the same rule was computed or imported by different sources the average assoc value is taken. For example: the ruleminer computed a rule between item A and B with an association value of 50. Then a rule for the same two items with an asooc value of 100 is manually imported. The final association strength between the two items will be 75. 
+assoctype | required | A required association type. This parameter may be set to one of the following predefined values: VIEWED_TOGETHER, BOUGHT_TOGETHER, GOOD_RATED_TOGETHER, IS_RELATED. You can add more arbitrary accoy types using the Admin GUI.
+itemfromtype | optional; default:ITEM | item type that denotes the type of the base item (e.g. IMAGE, VIDEO, BOOK, etc.). If not supplied the default value ITEM will be used.
+itemtotype | optional; default:ITEM | item type that denotes the type of the partner item (e.g. IMAGE, VIDEO, BOOK, etc.). If not supplied the default value ITEM will be used. 
+
 ## import/update item
 This call imports or updates an item. 

 ### Sample call
 **HTTP GET**

-&amp;gt; &lt;code&gt;&amp;lt;yourServerURL&amp;gt;/api/1.1/importitem?token=b08f41cfa92b430538146cf474116c6d&amp;amp;tenantid=EASYREC_DEMO&amp;amp;itemid=42&amp;amp;itemdescription=Fatboy%20Slim%20-%20The%20Rockafeller%20Skank&amp;amp;itemurl=/item/fatboyslim&amp;amp;itemimageurl=/img/covers/fatboyslim.jpg&amp;amp;itemtype=ITEM&lt;/code&gt;
+&amp;gt; &lt;code&gt;{*yourServerURL*}/api/1.1/importitem?token=b08f41cfa92b430538146cf474116c6d&amp;amp;tenantid=EASYREC_DEMO&amp;amp;itemid=42&amp;amp;itemdescription=Fatboy%20Slim%20-%20The%20Rockafeller%20Skank&amp;amp;itemurl=/item/fatboyslim&amp;amp;itemimageurl=/img/covers/fatboyslim.jpg&amp;amp;itemtype=ITEM&lt;/code&gt;

 ### Parameters

@@ -54,7 +65,6 @@
 userid | optional | An optional anonymised id of a user. (e.g. "24EH1723322222A3")
 itemimageurl | optional | An optional item image url that links to a image of the item.&lt;br/&gt;&lt;b&gt;Note:&lt;/b&gt;Please encode  timestamp of the action. The parameter has the format "dd_MM_yyyy_HH_mm_ss" (e.g."01_01_2009_23_59_59").        
 itemtype | optional; default:ITEM |An optional item type that denotes the type of the item (e.g. IMAGE, VIDEO, BOOK, etc.). If not supplied the default value ITEM will be used.
-actioninfo | optional | an arbitraray val

 ## set item active
 This call sets an item active or inactive. 
@@ -62,6 +72,6 @@
 ### Sample call
 **HTTP GET**

-&amp;gt; &lt;code&gt;{*yourServerURL*}/api/1.1/setitemactive?apikey=8ab9dc3ffcdac576d0f298043a60517a&amp;amp;tenantid=EASYREC_DEMO&amp;amp;itemid=42&amp;amp;active=true&amp;amp;itemtype=ITEM&lt;/code&gt;
+&amp;gt; &lt;code&gt;{*yourServerURL*}/api/1.1/setitemactive?token=8ab9dc3ffcdac576d0f298043a60517a&amp;amp;tenantid=EASYREC_DEMO&amp;amp;itemid=42&amp;amp;active=true&amp;amp;itemtype=ITEM&lt;/code&gt;

 ### Parameters
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stephan Zavrel</dc:creator><pubDate>Tue, 04 Aug 2015 15:27:57 -0000</pubDate><guid>https://sourceforge.net1dc4e70094fcacce68e4dbd9452103a00bc817ec</guid></item><item><title>ImportAPI modified by Stephan Zavrel</title><link>https://sourceforge.net/p/easyrec/wiki/ImportAPI/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -44,6 +44,18 @@

 ### Parameters

+parameter | occurence | description
+----------|-----------|------------
+token | required | The required security token ("b08f41cfa92b430538146cf474116c6d") to access this service. This token is only valid for the current session.Note: The token invalidates, if you sign out.
+tenantid | required | tenant id to identify your Website. (e.g. "EASYREC_DEMO")
+itemid | required | id to identify an item on your Website. (e.g. "ID001")    
+itemdescription | required | item description that is displayed when showing recommendations on your Website. (e.g. "the frog")
+itemurl | required | url that links to the item page on your Website.&lt;br/&gt;&lt;b&gt;Note:&lt;/b&gt;Please encode &amp;amp;'s in url with %26
+userid | optional | An optional anonymised id of a user. (e.g. "24EH1723322222A3")
+itemimageurl | optional | An optional item image url that links to a image of the item.&lt;br/&gt;&lt;b&gt;Note:&lt;/b&gt;Please encode  timestamp of the action. The parameter has the format "dd_MM_yyyy_HH_mm_ss" (e.g."01_01_2009_23_59_59").        
+itemtype | optional; default:ITEM |An optional item type that denotes the type of the item (e.g. IMAGE, VIDEO, BOOK, etc.). If not supplied the default value ITEM will be used.
+actioninfo | optional | an arbitraray val
+
 ## set item active
 This call sets an item active or inactive. 

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stephan Zavrel</dc:creator><pubDate>Tue, 04 Aug 2015 14:58:32 -0000</pubDate><guid>https://sourceforge.netf8945b4d57c1b9383b9eaaedb523c036550962b9</guid></item><item><title>ImportAPI modified by Stephan Zavrel</title><link>https://sourceforge.net/p/easyrec/wiki/ImportAPI/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -1,4 +1,6 @@
 [TOC]
+
+## General Information

 To use the Import API, the Security Token (e.g. b08f41cfa92b430538146cf474116c6d), which is generated as soon you sign in, has to be used in every Import API call. You can copy the Token form the section on the left under the API key or you can retrieve the Token from 
 &amp;gt; &lt;code&gt;[webapp path]/operator/signin?operatorId=USER&amp;amp;password=PASSWORD&lt;/code&gt;
@@ -15,3 +17,39 @@
 &lt;/pre&gt;

&lt;p&gt;The token is invalidated when you sign out or as soon another user with the same credentials signs in. Note: During an import, make sure no one else signs in under your account, otherwise you will have to update the security token. &lt;br/&gt;
+&lt;br/&gt;
+## import rule&lt;br/&gt;
+This call imports a rule. &lt;br/&gt;
+&lt;br/&gt;
+A rule is relation between two items. (e.g. item A was viewed together with item B, where 'viewed together' is the assocation type, item A the 'from'-item and item B the 'to'-item). The strength of a relation is set through the association value, which starts from &amp;gt;0.0 (weak relation) to 100 (strongest relation). A set of rules having the same 'from'-item A are called recommendations of item A. &lt;br/&gt;
+&lt;br/&gt;
+Rules are automatically computed by the ruleminer on a daily basis as soon significant user patterns are identified. In case you want to import your own rules you may query the Import API with the provided security token.&lt;br/&gt;
+&lt;br/&gt;
+&lt;br/&gt;
+### Sample call&lt;br/&gt;
+&lt;strong&gt;HTTP GET&lt;/strong&gt;&lt;br/&gt;
+&lt;br/&gt;
+&amp;gt; &lt;code&gt;{&lt;em&gt;yourServerURL&lt;/em&gt;}/api/1.1/importrule?token=b08f41cfa92b430538146cf474116c6d&amp;amp;tenantid=EASYREC_DEMO&amp;amp;itemfromid=42&amp;amp;itemfromtype=ITEM&amp;amp;itemtoid=42&amp;amp;itemtotype=ITEM&amp;amp;assoctype=VIEWED_TOGETHER&amp;amp;assocvalue=95.443&lt;/code&gt; &lt;br/&gt;
+&lt;br/&gt;
+&lt;br/&gt;
+### Parameters&lt;br/&gt;
+&lt;br/&gt;
+## import/update item&lt;br/&gt;
+This call imports or updates an item. &lt;br/&gt;
+&lt;br/&gt;
+### Sample call&lt;br/&gt;
+&lt;strong&gt;HTTP GET&lt;/strong&gt;&lt;br/&gt;
+&lt;br/&gt;
+&amp;gt; &lt;code&gt;&amp;lt;yourServerURL&amp;gt;/api/1.1/importitem?token=b08f41cfa92b430538146cf474116c6d&amp;amp;tenantid=EASYREC_DEMO&amp;amp;itemid=42&amp;amp;itemdescription=Fatboy%20Slim%20-%20The%20Rockafeller%20Skank&amp;amp;itemurl=/item/fatboyslim&amp;amp;itemimageurl=/img/covers/fatboyslim.jpg&amp;amp;itemtype=ITEM&lt;/code&gt;&lt;br/&gt;
+&lt;br/&gt;
+### Parameters&lt;br/&gt;
+&lt;br/&gt;
+## set item active&lt;br/&gt;
+This call sets an item active or inactive. &lt;br/&gt;
+&lt;br/&gt;
+### Sample call&lt;br/&gt;
+&lt;strong&gt;HTTP GET&lt;/strong&gt;&lt;br/&gt;
+&lt;br/&gt;
+&amp;gt; &lt;code&gt;{&lt;em&gt;yourServerURL&lt;/em&gt;}/api/1.1/setitemactive?apikey=8ab9dc3ffcdac576d0f298043a60517a&amp;amp;tenantid=EASYREC_DEMO&amp;amp;itemid=42&amp;amp;active=true&amp;amp;itemtype=ITEM&lt;/code&gt;&lt;br/&gt;
+&lt;br/&gt;
+### Parameters&lt;br/&gt;
&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stephan Zavrel</dc:creator><pubDate>Tue, 04 Aug 2015 14:44:34 -0000</pubDate><guid>https://sourceforge.netd9856657ca9dda05cd244b9681691bf76636ab4c</guid></item><item><title>ImportAPI modified by Stephan Zavrel</title><link>https://sourceforge.net/p/easyrec/wiki/ImportAPI/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -0,0 +1,17 @@
+[TOC]
+
+To use the Import API, the Security Token (e.g. b08f41cfa92b430538146cf474116c6d), which is generated as soon you sign in, has to be used in every Import API call. You can copy the Token form the section on the left under the API key or you can retrieve the Token from 
+&amp;gt; &lt;code&gt;[webapp path]/operator/signin?operatorId=USER&amp;amp;password=PASSWORD&lt;/code&gt;
+
+
+which returns an xml like
+&lt;pre&gt;&lt;code&gt;
+
+  &amp;lt;easyrec&amp;gt;
+    &amp;lt;action&amp;gt;signin&amp;lt;/action&amp;gt;
+    &amp;lt;success code="105" message="User is signed in!"/&amp;gt;
+    &amp;lt;token&amp;gt;b08f41cfa92b430538146cf474116c6d&amp;lt;/token&amp;gt;
+  &amp;lt;/easyrec&amp;gt;
+&lt;/code&gt;&lt;/pre&gt;
+
+The token is invalidated when you sign out or as soon another user with the same credentials signs in. Note: During an import, make sure no one else signs in under your account, otherwise you will have to update the security token. 
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stephan Zavrel</dc:creator><pubDate>Tue, 04 Aug 2015 13:38:56 -0000</pubDate><guid>https://sourceforge.net37c93c7ca41d8b619916488e5ea3457618f95549</guid></item><item><title>ImportAPI modified by Stephan Zavrel</title><link>https://sourceforge.net/p/easyrec/wiki/ImportAPI/</link><description/><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stephan Zavrel</dc:creator><pubDate>Tue, 04 Aug 2015 13:18:30 -0000</pubDate><guid>https://sourceforge.net93c758197c9c333206e9b3ed5f68374e9e98e7c9</guid></item></channel></rss>