Script
Create, update, copy, rename, delete and export the MQL scripts that hold your business logic, then run them with execute, call or include. Other functions set delay and stack options, show the users and groups granted to a script, and generate ready-made requests. Typical uses: deploy a web service, move a group of scripts from one server to another.
script export_groupscript import_groupscript create script create|insert|addscript updatescript mergescript set delayscript set stackscript getscript generate createscript generate updatescript generate mergescript copyscript copy allscript renamescript rename allscript existscript showscript show ghostscript export_allscript get_allexecutecallincludescript is grantedscript generate urlscript generate delayscript generate executescript generate stackscript generate callscript generate includescript generate sub_includescript show groupsscript show usersscript show paramsscript deletescript delete all

script export_group <group>


Description

    Export all the scripts of a group

Parameters

    group:   The group name - string - required
admin
script export_group "group";
mentdb
Scripts exported with successfully.
Used in use cases (3 recipes)

    Versioning & deployment › Export a group to files and import it back
    Application developer › Version the scripts of a group
    Versioning & deployment › Package a release folder with a manifest
Often used with

    group grant script  ·  script delete  ·  bd*  ·  file delete  ·  file dir_list  ·  file load  ·  group add  ·  group remove

script import_group <group>


Description

    Import all scripts

Parameters

    group:   The group name - string - required
admin
script import_group "group";
mentdb
Scripts imported with successfully.
Used in use cases (1 recipe)

    Versioning & deployment › Export a group to files and import it back
Often used with

    bd*  ·  execute  ·  file delete  ·  file dir_list  ·  file load  ·  group add  ·  group grant script  ·  group is granted script

script create <method> <scriptName> <activateLog> <nbAttempt> <variables> <desc> <script> <return>


Synonymous

    script create|insert|add

Description

    To create a new script

Parameters

    method:   The method (post|get|put|delete|exe|conf|app) - string - required
    scriptName:   The script name - string - required
    activateLog:   Activate the activity log (true|false) - boolean - required
    nbAttempt:   The number of attempts to execute in the stack - number - required
    variables:   The variables object - string - required
    desc:   The description of the script action - string - required
    script:   The script - string - required
    return:   The description of the return value - string - required
admin
script create post "addition" false 1 (param (var "[v1]" {type is_double [v1]} "description ..." is_null:true is_empty:true "example ...") (var "[v2]" {type is_double [v2]} "description ..." is_null:true is_empty:true "example ...") ) "description ..." { + [v1] [v2]; } "Return ...";
mentdb
Script added with successful.
Used in use cases (106 recipes)

    MQL beginner › Your first script with typed parameters
    Backend & web service developer › Publish a typed web service with its parameter and stack options
    JSON & document store developer › A report cached in a node with a time to live
    Script developer › A script with typed parameters rejects bad calls
    Execution modes › execute runs in a new environment
    Web service developer › POST: create an order with validation
    and 100 more in the Use cases
Often used with

    script delete  ·  execute  ·  string regexp_extract  ·  wait  ·  try  ·  and  ·  string substring  ·  type is_double

script update <scriptName> <activateLog> <nbAttempt> <variables> <desc> <script> <return>


Description

    To update a script

Parameters

    scriptName:   The script name - string - required
    activateLog:   Activate the activity log (true|false) - boolean - required
    nbAttempt:   The number of attempts to execute in the stack - number - required
    variables:   The variables separated by ',' - string - required
    desc:   The description of the script action - string - required
    script:   The script - string - required
    return:   The description of the return value - string - required
admin
script update "addition.post" false 1 (param (var "[v1]" {type is_double [v1]} "description ..." is_null:true is_empty:true "example ...") (var "[v2]" {type is_double [v2]} "description ..." is_null:true is_empty:true "example ...") ;) "description ..." { + [v1] [v2]; } "Return ...";
mentdb
Script updated with successful.
Used in use cases (4 recipes)

    Versioning & deployment › Change a script, see it as U, commit again and read the history
    Versioning & deployment › Hotfix: commit a single script, not the whole group
    Versioning & deployment › Review: what changed between two commits
    Versioning & deployment › Rollback: restore the previous version of a script
