XML Config files deployments
- As already discussed, Apiro is a GitOps based platform.
- Any configuration files you create or modify using an IDE like Intellij instead of using the Apiro UI, need to be pushed to the associated GIT repository.
- Once the files are pushed the following steps must be followed to deploy the configuration files, to enable the Apiro engine to use them.
- You need to instruct Apiro to deploy these config files into its engine. This is achieved by making an API call or via the UI as explained below:
[OPTION 1] Manual GIT push and config files deployment via the UI
[OPTION 2] Completed automated config files push and deployment
- Apiro allows you to update config files directly in the UI.
- If you chose this option you do not have to manually push files to GIT and deploy them. The engine will do that for you when you click
save
. - You may want to update the config files using Intellij and then copy the contents in the window shown below to avoid the manual tasks listed in OPTION 1 above.
[OPTION 3] Deploy config files using the API
https://[apiro_address]/rest/cfgsource/trigger/[config_source]
Please note this option will not work for the current compose script because you will need a valid token
The above GET HTTP request is used to trigger an Apiro config source which will deploy any config files pushed into the associated GIT repository.
- You can use this postman collection - deploy_config.postman_collection.json
- or this curl request - deploy_config_curl.txt
If the config source is successfully deployed it will return in its response body:
1 2 3 |
|
If the config source encounters an error when deploying it will give the location and description of the error as well as the fragment of config which caused the error:
1 2 3 4 5 6 7 |
|
here are 3 examples of valid deploy config request: NOTE: in order successfully deploy you must provide a valid Apiro token under the header name: "token"
Description | |
---|---|
https://demo3.apiro.com.au/rest/cfgsource/trigger/apiro_examples |
This will deploy all fields recursively for every schema in the "apiro_examples" configuration |
https://demo3.apiro.com.au/rest/cfgsource/trigger/SCHEMA_CUSTOMERS.xml |
This will deploy all config fields recursively within the "CUSTOMERS" schema |