Pulling and Applying Configuration | Yext Hitchhikers Platform
What You’ll Learn
In this section, you will learn:
- Pulling configuration
- Applying configuration
Making Changes in the Browser
Let’s say you want to make a configuration change in a web browser for a web application like Yext. What do you need to do?
First, you need to navigate to the correct URL, which will load the correct configuration page. The state that the page loads in represents the configuration that was previously saved for your account.
Next, you need to make the configuration changes that you desire. This involves pressing different buttons or typing various words into text boxes.
Last, you need to save your changes. When you save, the changes you have made take effect.
With Configuration as Code, there is a similar sequence of events.
When you first start working with Configuration as Code, how do you access the files that represent the configuration? How do you “load” the configuration?
The answer is that you need to pull the files. When you pull the files, you are requesting them from Yext programmatically. Yext will respond by sending back the appropriate files.
This is the equivalent of going to the correct URL and loading a page that contains the correct configuration. The files that you end up with will represent the current state of your account.
When you load the Admin Console, you are pulling the configuration files from the account, solution template or Github repository.
After you have pulled the files, you can start to edit them. Instead of pressing buttons and typing in text boxes, you will be editing JSON files.
The files that you are editing are local versions. Changing something in these files will not immediately change the configuration of the account. You need to take one more step to do that.
Editing files locally is the equivalent of making configuration changes within a web browser before pressing save. You indicate the changes you would like to make and can view what the final state of the configuration will be, but nothing in the account has actually changed yet. If you were to pull the files again (or reload the browser), all of your changes would be lost.
The last step to make your changes a reality is to apply the files. When you apply the files, you send them back to Yext to indicate that they represent what the final state of the configuration should be.
Applying files is the equivalent of pressing save in the web browser. Similar to pressing save, applying files does not automatically mean that the account’s configuration will change to match what you indicated. You may have errors that prevent the configuration from being saved.