Tyk Sync is a command line tool and library to manage and synchronise a Tyk installation with your version control system (VCS). This guide will help you get started with Tyk Sync to manage your API configurations.Documentation Index
Fetch the complete documentation index at: https://tyk.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
What We’ll Cover in This Guide
- Set up Tyk Demo (gateway with prebuilt APIs)
- Install Tyk Sync using Docker
- Use Tyk Sync to dump API configurations from the Tyk Demo
- Observe the dumped configurations
- Make changes and sync back to Tyk Demo
- Verify changes in Tyk Demo
Instructions
1. Set Up Tyk Demo
First, let’s set up a Tyk Demo environment with some prebuilt APIs:http://localhost:3000.
2. Install Tyk Sync
Follow this guide to install Tyk Sync. You can either use the Docker image or download the binary directly. We will be using the Docker image for this quick start.3. Dump API Configurations
Now, let’s dump the API configurations from the Tyk Dashboard:- Connect to your Tyk Dashboard at
http://localhost:3000 - Use your Dashboard API key for authentication
- Extract all APIs and policies
- Save them to the
tyk-sync-datadirectory
4. Observe the Dumped Configurations
Let’s examine what was dumped:- A
.tyk.jsonfile (index file for synchronization) - A
policiesdirectory containing policy definitions - An
apisdirectory containing API definitions
5. Make Changes and Sync Back
Now, let’s modify an API definition and sync it back to the Dashboard:6. Verify Changes in Tyk Demo
Open your Tyk Dashboard athttp://localhost:3000 and navigate to the APIs section. You should see that your changes have been applied.
Conclusion
Tyk Sync provides a powerful way to manage your API configurations as code. By following this quick start guide, you’ve learned how to:- Extract API configurations from a Tyk Dashboard
- Store them as files that can be version-controlled
- Modify and update configurations
- Synchronize configurations between different environments