Hello,
In order to avoid entering servoy_admin and having to import solutions, is there an API to be able to import with a solution?
I remember that for the Servoy 7 version there was a solution called AppServerUpdater but I can’t find it
Are there possibilities to import the solutions with an API?
Thanks and regards
Roberto
Hi Roberto,
If you upload a .war file to a Tomcat server (possible to do with a script), it will be automatically deployed.
You can add versioning to the .war file name so your newer .war will take over, like my solution##20230403 or similar.
If users are connected, you will end up with two versions of your solution running at the same time. New users will get the new one.
Not sure there is a way to automatically get rid of the old version.
Hi, Christian
We generate a .war and since we have a large number of solutions we upload them to the server according to the needs. We do not generate a .war with the solutions included
We would like to automate the process of uploading solutions to the server and I remember that back in version 7 there was the possibility of automating this upload of solutions
I want to know if the API with which this process could be done still exists. At that time we used the API, then we abandoned it and now that we want to resume it I realize that it no longer exists, or so it seems to me, that’s why it is my query
I copy part of the code that we used at that time.
var client = plugins.http.createNewHttpClient();
var poster = client.createPostRequest(http_company + '/integra8/servoy-admin/solutions/import')
poster.addFile('if',import_solution)
poster.addParameter('emm', '1'); //Enter maintenance mode - default 1
poster.addParameter('ac', '1'); //Activate new release of imported solution and modules - default 1
poster.addParameter('os', '1'); //Overwrite repository styles with import version - default 1
poster.addParameter('om', '1'); //Overwrite repository media with import version - default 1
poster.addParameter('og', '1'); //Overwrite repository group security settings with import version - default 1
poster.addParameter('ak', '1'); //Allow reserved SQL keywords as table or column names (will fail unless supported by the backend database)
poster.addParameter('dm', '1'); //Allow data model (database) changes - default 1
poster.addParameter('md', '1'); //Import solution meta data - default 1
poster.addParameter('up', '0'); //Hard coded no user import - 1 will create non existing add to groups 2 is complete overwrite
poster.addParameter('submit', 'Import!');
var rtn = poster.executeRequest(user, passwd); // httpCode 200 is ok
var httpCode = rtn.getStatusCode();
application.output(httpCode);
var respBody = rtn.getResponseBody()
application.output('Body: ' + respBody)
This code with Servoy 2022.12.x is not working, did something change API connection?
Thanks and regards
Roberto