# Does an API to upload solutions exist?

**URL:** https://forum.servoy.com/t/does-an-api-to-upload-solutions-exist/20978
**Category:** Questions
**Created:** [April 2, 2023, 3:25pm UTC](https://forum.servoy.com/t/does-an-api-to-upload-solutions-exist/20978 "2023-04-02T15:25:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rmidata](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/rmidata/32/4876_2.png) [@rmidata](https://forum.servoy.com/u/rmidata)
#### Post date: [April 2, 2023, 3:25pm UTC](https://forum.servoy.com/t/does-an-api-to-upload-solutions-exist/20978/1 "2023-04-02T15:25:06Z")

</div>

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

---

<div class="post-metadata">

### Author: ![swingman](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/swingman/32/4536_2.png) [@swingman](https://forum.servoy.com/u/swingman)
#### Post date: [April 3, 2023, 5:27pm UTC](https://forum.servoy.com/t/does-an-api-to-upload-solutions-exist/20978/2 "2023-04-03T17:27:23Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![rmidata](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/rmidata/32/4876_2.png) [@rmidata](https://forum.servoy.com/u/rmidata)
#### Post date: [April 4, 2023, 12:21am UTC](https://forum.servoy.com/t/does-an-api-to-upload-solutions-exist/20978/3 "2023-04-04T00:21:58Z")

</div>

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.

```auto
        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