Often used with

    bd*  ·  file delete  ·  group add  ·  group grant script  ·  group remove  ·  script create  ·  script delete  ·  type is_double

script merge <scriptName> <activateLog> <nbAttempt> <variables> <desc> <script> <return>


Description

    To merge a script

Parameters

    scriptName:   The script name - string - required
    activateLog:   Activate the activity log (true|false) - boolean - required
    nbAttempt:   The number of attempts to execute in the stack - number - required
    variables:   The variables separated by ',' - string - required
    desc:   The description of the script action - string - required
    script:   The script - string - required
    return:   The description of the return value - string - required
admin
script merge "addition.post" false 1 (param (var "[v1]" {type is_double [v1]} "description ..." is_null:true is_empty:true "example ...") (var "[v2]" {type is_double [v2]} "description ..." is_null:true is_empty:true "example ...") ;) "description ..." { + [v1] [v2]; } "Return ...";
mentdb
Script merged with successful.
Used in use cases (2 recipes)

    Backend & web service developer › Versioned API behind one router, deployed with merge
    Versioning & deployment › Roll a whole group back to a release
Often used with

    execute  ·  script delete  ·  string regexp_extract  ·  type is_double  ·  bd*  ·  eval  ·  exception  ·  file delete

script set delay <scriptName> <delayValue> <delayType> <delayCondition>


Description

    To set the delay options

Parameters

    scriptName:   The script name - string - required
    delayValue:   The delay value - string - required
    delayType:   The delay type (sec|min|hour|day|month|year) - string - required
    delayCondition:   The delay condition - string - required
admin
script set delay "addition.post" 10 day { true };
mentdb
1
Used in use cases (6 recipes)

    Backend & web service developer › Publish a typed web service with its parameter and stack options
    Script developer › Stack and delay options of a batch script
    Execution modes › Stack run postponed until a gate opens
    Scheduler developer › Postpone a stack run until a condition is true
    Event developer › Wait for the READY flag before loading the files
    Automation architect › Nightly import with a cron, a file watcher and a flow
Often used with

    script create  ·  script delete  ·  script set stack  ·  and  ·  date now  ·  parameter get value  ·  stack  ·  wait

script set stack <scriptName> <priority> <nbInThread> <replayable>


Description

    To set the stack options of a script: priority, number of processes in parallel, replayable (stack replay_error_id, stack replay_error_script)

Parameters

    scriptName:   The script name - string - required
    priority:   The priority in the stack - number - required
    nbInThread:   The max number of processes of this script in parallel (>=1) - number - required
    replayable:   Can be replayed from the errors (true|false) - boolean - required
admin
script set stack "addition.post" 0 1 true;
mentdb
1
Used in use cases (14 recipes)

    Backend & web service developer › Publish a typed web service with its parameter and stack options
    Script developer › Stack and delay options of a batch script
    Async developer › Priorities and parallel limit of the stack
    Scheduler developer › A job that only queues work in the stack
    Event developer › The watcher validates, a heavy loader runs later in the stack
    Automation architect › Nightly import with a cron, a file watcher and a flow
    and 8 more in the Use cases
Often used with

    script create  ·  script delete  ·  and  ·  date now  ·  wait  ·  while  ·  date dateaddt  ·  sequence add

script get <scriptName>


Description

    To get a script object

Parameters

    scriptName:   The script name - string - required
admin
script get "addition.post";
mentdb
{ "delay_condition": "\n\ttrue\n;", "delay_type": "day", "activateLog": "0", "mql": "\n\t\n\t+ [v1] [v2];\n\t\n", "groups": { "mentdb": 0 }, "k": "addition.post", "vars": "param\n \t(var \"[v1]\" {type is_double [v1]} \"description ...\" is_null:true is_empty:true \"example ...\")\n \t(var \"[v2]\" {type is_double [v2]} \"description ...\" is_null:true is_empty:true \"example ...\")\n ;", "nbAttempt": "1", "return": "Return ...", "delay_value": "10", "desc": "description ..." }
Used in use cases (7 recipes)

    Backend & web service developer › Inspect a script and answer with a JSON object
    Script developer › Read a script back to build a form
    Web service developer › Generate an API description from the scripts
    Automation architect › From a script to its stack call
    Backend & web service developer › Versioned API behind one router, deployed with merge
    Script developer › Patch a script with its generated update request
    and 1 more in the Use cases
