<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.amp.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.amp</api:function-name><api:suggest>xdmp.amp</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>amp</api:suggest><api:function-link mode="xquery" fullname="xdmp:amp">/apidoc/8.0/xdmp:amp.xml</api:function-link><api:function mode="javascript" name="amp" type="builtin" lib="xdmp" category="Security" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.amp"><api:summary>
  Returns the amp ID for the specified amp.  Unlike the security
  library module function <code xmlns="http://www.w3.org/1999/xhtml">sec:uid-for-name</code>, this function
  can be evaluted against any database and does not need to be evaluated
  directly against the security database.  It returns the amp ID from the
  security database configured for the database in which the App Server
  evaluates against.
</api:summary><api:params><api:param name="namespace" type="xs:string"><api:param-description>
    A function namespace.
  </api:param-description><api:param-name>namespace</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="localname" type="xs:string"><api:param-description>
    A function localname.  </api:param-description><api:param-name>localname</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="module-uri" type="xs:string"><api:param-description>
    The module URI for the amp.
  </api:param-description><api:param-name>module-uri</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="database" type="xs:unsignedLong"><api:param-description>
    The ID of the database in which the module to which this amp refers is
    stored.  If the module is on the filesystem under the <code xmlns="http://www.w3.org/1999/xhtml">Modules</code>
    directory, then specify 0 for the database ID.
  </api:param-description><api:param-name>database</api:param-name><api:param-type>String</api:param-type></api:param></api:params><api:return>String</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.amp("http://marklogic.com/xdmp/security", "amp-add-roles",
         "/MarkLogic/security.xqy", 0);
=&gt; 3548369234520018804
</pre></api:example></api:function></api:function-page>