Important Prerequisites
These are some common settings that you need before proceeding with other parts of our tutorials.
Tyk Config
Path to Tyk API Definitions configurations directory
You may need to explicitly define the path in your Tyk config to the directory where you will add the API definitions for Tyk to serve.
...
"app_path": "/opt/tyk-gateway/apps",
...
Path to Policies file
You need to explicitly set the path to your Policies JSON file in your Tyk config.
...
"policies": {
"policy_source": "file",
"policy_record_name": "policies/policies.json"
},
...
Remove Tyk Dashboard related config options
Some config options for the Community Edition are not compatible with the Dashboard version, which requires a licence. So, remove any section in your Tyk config which starts with:
...
"db_app_conf_options" {
...
},
...
Files vs API
For Community Edition, note that you will need to know when to use the Tyk API endpoint and when mere placing files will do. So far:
- Files: Policies, API Definitions
- Tyk API: API key generation
Hot reload is critical
Each time you add an API definition to Tyk, you need to request a hot reload call to the Tyk reload API endpoint.
curl -H "x-tyk-authorization: {your-secret}" -s https://{your-tyk-host}:{port}/tyk/reload/group | python -mjson.tool