Often used with

    script delete  ·  script create  ·  script show params  ·  execute  ·  json doc  ·  json iarray  ·  json iobject  ·  json load select

script generate create <scriptName>


Description

    To generate a create script request

Parameters

    scriptName:   The script name - string - required
admin
script generate create "addition.post";
mentdb
script create post "addition" false 1 (param (var "[v1]" {type is_double [v1]} "description ..." is_null:true is_empty:true "example ...") (var "[v2]" {type is_double [v2]} "description ..." is_null:true is_empty:true "example ...") ;) "description ..." { + [v1] [v2]; } "Return ...";
Used in use cases (3 recipes)

    Backend & web service developer › Generate the calls of a service for the team
    Script developer › Idempotent deployment with script merge
    Script developer › Back up a script before deleting it
Often used with

    atom get_first  ·  eval  ·  execute  ·  script delete  ·  script exist  ·  script generate merge  ·  script generate update  ·  and

script generate update <scriptName>


Description

    To generate an update script request

Parameters

    scriptName:   The script name - string - required
admin
script generate update "addition.post";
mentdb
script update "addition.post" false 1 (param (var "[v1]" {type is_double [v1]} "description ..." is_null:true is_empty:true "example ...") (var "[v2]" {type is_double [v2]} "description ..." is_null:true is_empty:true "example ...") ;) "description ..." { + [v1] [v2]; } "Return ...";
Used in use cases (3 recipes)

    Backend & web service developer › Generate the calls of a service for the team
    Script developer › Patch a script with its generated update request
    Script developer › Idempotent deployment with script merge
Often used with

    atom get_first  ·  eval  ·  execute  ·  script delete  ·  script generate create  ·  script generate merge  ·  string replace  ·  json load select

script generate merge <scriptName>


Description

    To generate a merge script request

Parameters

    scriptName:   The script name - string - required
admin
script generate merge "addition.post";
mentdb
script merge "addition.post" false 1 (param (var "[v1]" {type is_double [v1]} "description ..." is_null:true is_empty:true "example ...") (var "[v2]" {type is_double [v2]} "description ..." is_null:true is_empty:true "example ...") ;) "description ..." { + [v1] [v2]; } "Return ...";
Used in use cases (3 recipes)

    Backend & web service developer › Generate the calls of a service for the team
    Script developer › Idempotent deployment with script merge
    Versioning & deployment › One deployment file: scripts and parameters
Often used with

    atom get_first  ·  script delete  ·  script generate create  ·  script generate update  ·  bd*  ·  eval  ·  execute  ·  file count_lines

script copy <oldScriptName> <method> <newScriptName>


Description

    To copy a script

Parameters

    oldScriptName:   The old script name - string - required
    method:   The method (post|get|put|delete) - string - required
    newScriptName:   The new script name - string - required
admin
script copy "addition.post" post "addition2";
mentdb
1
Used in use cases (2 recipes)

    Script developer › Copy, rename and delete a module by prefix
    Application developer › Version the scripts of a group
Often used with

    script rename  ·  execute  ·  group grant script  ·  json fields  ·  script copy all  ·  script create  ·  script delete  ·  script delete all

script copy all <startsWithScriptName> <replacement>


Description

    To copy all the scripts whose name starts with a prefix, replacing the prefix (x.v1. -> x.v2. gives x.v2.name; the dot at the end is optional but the same for both)

Parameters

    startsWithScriptName:   The beginning of the script names - string - required
    replacement:   The replacement path - string - required
admin
script copy all "addition." "addition3.";
mentdb
1
Used in use cases (1 recipe)

    Script developer › Copy, rename and delete a module by prefix
Often used with

    execute  ·  json fields  ·  script copy  ·  script create  ·  script delete all  ·  script exist  ·  script rename  ·  script rename all

script rename <oldScriptName> <method> <newScriptName>


Description

    To rename a script

