<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Permissions needed to call a API method</title><link>https://answers.axonivy.com/questions/1014/permissions-needed-to-call-a-api-method</link><description>&lt;p&gt;Where can I find what permissions a user needs to call an Axon.ivy API method?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1014/permissions-needed-to-call-a-api-method" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 21 Oct 2014 10:01:54 -0400</lastBuildDate><item><title>Answer by Reto Weiss</title><link>https://answers.axonivy.com/questions/1014/permissions-needed-to-call-a-api-method/1015</link><description>&lt;p&gt;In the &lt;a href="http://developer.axonivy.com/doc/latest/publicApi/"&gt;PublicAPI javadoc&lt;/a&gt; the permissions a user needs to call an API method is documented. Like the describtion of the "&lt;strong&gt;Parameters&lt;/strong&gt;" or "&lt;strong&gt;Throws&lt;/strong&gt;" of a method there maybe also a "&lt;strong&gt;Security&lt;/strong&gt;:" part in the method description.
The "&lt;strong&gt;Security&lt;/strong&gt;:" part contains the security rule that is performed before the method is executed. E.g. for &lt;code&gt;IRole#getName()&lt;/code&gt; the security rule is:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;SESSION OWNS RoleReadName PERMISSION OR OWNS RoleReadName@SYSTEM PERMISSION
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This means that the session that executes the method call must own permission RoleReadName either application wide (first part) or system wide (second part &lt;code&gt;@SYSTEM&lt;/code&gt;). &lt;/p&gt;
&lt;p&gt;Another example is the security role of &lt;code&gt;IUser#getName()&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;SESSION (MATCHES THIS AND OWNS UserReadOwnName PERMISSION) OR OWNS UserReadName PERMISSION OR OWNS UserReadName@SYSTEM PERMISSION
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This means that the session that executes the method call either must be:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;login with the user this method is executed on (&lt;code&gt;MATCHES THIS&lt;/code&gt;) and the session must own the permission UserReadOwnName (&lt;code&gt;OWNS UserReadOwnName PERMISSION&lt;/code&gt;) or&lt;/li&gt;
&lt;li&gt;owns the permission UserReadName (&lt;code&gt;OWNS UserReadName PERMISSION&lt;/code&gt;) or&lt;/li&gt;
&lt;li&gt;owns the permission UserReadName system wide (&lt;code&gt;OWNS UserReadName@SYSTEM PERMISSION&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Next example is method &lt;code&gt;IWorkflowSession#resumeTask(...)&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;SESSION IS SYSTEM
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This means that only internal Axon.ivy code (&lt;code&gt;SYSTEM&lt;/code&gt;) can execute this method. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reto Weiss</dc:creator><pubDate>Tue, 21 Oct 2014 10:01:54 -0400</pubDate><guid>https://answers.axonivy.com/questions/1014/permissions-needed-to-call-a-api-method/1015</guid></item></channel></rss>