#Datasource URL Behavior on Importing JSON from Dev to Prod

1 messages · Page 1 of 1 (latest)

queen epoch
#

Issue Description:
I have an Appsmith application in my dev environment with multiple datasources like BaseUrl, reportUrl, and TbacUrl, each having its own URL values. When I export the application JSON from dev and import it into prod, the datasource URLs are different.

I want to understand the following behavior:

When importing the JSON into prod, does Appsmith prompt to change all the datasource URLs?
If Appsmith prompts for changing the datasource, on what basis does it determine whether to ask for changes?
After importing, I manually update all datasource URLs in prod. If I later import the same dev JSON again (after renaming the old one), will I need to manually change the URLs again?
I've noticed that sometimes Appsmith prompts for datasource changes, but other times it doesn’t. I am confused if Appsmith retains any datasource configurations apart from the JSON values and whether it overrides or reuses them.

Can you clarify how Appsmith handles datasource retention and prompts on repeated imports?

livid muralBOT
#

Hello! I'm AppsmithBot, here to assist you with your Appsmith queries.

Regarding your questions about importing applications and handling datasource URLs:

  1. Prompt for Changing Datasource URLs: When you import an application JSON file into a new environment, Appsmith will prompt you to configure the datasources if the imported app had a datasource connection. This is because, as a security measure, Appsmith does not export any configuration values used for connecting datasources during the export operation?5:17?source?.

  2. Basis for Prompting Changes: The prompt occurs because the datasource configuration values are not included in the exported JSON file. You will need to configure these values in the datasource configuration modal upon import?5:17?source?.

  3. Manual Updates on Repeated Imports: If you import the same JSON file again, you will need to manually update the datasource URLs again, as the configuration values are not retained in the JSON file?5:17?source?.

  4. Retention of Datasource Configurations: Appsmith does not retain datasource configurations apart from the JSON values. Each import is treated as a new instance, and you will need to configure the datasources each time?5:17?source?.

If you have any more questions or need further assistance, feel free to ask!

If you don't find my response helpful, you can request to speak to a human agent.

queen epoch
#

so while exporting a JSON there wont be any data source values in JSON?

livid muralBOT
#

Yes, that's correct. When you export an application JSON from Appsmith, it does not include the datasource configuration values. This is a security measure to ensure that sensitive information, such as database credentials or API keys, is not inadvertently shared or exposed. You will need to reconfigure these values when you import the JSON into a new environment?5:17?source?.

If you don't find my response helpful, you can request to speak to a human agent.

queen epoch
#

I have now exported a appsmith application and i have edited the JSON and i found
"datasourceList": [
{
"datasourceConfiguration": {
"connection": {
"ssl": {
"authType": "DEFAULT"
}
},
"url": "http://10.171.110.61:8691/EnergyOptimizer/",
"headers": [],
"queryParameters": []
},
"name": "EnergyEngine",
"pluginId": "restapi-plugin",
"messages": [],
"isAutoGenerated": false,
"gitSyncId": "66d9a24b8c2fbd3764be855b_1f782255-cf0b-47c5-9b76-b8d9a710b268",
"deleted": false
},
{
"datasourceConfiguration": {
"connection": {
"ssl": {
"authType": "DEFAULT"
}
},
"url": "https://apibuilderserver.armtest01.abb.com/arm/v5/",
"headers": [],
"queryParameters": []
},
"name": "baseURL",
"pluginId": "restapi-plugin",
"messages": [],
"isAutoGenerated": false,
"gitSyncId": "64d5b83477d28b0f1ab3de0a_65e6da4ae6dbfb5381bd6320",
"deleted": false
},
{
"datasourceConfiguration": {
"connection": {
"ssl": {
"authType": "DEFAULT"
}
},
"url": "https://apibuilderserver.armtest01.abb.com/static/user_permission/rbac_user_permission",
"headers": [],
"queryParameters": []
},
"name": "rbacDatasource",
"pluginId": "restapi-plugin",
"messages": [],
"isAutoGenerated": false,
"gitSyncId": "64d5b83477d28b0f1ab3de0a_668b96b38c7b093e2a60c4a9",
"deleted": false
}
],

it clearly has the datasorce details that includes url
But you said it wont export

livid muralBOT
#

I apologize for any confusion. The JSON export does include the structure of the datasource, such as the URL, headers, and query parameters, as you've observed. However, sensitive information like authentication credentials (e.g., API keys, passwords) is not included in the export. This is to ensure that sensitive data is not exposed when sharing or moving applications between environments.

When you import this JSON into another environment, you will still need to configure any sensitive information that was not included in the export. The URLs and other non-sensitive configuration details are retained in the JSON file.

If you don't find my response helpful, you can request to speak to a human agent.

queen epoch
#

am just asking about url part
will i need to configure the url again in the new prod env or the same exported url value will be prepopulated

livid muralBOT
#

No, you will not need to configure the URL again in the new production environment. The URL is part of the datasource configuration that is included in the exported JSON file. When you import the JSON into a new environment, the URLs will be retained as they are specified in the JSON. However, you will need to configure any sensitive information like authentication credentials that are not included in the export.

If you don't find my response helpful, you can request to speak to a human agent.