Parameters

    oldScriptName:   The old script name - string - required
    method:   The method (post|get|put|delete) - string - required
    newScriptName:   The new script name - string - required
admin
script rename "addition2.post" post "addition4";
mentdb
1
Used in use cases (2 recipes)

    Script developer › Copy, rename and delete a module by prefix
    Application developer › Version the scripts of a group
Often used with

    script copy  ·  execute  ·  group grant script  ·  json fields  ·  script copy all  ·  script create  ·  script delete  ·  script delete all

script rename all <startsWithScriptName> <replacement>


Description

    To rename all the scripts whose name starts with a prefix, replacing the prefix (x.v1. -> x.v2. gives x.v2.name; the dot at the end is optional but the same for both)

Parameters

    startsWithScriptName:   The beginning of the script names - string - required
    replacement:   The replacement path - string - required
admin
script rename all "addition4." "addition5.";
mentdb
1
Used in use cases (1 recipe)

    Script developer › Copy, rename and delete a module by prefix
Often used with

    execute  ·  json fields  ·  script copy  ·  script copy all  ·  script create  ·  script delete all  ·  script exist  ·  script rename

script exist <scriptName>


Description

    To check if a script already exists

Parameters

    scriptName:   The script name - string - required
admin
script exist "addition.post"
mentdb
1
Used in use cases (18 recipes)

    MQL beginner › Your first script with typed parameters
    Backend & web service developer › Inspect a script and answer with a JSON object
    Script developer › Idempotent deployment with script merge
    Scheduler developer › Run a job on one node of a cluster
    Versioning & deployment › Export a group to files and import it back
    Debugging & error handling › Defensive checks before calling: exists, defaults, types
    and 12 more in the Use cases
Often used with

    execute  ·  script delete  ·  script create  ·  string regexp_extract  ·  try  ·  type is_double  ·  type is_varchar  ·  eval

script show


Description

    To show all scripts

