Loading TOC...

MarkLogic 12 Product Documentation
admin:issue-dynamic-host-token

admin:issue-dynamic-host-token(
   $group as xs:string,
   $hostname as xs:string,
   $port as xs:unsignedLong,
   $duration as xs:dayTimeDuration,
   $comment as xs:string
) as xs:string

Summary

This function issues a JWT dynamic host token that can be used to add dynamic hosts to the specified group. The maximum duration of this token is 15 minutes.

Parameters
group The name of the group to which the dynamic host will be added. This group must already exist in the cluster and has the allow dynamic hosts option turned on.
hostname The hostname of the join host that dynamic hosts will talk with this join host when joining. The hostname must be a valid hostname that can be passed to xdmp:host call. After you select the join host, you must turn on the API token authentication option of the Admin app server of the join host's group.
port The port number of the Admin app server of the join host's group. It is usually 8001 unless you changed this for the Admin app server.
duration The duration of this token. The maximum duration is 15 minutes.
comment A comment of this token. The comment can be used by the amdin:search-dynamic-host-token to search non-expired dynamic host token.

Required Privileges

This operation requires the following privilege:

http://marklogic.com/xdmp/privileges/admin/issue-dynamic-host-token

Example


  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin"
      at "/MarkLogic/admin.xqy";

  admin:issue-dynamic-host-token("Default", "foo.bar.com", 8001, xs:dayTimeDuration("PT10M"), "some comments for this token")
   

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