xdmp.amp( namespace as String, localname as String, module-uri as String, database as (Number|String) ) as (Number|String)
Returns the amp ID for the specified amp. Unlike the security
library module function sec:uid-for-name
, this function
can be evaluated 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.
xdmp.amp("http://marklogic.com/xdmp/security", "amp-add-roles", "/MarkLogic/security.xqy", 0); => 3548369234520018804
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.