admin
script show
mentdb
{ "app.100.obj.chartjs.time_courbe.exe": 0, "app.100.template.default.page.login.exe": 0, "file.remote.sftp.config.get": 0, "file.remote.ftp.config.get": 0, "app.100.obj.form.control.checkbox_line.exe": 0, "app.100.obj.form.control.textbox.mail.exe": 0, "app.100.obj.chartjs.time_basic.exe": 0, "file.remote.cifs.config.get": 0, "app.100.obj.list.begin.exe": 0, "app.100.obj.chartjs.line_courbe_fill.exe": 0, "demo.file.pop3.download.post": 0, "app.100.obj.bootstrap.col.begin.exe": 0, "app.100.obj.form.control.textbox.date_en.exe": 0, "app.100.obj.form.control.radio_line.exe": 0, "app.100.obj.chartjs.line_stepped_before.exe": 0, "demo.file.sftp.download.post": 0, "app.100.template.default.html.body_top.exe": 0, "stimulation.msg.load_last.post": 0, "app.100.obj.form.control.textbox.tel.exe": 0, "app.100.obj.form.control.textbox.datetime_fr.exe": 0, "db.sqlserver.config.get": 0, "app.100.template.jimdev.conf": 0, "action.execute_relation_rs.post": 0, "db.postgresql.config.get": 0, "app.100.template.jimdev.page.user.exe": 0, "demo.file.ftp.download.post": 0, "app.100.template.default.html.menu_left.exe": 0, "demo.file.ftps.upload.post": 0, "app.100.template.default.html.bar_top.exe": 0, "db.hsql.server.config.get": 0, "mentdb.remote.config.get": 0, "app.100.template.jimdev.page.login.exe": 0, "app.100.obj.progress_bar.exe": 0, "app.100.start.exe": 0, "app.100.template.jimdev.html.body_bottom.exe": 0, "action.redirection_relation.post": 0, "app.100.obj.chartjs.bar_stacked.exe": 0, "app.100.template.jimdev.page.home.exe": 0, "app.100.obj.form.begin.exe": 0, "app.100.obj.form.control.textbox.date_fr.exe": 0, "app.100.template.jimdev.page.help.exe": 0, "app.100.obj.form.control.textbox.password.exe": 0, "db.h2.embedded.config.get": 0, "app.100.template.default.conf": 0, "perf.symbol.post": 0, "db.mysql.config.get": 0, "demo.file.csv.parse.post": 0, "mail.imap.config.get": 0, "app.100.obj.form.control.textbox.text.exe": 0, "demo.sql.get": 0, "app.100.obj.chartjs.pie.exe": 0, "demo.file.copy_text.post": 0, "db.db2.config.get": 0, "demo.file.excelx.parse.post": 0, "app.100.template.jimdev.app": 0, "db.hsql.embedded.config.get": 0, "addition.post": 0, "perf.node.post": 0, "app.100.obj.onload.exe": 0, "boot.execute.on.start.post": 0, "app.100.obj.sparkline.exe": 0, "app.100.template.default.page.user.exe": 0, "app.100.obj.bootstrap.col.end.exe": 0, "data_type.create.post": 0, "app.100.template.default.page.home.exe": 0, "mail.pop3.config.get": 0, "db.as400.config.get": 0, "app.100.obj.form.control.select_mono.exe": 0, "app.100.obj.form.control.hidden.exe": 0, "file.remote.ftps.config.get": 0, "db.firebird.config.get": 0, "app.100.template.jimdev.html.body_top.exe": 0, "app.100.obj.form.control.select_multiple.exe": 0, "demo.file.sftp.upload.post": 0, "app.100.obj.form.control.textbox.range.exe": 0, "db.derby.embedded.config.get": 0, "demo.file.ftps.download.post": 0, "app.100.obj.form.control.textbox.file.exe": 0, "app.100.obj.chartjs.doughnut.exe": 0, "file.remote.ssh.config.get": 0, "app.100.obj.form.control.textbox.datetime_en.exe": 0, "app.100.obj.chartjs.line_point.exe": 0, "app.100.obj.form.control.textarea.exe": 0, "app.100.obj.chartjs.bar_horizontal_stacked.exe": 0, "app.100.obj.chartjs.time_courbe_fill.exe": 0, "demo.file.copy_bytes.post": 0, "demo.mentdb.execute.post": 0, "app.100.obj.chartjs.polar.exe": 0, "boot.execute.on.shutdown.post": 0, "app.100.template.default.page.help.exe": 0, "action.execute_relation_ra.post": 0, "app.100.template.default.app": 0, "db.derby.server.config.get": 0, "db.oracle.config.get": 0, "stack.process_stack.post": 0, "demo.file.json.array.parse.post": 0, "demo.file.parse_text.post": 0, "app.100.template.jimdev.html.bar_top.exe": 0, "demo.file.ftp.upload.post": 0, "demo.file.json.obj.parse.post": 0, "action.closed.post": 0, "app.100.obj.kpi.exe": 0, "app.100.obj.form.control.textbox.time.exe": 0, "mail.process_mail.post": 0, "server.version.post": 0, "app.100.obj.chartjs.line_stepped_after.exe": 0, "app.100.obj.chartjs.line_courbe.exe": 0, "mail.smtp.config.get": 0, "app.100.obj.chartjs.time_basic_fill.exe": 0, "demo.file.excel.parse.post": 0, "action.relation_redirection.post": 0, "app.100.obj.form.control.textbox.number.exe": 0, "file.local.config.get": 0, "app.100.obj.chartjs.radar.exe": 0, "demo.file.xml.parse.post": 0, "app.100.obj.chartjs.dataset.init.exe": 0, "action.execute_relation_rl.post": 0, "app.100.obj.chartjs.line_basic_fill.exe": 0, "action.sentences_closed.post": 0, "app.100.obj.form.control.textbox.color.exe": 0, "addition4.post": 0, "app.100.obj.gauge_meter.exe": 0, "server.info.post": 0, "app.100.obj.chartjs.bar_horizontal.exe": 0, "app.100.template.default.html.body_bottom.exe": 0, "app.100.obj.form.end.exe": 0, "app.100.obj.chartjs.bar.exe": 0, "server.reset_id.post": 0, "demo.file.imap.download.post": 0, "app.100.obj.chartjs.line_basic.exe": 0, "app.100.obj.form.control.checkbox_inline.exe": 0, "w_th.post": 0, "app.100.template.jimdev.html.menu_left.exe": 0, "lib.value.check.v1.exe": 0, "action.relation_response.post": 0, "db.h2.server.config.get": 0, "demo.file.parse_dir.post": 0, "log.remove_with_retention.post": 0, "app.100.obj.form.control.radio_inline.exe": 0 }
Used in use cases (1 recipe)

    Script developer › Copy, rename and delete a module by prefix
