This article explains how you can synchronize configurations between Alumio environments. You can export the connections files in JSON format from one environment and import it to another Alumio environment.
By exporting the Alumio configurations in JSON format, you can move those configurations to other Alumio environments using the Alumio API.
For example, moving configurations from the sandbox environment to the production environment.
To import the file back to Alumio you need to:
- Export the connection from Alumio
- Open the environment you want to import the file to
- Go settings -> Info, and copy the API URL Ex: "api.sandbox.demo.alumio.com"
- And paste it into Postman: New request -> post -> paste the link api.sandbox.demo.alumio.com followed by api/v1/di/configurations , so it looks like api.sandbox.demo.alumio.com/api/v1/di/configurations
Note: api/v1/di/configurations is a constant endpoint that should always be added. - Choose body -> raw -> and in "text" section select JSON -> paste the data from the .ndjson file that you exported earlier from Alumio into the "body" field.
- Go back to Alumio - settings -> API Keys -> hit "+" and generate a new token name and copy it. Then go back to Postman and in “Authorization” tab choose type as "Bearer token" and in value put the token you have just copied.
Example:
“eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6Imguc2lyZW5rb0BhbHVtaW8uY29tIiwicm9sZXMiOlsiUk9MRV9BRE1JTklTVFJBVE9SIl0sImp0aSI6IjAxRjlFOEZRMUdESzJGMFJSWDRCS05TNVYwIn0.gtTWo7kmaf8EF5lFCU35YlfSPWm-F69w9D3WfDKnm1g“. - Finally, hit “Send”. It should import the file to Alumio.
{
"status": 500,
"type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
"title": "Internal Server Error",
"detail": "No route found for \"POST /vi/di/configurations\" (from \"http://api.sandbox.demo.alumio.com/vi/di/configurations\")"
}
{
"status": 500,
"type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
"title": "Internal Server Error",
"detail": "A configuration with this identifier already exists. \n Please enter a unique value for the identifier"
}
It obviously means that you have already imported this file and it already exists.