- 06 Jul 2023
- 2 Minutes To Read
Configuration as Code Overview
- Updated On 06 Jul 2023
- 2 Minutes To Read
You can batch configure Mambu elements - such as organization details, custom field definitions, holidays, branches, user roles, and more - using Configuration as Code (CasC). This allows you to get or set multiple configuration settings for a supported element with a single API call per tenant.
CasC allows you to quickly configure new instances, standardize and migrate configuration between tenants, and duplicate configuration settings for multiple sandboxes.
This page offers a general introduction to CasC. For more information on using CasC for specific elements, see the CasC documentation for the specific elements you wish to configure.
For more information about the YAML specification, see YAML data serialization language.
We recommend updating configuration with the API outside of working hours to avoid possible issues in the system. Do not change configuration for the same entity from the UI and via the API at the same time.
CasC endpoints are part of the Mambu v2 REST API. For general information on how to use the API, see our API Reference.
Each CasC endpoint ends in the element name and
.yaml, such as
/configuration/holidays.yaml for the holiday endpoint. Note that if you use configuration files to construct your request, the file can have any name.
Most CasC endpoints support two operations:
GET: Retrieves current configuration.
PUT: Overwrites the existing configuration with a new configuration.
PUT a configuration to Mambu, any current configuration settings not included in the new YAML configuration will be deleted, in most cases. Any exceptions will be noted in the CasC documentation for the specific endpoint.
We do not support
PATCH updates to existing configuration. If you want to change an existing configuration, we recommend getting the existing configuration with a
GET, modifying the returned YAML as you wish, and writing it back to the API with a
There are two ways to authenticate CasC requests:
- An API key generated by an API consumer. For more information, see API Consumers.
- Basic authentication using a username and password.
The API consumer or the user account has to have the View Manage Configuration As Code (
GET_MANAGE_CONFIGURATION_AS_CODE) and Update Manage Configuration As Code (
PUT_MANAGE_CONFIGURATION_AS_CODE) permissions to make
PUT requests to the CasC endpoints.
For more information, see Authentication in our API Reference.
The following headers are required by most CasC endpoints. Any exceptions will be noted in the CasC documentation for the specific endpoint.
GET request headers
PUT request headers
Some fo the CasC endpoints also offer optional parameters. Any available parameters will be noted in the CasC documentation for the specific endpoint.
For the specific configuration format required by each CasC endpoint, see the "Configuration body example" section of the CasC documentation for the specific endpoint.
Not all elements support Configuration as Code. To view which elements are supported with this feature, see the list of individual articles for each CasC endpoint.