Often used with

    execute  ·  json fields  ·  script copy  ·  script copy all  ·  script create  ·  script delete all  ·  script exist  ·  script rename

script show ghost


Description

    To show all ghost scripts

admin
script show ghost
mentdb
{}
Used in use cases (2 recipes)

    Script developer › Copy, rename and delete a module by prefix
    Automation architect › From a script to its stack call
Often used with

    execute  ·  script exist  ·  call  ·  include  ·  json fields  ·  script copy  ·  script copy all  ·  script create

script export_all


Description

    To export all scripts

admin
script export_all;
mentdb
Scripts exported with successfully.

script get_all


Description

    To get all scripts

admin
script get_all;
mentdb
Warning, The scripts are loaded into the editor ...

execute <scriptName> <varName1> <varlue1> <varNameN> <varlueN>


Description

    To execute a script in a new environment

Parameters

    scriptName:   The script name - string - required
    varName1:   The variable name 1 - string - not required
    varlue1:   The value 1 - string - not required
    varNameN:   The variable name N - string - not required
    varlueN:   The value N - string - not required
admin
execute "addition.post" "[v1]" 10 "[v2]" 5;
mentdb
15
Used in use cases (98 recipes)

    MQL beginner › Your first script with typed parameters
    Backend & web service developer › Publish a typed web service with its parameter and stack options
    JSON & document store developer › A report cached in a node with a time to live
    Script developer › A script with typed parameters rejects bad calls
    Execution modes › execute runs in a new environment
    Web service developer › POST: create an order with validation
    and 92 more in the Use cases
Often used with

    script create  ·  script delete  ·  cm get  ·  string regexp_extract  ·  try  ·  cm remove  ·  file delete  ·  sql connect

call <scriptName> <varName1> <varlue1> <varNameN> <varlueN>


Description

    To execute a script in the parent environment

Parameters

    scriptName:   The script name - string - required
    varName1:   The variable name 1 - string - not required
    varlue1:   The value 1 - string - not required
    varNameN:   The variable name N - string - not required
    varlueN:   The value N - string - not required
admin
call "addition.post" "[v1]" 10 "[v2]" 5;
mentdb
15
Used in use cases (7 recipes)

    Backend & web service developer › execute, call and include: which environment?
    Execution modes › call shares the caller's variables
    Async developer › Same script: execute now or hand it to the stack
    Algorithms in MQL › Recursion: a script that calls itself
    The MQL language in depth › Variable scope: execute, call and include compared
    Automation architect › From a script to its stack call
    and 1 more in the Use cases
Often used with

    execute  ·  include  ·  script create  ·  script delete  ·  string regexp_extract  ·  try  ·  script exist  ·  script generate stack

include <scriptName>


Description

    To execute a script in the parent environment

Parameters

    scriptName:   The script name - string - required
admin
include "addition.post" "[v1]" 10 "[v2]" 5;
mentdb
15
Used in use cases (24 recipes)

    Backend & web service developer › execute, call and include: which environment?
    Script developer › Know which scripts a change will affect before touching a library script
    Execution modes › include vs call: checks and activity log
    Web application developer › A page script that returns safe HTML
    Algorithms in MQL › Recursion: a script that calls itself
    The MQL language in depth › Variable scope: execute, call and include compared
    and 18 more in the Use cases
Often used with

    concat_var  ·  execute  ·  script create  ·  string encode_b64  ·  script delete  ·  string regexp_extract  ·  html close  ·  html load_from_str

script is granted <scriptName> <login>


Description

    To check if a script is granted to a specific user

Parameters

    scriptName:   The script name - string - required
    login:   The login - string - required
