API Reference
Interactive reference of the Flexter UI backend API, generated from its OpenAPI 3 definition.
The change must be done at /usr/share/flexter/flexter-ui/conf/backend.properties or ~/.local/share/flexter/flexter-ui/conf/backend.properties for non root installations.
Please set the cmd.enabled value as below:
cmd.enabled = true
And after that, please restart the flexterui-backend service:
systemctl restart flexterui-backend
Here is an example of generating a schema from XML. Note that jq is used at the end to format the output.
curl -H 'Content-Type: application/json' -XPOST -d '{
"executions":[
{
"app_name":"xml2er",
"source":{
"file":{
"command":"/usr/share/flexter/samples/donut.xml.gz",
"enabled":true
}
},
"target":{
"generation":[
{
"command":"-g",
"enabled":"true",
"value":"3"
}
]
}
}
]
}' http://<FLEXTER_UI_SERVER>:<PORT>/v2/run/cmd | jq
And the related output:
{
"error": false,
"logPath": null,
"cmds": [
"xml2er -j 7"
],
"jobs": [
7
]
}
You can also track status of the job calling:
curl http://<FLEXTER_UI_SERVER>:<PORT>/v2/executions/get/7
or
curl http://<FLEXTER_UI_SERVER>:<PORT>/v2/executions/get/7 | jq
And get as output:
{
"params": "/usr/share/flexter/samples/donut.xml.gz -g 3",
"status": "C",
"host": "<HOSTNAME>/<IP_ADDRESS>",
"parm_path_input": null,
"id_org": 1,
"base_path": "/",
"id_app": "local-1674054248306",
"id_lschma": 4,
"start_date": 1674054245996,
"os_user": "root",
"id_sch": 11,
"job_type": "Parse",
"parm_path_output": null,
"params_json": "{\"spark\": {\"master\": \"local[*]\"}, \"action\": {\"parsemode\": \"s\"}}",
"msg_proc_qty": 0,
"log_file": null,
"id_parent_job": null,
"end_date": 1674054257301,
"id_job": 7
}
curl -H 'Content-Type: application/json' -XPOST -d '{
"executions":[
{
"app_name":"xml2er",
"source":{
"file":{
"command":"/usr/share/flexter/samples/donut.xml.gz",
"enabled":true
},
"origin_id":{
"command":"-x",
"enabled":true,
"value":"11"
}
},
"target":{
"path":{
"command":"-o",
"enabled":true,
"value":"snowflake://<SNOWFLAKE_ADDRESS>?db=<DB>&schema=<SCHEMA>&warehouse=<WAREHOUSE>"
},
"format":[
{
"command":"-u",
"enabled":"true",
"value":"<USER>"
},
{
"command":"-p",
"enabled":"true",
"value":"<PASSWORD>"
}
],
"writing_mode":[
{
"command":"-S",
"enabled":"true",
"value":"o"
},
{
"command":"-e",
"enabled":"true",
"value":"D"
}
]
}
}
]
}' http://<FLEXTER_UI_SERVER>:<PORT>/v2/run/cmd | jq
The API Reference renders the OpenAPI definition below as an interactive page.
Interactive reference of the Flexter UI backend API, generated from its OpenAPI 3 definition.