<docbook><section><title>VirtOAuthTestToolExampleFeeds</title><title>Feed Manager OAuth REST API Example performed with the Virtuoso OAuth Testing Tool</title>Feed Manager OAuth REST API Example performed with the Virtuoso OAuth Testing Tool
<para>The following example demonstrates subscribing to feed and getting feed channel info by the ODS REST APIs <emphasis>feeds.subscribe</emphasis> and <emphasis>feeds.get</emphasis> using the OAuth Test Tool.
 Full list of the ODS REST APIs for ODS Feed Manager you can find <ulink url="VirtuosoOdsControllersFeeds">here</ulink>.</para>
<orderedlist spacing="compact"><listitem>Go to <ulink url="http://demo.openlinksw.com/ods">http://demo.openlinksw.com/ods</ulink> </listitem>
<listitem>Log in as user demo with password demo </listitem>
<listitem>Go to Settings-&gt;OAuth Keys <itemizedlist mark="bullet" spacing="compact"><listitem><figure><graphic fileref="VirtOAuthTestToolExampleFeeds/o1.png" /></figure> </listitem>
</itemizedlist></listitem>
<listitem>Copy the Token value for an Feed Manager instance or create such in not existing.
 For ex.: 6144bf4218f5f3950cdae53b2d33e6348486129b </listitem>
<listitem>Go to <ulink url="http://demo.openlinksw.com/ods/oauth_test.vsp">http://demo.openlinksw.com/ods/oauth_test.vsp</ulink> </listitem>
<listitem>In the shown form enter for: <orderedlist spacing="compact"><listitem> <emphasis>Server</emphasis>: <ulink url="http://demo.openlinksw.com/ods/api">http://demo.openlinksw.com/ods/api</ulink> </listitem>
<listitem> <emphasis>Consumer Key</emphasis>: 6144bf4218f5f3950cdae53b2d33e6348486129b </listitem>
<listitem> <emphasis>API method</emphasis>: feeds.subscribe </listitem>
<listitem> <emphasis>API parameters</emphasis>: <programlisting>inst_id=47&amp;uri=http://www.openlinksw.com/blog/~kidehen/gems/rss.xml
</programlisting><itemizedlist mark="bullet" spacing="compact"><listitem>An easy way to get the instance id is using the <ulink url="VirtuosoOdsControllers">ODS Framework Controller</ulink>  <emphasis>instance.get.id</emphasis>: <programlisting>$ curl -i &quot;http://demo.openlinksw.com/ods/api/instance.get.id?user_name=demo&amp;password_hash=4627dhe23cb53f522eag32e09gs7fceaw2c523449bdfdf&amp;instanceName=DemoFeeds&quot;
HTTP/1.1 200 OK
Server: Virtuoso/06.03.3131 (Linux) x86_64-generic-linux-glibc25-64  VDB
Connection: Keep-Alive
Date: Sun, 05 Feb 2012 21:01:20 GMT
Accept-Ranges: bytes
Content-Type: text/xml; charset=&quot;UTF-8&quot;
Content-Length: 58

&lt;result&gt;
  &lt;code&gt;47&lt;/code&gt;
  &lt;message&gt;Success&lt;/message&gt;
&lt;/result&gt;
</programlisting></listitem>
<listitem>You can also get the instance id using the <ulink url="VirtuosoOdsUbiquity">ODS Ubiquity commands</ulink> sequence: <programlisting>ods-host http://demo.openlinksw.com/ods
ods-set-mode sid
ods-authenticate-user demo password demo
ods-get-instance-id DemoFeeds
</programlisting></listitem>
</itemizedlist></listitem>
<listitem>Select for <emphasis>Query options</emphasis>: &quot;Generate URI and Submit&quot;.
</listitem>
</orderedlist><itemizedlist mark="bullet" spacing="compact"><listitem><figure><graphic fileref="VirtOAuthTestToolExampleFeeds/of1.png" /></figure> </listitem>
</itemizedlist></listitem>
<listitem>Click the &quot;Execute&quot; button.
</listitem>
<listitem>Enter the password for user demo and click the &quot;Login&quot; button.
</listitem>
<listitem>In the shown authorization form click the &quot;Authorize&quot; button.
<itemizedlist mark="bullet" spacing="compact"><listitem><figure><graphic fileref="VirtOAuthTestToolExampleFeeds/of2.png" /></figure> </listitem>
</itemizedlist></listitem>
<listitem>As result will be shown the generated URI and the output message of executing the ODS REST API.
 In our case, the id of the new created feed subscription will be: 133 <itemizedlist mark="bullet" spacing="compact"><listitem><figure><graphic fileref="VirtOAuthTestToolExampleFeeds/of3.png" /></figure> </listitem>