admin
script is granted "addition.post" "admin"
mentdb
1
Used in use cases (5 recipes)

    Backend & web service developer › Inspect a script and answer with a JSON object
    Script developer › Grant a script to a group, then revert
    Web application developer › Grant the page scripts to a group
    Application developer › Audit of users, groups and script rights
    Application developer › Onboard a partner account on a web service
Often used with

    group get script  ·  group is granted script  ·  group is granted user  ·  script show users  ·  group add  ·  group exist  ·  group get user  ·  group grant script

script generate url <scriptName>


Description

    To generate a URL to execute a mental script

Parameters

    scriptName:   The script name - string - required
admin
script generate url "addition.post";
mentdb
Method Header x-token = (empty or not define the first time) x-user = mentdb (required the first time) x-password = ***** (required the first time) URL https://localhost:9999/api/?x-token=&x-user=&x-password=&v1=&v2=
Used in use cases (6 recipes)

    MQL beginner › Your first web service, called with execute
    Backend & web service developer › Generate the calls of a service for the team
    Web service developer › Publish the four methods and document their URLs
    CRUD & data API developer › A read API with typed parameters
    Web application developer › A JSON endpoint for the page
    Application developer › Contract of a web service for the front-end team
Often used with

    script create  ·  execute  ·  script delete  ·  string regexp_extract  ·  type is_enum  ·  script generate execute  ·  try  ·  type is_varchar

script generate delay <scriptName>


Description

    To generate delay options

Parameters

    scriptName:   The script name - string - required
admin
script generate delay "addition.post";
mentdb
j23i88m90m76i39t04r09y35p14a96y09e57t36script set delay "addition.post" 10 day { true ;};
Used in use cases (2 recipes)

    Script developer › Stack and delay options of a batch script
    Scheduler developer › Postpone a stack run until a condition is true
Often used with

    script create  ·  script delete  ·  script set delay  ·  and  ·  date hour  ·  date now  ·  date systime  ·  script generate stack

script generate execute <scriptName>


Description

    To generate an MQL execute script

Parameters

    scriptName:   The script name - string - required
admin
script generate execute "addition.post";
mentdb
execute "addition.post" "[v1]" "example ..." "[v2]" "example ..." ;
Used in use cases (6 recipes)

    Backend & web service developer › Generate the calls of a service for the team
    Execution modes › Run the generated execute, call and include
    Web service developer › PUT with optional fields and optimistic locking
    Async developer › Same script: execute now or hand it to the stack
    CRUD & data API developer › A read API with typed parameters
    Application developer › Contract of a web service for the front-end team
Often used with

    script create  ·  script delete  ·  execute  ·  script generate url  ·  string regexp_extract  ·  try  ·  case  ·  exception

script generate stack <scriptName>


Description

    To generate an MQL stack script (stack_execute is the same function as stack; the date is the current timestamp)

Parameters

    scriptName:   The script name - string - required
admin
script generate stack "addition.post";
mentdb
stack_execute "2026-11-01 10:00:00" "addition.post" "[v1]" "example ..." "[v2]" "example ..." ;
Used in use cases (5 recipes)

    Backend & web service developer › Generate the calls of a service for the team
    Script developer › Stack and delay options of a batch script
    Async developer › Plan reminders at J+7, J+15 and J+30, then cancel them
    Automation architect › From a script to its stack call
    Async developer › Same script: execute now or hand it to the stack
Often used with

    script create  ·  script delete  ·  call  ·  date now  ·  execute  ·  script generate execute  ·  script get  ·  stack

script generate call <scriptName>


Description

    To generate an MQL call script

Parameters

    scriptName:   The script name - string - required
admin
script generate call "addition.post";
mentdb
call "addition.post" "[v1]" "example ..." "[v2]" "example ..." ;
Used in use cases (2 recipes)

    Backend & web service developer › Generate the calls of a service for the team
    Execution modes › Run the generated execute, call and include
Often used with

    script generate execute  ·  script generate include  ·  atom get_first  ·  eval  ·  math pow  ·  script create  ·  script delete  ·  script generate create

script generate include <scriptName>


Description

    To generate an MQL call script

Parameters

    scriptName:   The script name - string - required
