Editing & Publishing

Xano allows you to easily edit and test your API before publishing changes live.

Edit your API and test the changes before publishing means you can make edits in a draft of your API without affecting what's live. Drafts recognize and record each micro-change on an individual API (or Background Task, Addon, or Function) so you can revert any changes while editing. You can test the changes in the draft with Run & Debug, and once satisfied publish the changes.

This is different than Branches because Branches allow you to work and edit in a copy of your entire business logic (API, Background Tasks, Addons, and Functions) that is entirely separate from your live version. With Branches, you can instantly switch back and forth on which Branch you want to be live.

Editing your API

Creating a Draft

Once you start editing your API, a draft will automatically be created. Drafts keep track of each micro-change you (or your team members) make to a Function Stack called Revertible Changes, which you can easily roll back.

Revertible Changes

Revertible changes show each micro-change, when they were made, what the change was, and who made it.

To revert a change, select the change you wish to revert back to. You can also revert all changes to revert all changes in the draft and return to the original version of the Function Stack.

Compare Differences

Before reverting a change, you are able to see a difference comparison snapshot of the previous draft version. This provides context in the differences of the previous version compared to the current draft you are on.

Once you're ready to revert, select Restore this version.

Testing a Draft

Testing the API with Run & Debug will use the draft you are editing while calling the API from the front-end will use the live (published version) of the API.

If you have other drafts across your workspace that may interact with the current API or Function Stack you are editing, you can include the relevant drafts while testing in Run & Debug.

Publishing

Once you're ready to publish the changes, you can simply select publish.

You can include a description of the changes you are publishing. Additionally, you have the option to publish other active drafts in your workspace. This might be useful if you are working with multiple workspace objects that interact or depend on one another and need to be certain everything works harmoniously before publishing.

Once a draft is published, the changes will become live. Meaning if the API endpoint is called from a front-end, the changes will be reflected. Publishing a draft will create a Schema Version of the API Endpoint, which allows you to roll back to previously published versions.

How do I know if I have drafts to publish?

You can see drafts available for testing and publish via the Publish dialog on any of your function stacks, or in a notification on the dashboard. If you find that you have made changes but are not seeing the expected results via your front-end, ensure that you have published these changes.

Last updated