<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>rest api AML</title><link>https://www.aras.com/community/f/development/36139/rest-api-aml</link><description>Is it possible to send body with AML to rest api and get aml response? 
 
 I could create a method that accepts string and parse the aml and reply but not sure how that would apply on the rights (trying to get only the items the logged in user can see</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: rest api AML</title><link>https://www.aras.com/community/thread/6105?ContentTypeID=1</link><pubDate>Fri, 18 Dec 2020 04:58:31 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:969d436a-9647-4d2c-9ffc-834fedcba843</guid><dc:creator>detroit</dc:creator><description>&lt;p&gt;hey thank you for the help! I was thinking more in the lines of having identity &amp;quot;persisted&amp;quot; since i need to execute code as the user calling it. We have requirement of keeping stuff secure as in ...users can only see what they can actually see. Strict rules:)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: rest api AML</title><link>https://www.aras.com/community/thread/6102?ContentTypeID=1</link><pubDate>Thu, 17 Dec 2020 23:22:12 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:d56246f6-1ec2-4b4d-aa29-53d8c0124e57</guid><dc:creator>Trach Van</dc:creator><description>&lt;p&gt;You can pass in the AML and the IdentityName of that user and use the following code:&lt;/p&gt;
&lt;p&gt;var identityName = &amp;quot;Administrators&amp;quot;;&lt;br /&gt; var identity = Aras.Server.Security.Identity.GetByName(identityName);&lt;br /&gt; bool permissionWasSet = false;&lt;br /&gt; try&lt;br /&gt; {&lt;br /&gt;&amp;nbsp; permissionWasSet = Aras.Server.Security.Permissions.GrantIdentity(identity);&lt;br /&gt;&amp;nbsp; return item.apply();&lt;br /&gt; }&lt;br /&gt; finally&lt;br /&gt; {&lt;br /&gt; if (permissionWasSet)&lt;br /&gt; {&lt;br /&gt;&amp;nbsp; Aras.Server.Security.Permissions.RevokeIdentity(identity);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>