Loading TOC...

dom:configuration-create

dom:configuration-create(
   $restart-user as xs:string,
   $evaluation-context as element(dom:evaluation-context),
   $default-domain as xs:unsignedLong,
   $permissions as element(sec:permission)*
) as xs:unsignedLong

Summary

Create a new CPF configuration.

Parameters
restart-user The username for the user who runs the restart trigger.
evaluation-context The evaluation-context element (for example, from the output of dom:evaluation-context for the domain.
default-domain The ID of the default domain.
permissions Zero or more permissions elements.

Example

xquery version "1.0-ml";
import module namespace dom = "http://marklogic.com/cpf/domains" 
		  at "/MarkLogic/cpf/domains.xqy";

dom:configuration-create( "admin", 
   dom:evaluation-context( xdmp:database("Modules"), "/" ),
   fn:data(dom:get("my-domain")/dom:domain-id), 
   (xdmp:permission('my-role', 'read'), 
   xdmp:permission('my-role', 'execute') )
)
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.