Data Source Environments ?

Options
Hey everyone! We just launched a new update that includes different environments for your data source. You can easily switch between live data and test data sources. This allows you to run tests without affecting your users' live data.

Data source environments are available on the Scale and Enterprise plans (as well as the legacy Prototype and Business plans). Read more in our documentation.

[data_sources.gif]

Comments

  • Denis Presciliano
    Options
    Thank you guys this is awesome!
  • Fantastic. Will this work for api too or just for the database?
  • Sean Montgomery
    Sean Montgomery Administrator

    ADMIN

    Options
    This is just for database records so you can test against non-production data.

    We are still working on support for versioning your APIs. Stay tuned!
  • Denis Presciliano
    Options
     I got it how to change between environments, but how do I point my application to send data to test environment?

    I understand the way that works today is, I just change to the Test mode and just run my application and do my tests, right? Or I misunderstood.

    So this implies that I can't have two Databases/Data Sources running at the same time under the same API, correct? So how do I run my application to send data to Test environment or Live environment? (Sorry is this is a basic question.)

    I'm trying to run my app in a Live mode and have a Test environment, to work in new features without affect the Live database.

    *3 solutions that I can see are:*

    #1: Just send a Flag or a Key in my API call. (This requires Xano implement this "IF")

    #2: Duplicate my workspace, but I have to clone my actual Live workspace and update manually every changes from Test to Live workspace.

    #3: Duplicate my tables, and check for a flag in my calls, and decide to work in a live table or test table (this could be dangerous 😕)

    Any advice?
  • Sean Montgomery
    Sean Montgomery Administrator

    ADMIN

    Options
    good question - looks like that got missed in the documentation.

    You can use the test data source in your API with the following header.
    X-Data-Source: test
  • Denis Presciliano
    Options
     Thank you!
  • Eli Beachy
    Options
    Love this! Super helpful. Anticipating the API versioning 🙂