Configuration as Code Overview
  • 05 Aug 2021
  • 2 Minutes To Read
  • Dark
    Light
  • PDF

Configuration as Code Overview

  • Dark
    Light
  • PDF

Early Access Feature
If you would like to request early access to this feature, please get in touch with your Mambu Customer Success Manager to discuss your requirements. For more information, see Mambu Release Cycle - Feature Release Status.

With Configuration as Code (CasC), you may batch configure Mambu elements such as organization details, custom fields, holidays, branches, user roles, and more via the API using YAML-formatted requests. 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 currently support PATCH updates to existing configuration. If you wish to modify an existing configuration, we recommend retrieving the existing configuration with a GET, modifying the returned YAML as you wish, and writing it back to the API with a PUT.

Authentication

There are two ways to authenticate CasC requests:

  • API key generated by API consumers (Early Access Feature). The API consumer must have the Manage Configuration as Code permission. For more information, see API Consumers.
  • Basic authentication using a username and password. The user account must have the the Manage Configuration as Code permission.

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

Header Value
Accept application/vnd.mambu.v2+yaml

PUT request headers

Header Value
Accept application/vnd.mambu.v2+yaml
Content-Type application/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 currently support Configuration as Code. To view which elements are currently supported with this feature, see the list of individual articles for each CasC endpoint.


Was This Article Helpful?