</itemizedlist></listitem>
<listitem>Now lets get the data for the created subscription.
 In the form enter: <orderedlist spacing="compact"><listitem> <emphasis>API method</emphasis>: feed.get </listitem>
<listitem> <emphasis>API parameters</emphasis>: feed_id=133 </listitem>
<listitem>Select for <emphasis>Query options</emphasis>: &quot;Generate URI and Submit&quot;.
</listitem>
</orderedlist></listitem>
<listitem>Click the &quot;Execute&quot; button.
</listitem>
<listitem>As result in the &quot;Response Body&quot; text-area will be shown the retrieved details for the subscription with the given above id.
<itemizedlist mark="bullet" spacing="compact"><listitem><figure><graphic fileref="VirtOAuthTestToolExampleFeeds/of4.png" /></figure></listitem>
</itemizedlist></listitem>
</orderedlist><bridgehead class="http://www.w3.org/1999/xhtml:h2">Related</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtuosoOdsControllersFeeds">Feed Manager REST Controllers</ulink> </listitem>
<listitem><ulink url="VirtOAuthTestTool">OAuth Test Tool for ODS Controllers</ulink> - Examples: <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtOAuthTestToolExampleBriefcase">ODS Briefcase</ulink> </listitem>
<listitem><ulink url="VirtOAuthTestToolExampleWeblog">ODS Weblog</ulink> </listitem>
<listitem><ulink url="VirtOAuthTestToolExampleAddressbook">ODS Addressbook</ulink> </listitem>
<listitem><ulink url="VirtOAuthTestToolExampleBookmarks">ODS Bookmarks</ulink> </listitem>
<listitem><ulink url="VirtOAuthTestToolExamplePolls">ODS Polls</ulink> </listitem>
<listitem><ulink url="VirtOAuthTestToolExampleCalendar">ODS Calendar</ulink> </listitem>
</itemizedlist></listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/wiki/main/Main/OAuth">OpenLink&#39;s explanation of OAuth</ulink> </listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/wiki/main/Main/VirtuosoOAuthServer">Virtuoso OAuth server</ulink> </listitem>
<listitem><ulink url="VirtOAuthControllers">Using OAuth with ODS</ulink> </listitem>
<listitem><ulink url="VirtuosoOdsUbiquity">ODS Ubiquity Commands</ulink> </listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/wiki/main/Main/VirtOAuth">Virtuoso OAuth Implementation</ulink> </listitem>
<listitem><ulink url="VirtuosoOdsControllers">ODS Controllers</ulink> </listitem>
<listitem><ulink url="VirtODSOAuthQA">Testing Virtuoso OAuth with 3rd Party OAuth Clients</ulink> </listitem>
<listitem><ulink url="VirtuosoOdsUbiquityTutorialsOAuth">OAuth Ubiquity Tutorial</ulink> </listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/wiki/main/Main/VirtOAuthSPARQL">Virtuoso SPARQL OAuth Tutorial</ulink> </listitem>
<listitem><ulink url="VirtuosoOdsUbiquityTutorials">ODS Ubiquity Tutorials</ulink> </listitem>
<listitem><ulink url="VirtOAuthExamples">OAuth Applications Authentication examples</ulink> </listitem>
<listitem><ulink url="http://oauth.net/core/1.0/">OAuth API</ulink></listitem>
</itemizedlist><para><ulink url="CategoryFeedManager">CategoryFeedManager</ulink> <ulink url="CategoryODS">CategoryODS</ulink> </para>
</section></docbook>