admin
script generate include "addition.post";
mentdb
include "addition.post" "[v1]" "example ..." "[v2]" "example ..." ;
Used in use cases (2 recipes)

    Backend & web service developer › Generate the calls of a service for the team
    Execution modes › Run the generated execute, call and include
Often used with

    script generate call  ·  script generate execute  ·  atom get_first  ·  eval  ·  math pow  ·  script create  ·  script delete  ·  script generate create

script generate sub_include <scriptName>


Description

    To generate an MQL sub include script

Parameters

    scriptName:   The script name - string - required
admin
script generate sub_include "addition.post";
mentdb
concat "include \"addition.post\" \"[v1]\" \"" (string mql_encode [v1]) "\" \"[v2]\" \"" (string mql_encode [v2]) "\" ;"
Used in use cases (2 recipes)

    Backend & web service developer › Generate the calls of a service for the team
    Execution modes › sub_include: build include requests with current values
Often used with

    atom get_first  ·  eval  ·  script create  ·  script delete  ·  script generate call  ·  script generate create  ·  script generate execute  ·  script generate include

script show groups <scriptName>


Description

    To show all the groups of a specific script

Parameters

    scriptName:   The script name - string - required
admin
script show groups "addition.post"
mentdb
{ "sys": 0, "mentdb": 0 }
Used in use cases (2 recipes)

    Script developer › Grant a script to a group, then revert
    Application developer › Audit of users, groups and script rights
Often used with

    group get script  ·  group is granted script  ·  group is granted user  ·  script is granted  ·  script show users  ·  group exist  ·  group get  ·  group get user

script show users <scriptName>


Description

    To show all the granted users of a specific script

Parameters

    scriptName:   The script name - string - required
admin
script show users "addition.post"
mentdb
{ "ai": 0, "admin": 0, "mentdb": 0 }
Used in use cases (3 recipes)

    Backend & web service developer › Inspect a script and answer with a JSON object
    Script developer › Grant a script to a group, then revert
    Application developer › Audit of users, groups and script rights
Often used with

    script is granted  ·  group get script  ·  group is granted script  ·  group is granted user  ·  json fields  ·  script show groups  ·  and  ·  atom before_exclud

script show params <scriptName>


Description

    To show the parameters of a script (name, description, example, type, null and empty allowed), to build a form for example

Parameters

    scriptName:   The script name - string - required
admin
script show params "addition.post"
mentdb
[ { "isEmpty": "0", "name": "[v1]", "isNull": "0", "type": "type is_number [v1]", "example": "1", "desc": "Value 1" } ]
Used in use cases (7 recipes)

    MQL beginner › Your first script with typed parameters
    Backend & web service developer › Inspect a script and answer with a JSON object
    Script developer › Read a script back to build a form
    Web service developer › Generate an API description from the scripts
    Automation architect › From a script to its stack call
    Application developer › CRUD web services generated from a MySQL table
    and 1 more in the Use cases
Often used with

    execute  ·  script create  ·  script delete  ·  script get  ·  type is_varchar  ·  json doc  ·  json iarray  ·  json iobject

script delete <scriptName>


Description

    To delete a script

Parameters

    scriptName:   The script name - string - required
admin
script delete "addition.post";
mentdb
Script deleted with successful.
Used in use cases (104 recipes)

    MQL beginner › Your first script with typed parameters
    Backend & web service developer › Signed webhook receiver with replay protection
    JSON & document store developer › A report cached in a node with a time to live
    Script developer › A script with typed parameters rejects bad calls
    Execution modes › execute runs in a new environment
    Web service developer › POST: create an order with validation
    and 98 more in the Use cases
Often used with

    script create  ·  execute  ·  string regexp_extract  ·  wait  ·  try  ·  and  ·  string substring  ·  date now

script delete all <startsWithScriptName>


Description

    To delete all scripts

Parameters

    startsWithScriptName:   The beginning of the script names - string - required
admin
script delete all "addition";
mentdb
1
Used in use cases (1 recipe)

    Script developer › Copy, rename and delete a module by prefix
Often used with

    execute  ·  json fields  ·  script copy  ·  script copy all  ·  script create  ·  script exist  ·  script rename  ·  script rename all