HelenaGwyn The app UUID doesn't exist until after the app is created, so it's not used as an input for app/create
.
Here's a complete example payload for app/create
:
[
{
"name": "name_of_new_app",
"osuser": "UUID_OF_SHELL_USER",
"type": "NPF",
"installer_url": "http://example.com/your_install_script.sh",
"json": {
"php_version": 80,
"fpm_max_requests": 25,
"fpm_max_children": 5
}
}
]
You can use curl
to make the call from bash
:
curl -s -X POST -H "Content-Type:application/json" -H "Authorization: Token YOUR_TOKEN" -d '[{"name": "name_of_new_app","osuser": "UUID_OF_SHELL_USER","type": "NPF","installer_url": "http://example.com/your_install_script.sh","json": {"php_version": 80,"fpm_max_requests": 25,"fpm_max_children": 5}}]'
Note that you can write your installer script in whatever language you want, there's no requirement that you use bash. The only requirements are that the language has the capability to make HTTP requests, parse json, and do whatever other tasks you need the script to do.