Configuration as Code Overview
  • 06 Jul 2023
  • 2 Minutes To Read
  • Dark
    Light
  • PDF

Configuration as Code Overview

  • Dark
    Light
  • PDF

Article summary

Mambu allows batch configuration of elements like organization details, custom fields, and branches using Configuration as Code (CasC). CasC enables setting multiple configurations with a single API call per tenant, aiding in quick setup, standardization, and migration. CasC endpoints in the Mambu v2 REST API support GET and PUT operations for retrieving and updating configurations. Authentication can be done via API key or basic authentication. Headers and parameters are required for most CasC endpoints, with specific configuration formats detailed in the documentation. Not all elements support CasC, so check individual articles for supported features.

Please Note
The following feature may incur additional costs. Please reach out to your Customer Success Manager or contact us through Mambu Support to have it enabled.

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.

Please be Aware

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.

Basic operation

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.
Please Note

If you 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 PUT request.

Authentication

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 GET or PUT requests to the CasC endpoints.

For more information, see Authentication in our API Reference.

Headers

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

HeaderValue
Acceptapplication/vnd.mambu.v2+yaml

PUT request headers

HeaderValue
Acceptapplication/vnd.mambu.v2+yaml
Content-Typeapplication/yaml

Parameters

Some fo the CasC endpoints also offer optional parameters. Any available parameters will be noted in the CasC documentation for the specific endpoint.

Configuration format

For the specific configuration format required by each CasC endpoint, see the "Configuration body example" section of the CasC documentation for the specific endpoint.

Availability

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.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence