Talend Administration Center MetaServlet API
MetaServlet API
All MetaServlet operations can be invoked via an HTTP POST or GET request. All parameters to the operation are encoded as a single, unnamed base-64 encoded parameter to the request.
The Talend Administration Center MetaServlet command-line tool is available in the following folder of the Talend Administration Center installation directory:
<tomcat_path>/webapps/org.talend.administrator/WEB-INF/classes/MetaServletCaller.bat on Windows
<tomcat_path>/webapps/org.talend.administrator/WEB-INF/classes/MetaServletCaller.sh on Linux
<tomcat_path>\webapps\tac\WEB-INF\classes>MetaServletCaller.bat
usage: Missing required option: url
-f,--format-output format Json output
-h,--help print this help message
-json,--json-params <arg> Required params in a Json object
-url,--tac-url <arg> TAC's http url
-v,--verbose display more informationsWhen accessing Talend Administration Center via the MetaServlet API, the returned data does not include password information by default.
scheduler.conf.metaservlet.repo.creds.return=true--tac-url
In order to get the full detailed help message, the Talend Administration Center service must be up and running and you must pass the --tac-url parameter.
--help all, -h all
<tomcat_path>\webapps\org.talend.administrator\WEB-INF\classes>MetaServletCaller.bat
--tac-url=http://localhost:8080/org.talend.administrator/ -help all > tac-help.txt
<tomcat_path>\webapps\org.talend.administrator\WEB-INF\classes>MetaServletCaller.bat
--tac-url=http://localhost:8080/org.talend.administrator/ -h > tac-help-short.txtrunTask
Runs a task based on its taskId or uniqueId.
<tomcat_path>\webapps\org.talend.administrator\WEB-INF\classes>MetaServletCaller.bat
--tac-url=http://localhost:8080/org.talend.administrator/ -help runTask
----------------------------------------------------------
Command: runTask
----------------------------------------------------------
Description : Allows to run a task defined in Job conductor by its taskId or uniqueId.
Mode can be 'asynchronous' or 'synchronous'. If 'waitWhileUnknownStatus' is 'true' in synchronous mode, the command continues waiting through intermediate UNKNOWN statuses until a final status is returned.
Requires authentication : true
Since : 4.2
Sample :
{
"actionName": "runTask",
"authPass": "admin",
"authUser": "admin@company.com",
"jvmParams": [
"-Xmx256m",
"-Xms64m"
],
"mode": "synchronous",
"taskId": 1,
"waitWhileUnknownStatus": true
}Set waitWhileUnknownStatus to true when a synchronous request can return an intermediate UNKNOWN status before the final status is available.
In order to run a task, you need to know its system generated taskId. This information can be retrieved by executing the getTaskIdByName command. You can also use the task uniqueId if it is available in your integration.
getTaskIdByName
<tomcat_path>\webapps\org.talend.administrator\WEB-INF\classes>MetaServletCaller.bat --tac
-url=http://localhost:8080/org.talend.administrator/ -help getTaskIdByName
----------------------------------------------------------
Command: getTaskIdByName
----------------------------------------------------------
Description : Get task id by given taskName
Requires authentication : true
Since : 5.1
Sample :
{
"actionName": "getTaskIdByName",
"authPass": "admin",
"authUser": "admin@company.com",
"taskName": "task1"
}