Retrieve current configuration status
curl --request GET \
--url https://{tenant}/config \
--header 'X-Tyk-Authorization: <api-key>'import requests
url = "https://{tenant}/config"
headers = {"X-Tyk-Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Tyk-Authorization': '<api-key>'}};
fetch('https://{tenant}/config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Tyk-Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}/config"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Tyk-Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant}/config")
.header("X-Tyk-Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Tyk-Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"type": "full",
"listen_port": 9090,
"healthcheck_port": 8180,
"http_port": 8180,
"enable_http_profiler": false,
"server_options": {
"use_ssl": false,
"certificate": {
"cert_file": "./server.crt",
"key_file": "./server.key"
},
"min_version": 0,
"ssl_ciphers": null,
"ssl_certificates": null,
"max_connection_idle_time": 0,
"max_connections": 0
},
"http_server_options": {
"use_ssl": false,
"certificate": {
"cert_file": "",
"key_file": ""
},
"min_version": 0,
"ssl_ciphers": null,
"ssl_certificates": null,
"max_connection_idle_time": 0,
"max_connections": 0
},
"security": {
"private_certificate_encoding_secret": "",
"enable_http_secure_endpoints": true,
"secret": ""
},
"storage": {
"type": "redis",
"host": "localhost",
"port": 6379,
"master_name": "",
"sentinel_password": "",
"username": "",
"password": "",
"database": 0,
"optimisation_max_idle": 0,
"optimisation_max_active": 0,
"enable_cluster": false,
"hosts": null,
"addrs": null,
"redis_use_ssl": false,
"redis_ssl_insecure_skip_verify": false,
"debug": false,
"timeout": 0,
"use_ssl": false,
"ssl_insecure_skip_verify": false,
"ca_file": "",
"cert_file": "",
"key_file": "",
"max_version": "",
"min_version": ""
},
"analytics": {
"type": "mongo",
"connection_string": "",
"table_sharding": false,
"batch_size": 0,
"postgres": {
"prefer_simple_protocol": false,
"max_open_connections": 0,
"max_idle_connections": 0,
"connection_max_lifetime": "",
"connection_max_idle_time": ""
},
"mysql": {
"default_string_size": 0,
"disable_datetime_precision": false,
"dont_support_rename_index": false,
"dont_support_rename_column": false,
"skip_initialize_with_version": false
},
"mongo_url": "",
"mongo_use_ssl": false,
"mongo_ssl_insecure_skip_verify": false,
"mongo_ssl_allow_invalid_hostnames": false,
"mongo_ssl_ca_file": "",
"mongo_ssl_pem_keyfile": "",
"mongo_session_consistency": "",
"mongo_batch_size": 0,
"driver": "mongo-go",
"mongo_direct_connection": false,
"mongo_ignore_aggregations": null,
"mongo_enable_aggregate_self_healing": false
},
"hash_keys": true,
"session_timeout": 0,
"forward_analytics_to_pump": false,
"enable_multiple_analytics_keys": false,
"dont_store_selective": false,
"dont_store_aggregate": false,
"org_session_expiration": 60,
"org_session_cleanup": 60,
"license": "",
"aggregates_ignore_tags": null,
"track_all_paths": false,
"store_analytics_per_minute": false,
"ignore_tag_prefix_list": null,
"threshold_len_tag_list": 1000,
"omit_analytics_index_creation": false,
"enable_separate_analytics_store": false,
"analytics_storage": {
"type": "",
"host": "",
"port": 0,
"master_name": "",
"sentinel_password": "",
"username": "",
"password": "",
"database": 0,
"optimisation_max_idle": 0,
"optimisation_max_active": 0,
"enable_cluster": false,
"hosts": null,
"addrs": null,
"redis_use_ssl": false,
"redis_ssl_insecure_skip_verify": false,
"debug": false,
"timeout": 0,
"use_ssl": false,
"ssl_insecure_skip_verify": false,
"ca_file": "",
"cert_file": "",
"key_file": "",
"max_version": "",
"min_version": ""
},
"log_level": "info",
"enable_key_logging": false,
"sync_worker_config": {
"enabled": true,
"hash_keys": true,
"max_batch_size": 1000,
"time_between_batches": 3,
"max_workers": 1000,
"warmup_time": 0,
"group_key_ttl": 30
},
"enable_ownership": false
}Configuration
Retrieve current configuration status
Returns the current configuration status of the system. You can optionally filter for a specific configuration field.
Example curl commands:
Get full configuration:
curl -X GET \
http://localhost:8181/config \
-H 'X-Tyk-Authorization: your-secret-key'
Get specific configuration field:
curl -X GET \
'http://localhost:8181/config?field=storage.host' \
-H 'X-Tyk-Authorization: your-secret-key'
GET
/
config
Retrieve current configuration status
curl --request GET \
--url https://{tenant}/config \
--header 'X-Tyk-Authorization: <api-key>'import requests
url = "https://{tenant}/config"
headers = {"X-Tyk-Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Tyk-Authorization': '<api-key>'}};
fetch('https://{tenant}/config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Tyk-Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}/config"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Tyk-Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant}/config")
.header("X-Tyk-Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Tyk-Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"type": "full",
"listen_port": 9090,
"healthcheck_port": 8180,
"http_port": 8180,
"enable_http_profiler": false,
"server_options": {
"use_ssl": false,
"certificate": {
"cert_file": "./server.crt",
"key_file": "./server.key"
},
"min_version": 0,
"ssl_ciphers": null,
"ssl_certificates": null,
"max_connection_idle_time": 0,
"max_connections": 0
},
"http_server_options": {
"use_ssl": false,
"certificate": {
"cert_file": "",
"key_file": ""
},
"min_version": 0,
"ssl_ciphers": null,
"ssl_certificates": null,
"max_connection_idle_time": 0,
"max_connections": 0
},
"security": {
"private_certificate_encoding_secret": "",
"enable_http_secure_endpoints": true,
"secret": ""
},
"storage": {
"type": "redis",
"host": "localhost",
"port": 6379,
"master_name": "",
"sentinel_password": "",
"username": "",
"password": "",
"database": 0,
"optimisation_max_idle": 0,
"optimisation_max_active": 0,
"enable_cluster": false,
"hosts": null,
"addrs": null,
"redis_use_ssl": false,
"redis_ssl_insecure_skip_verify": false,
"debug": false,
"timeout": 0,
"use_ssl": false,
"ssl_insecure_skip_verify": false,
"ca_file": "",
"cert_file": "",
"key_file": "",
"max_version": "",
"min_version": ""
},
"analytics": {
"type": "mongo",
"connection_string": "",
"table_sharding": false,
"batch_size": 0,
"postgres": {
"prefer_simple_protocol": false,
"max_open_connections": 0,
"max_idle_connections": 0,
"connection_max_lifetime": "",
"connection_max_idle_time": ""
},
"mysql": {
"default_string_size": 0,
"disable_datetime_precision": false,
"dont_support_rename_index": false,
"dont_support_rename_column": false,
"skip_initialize_with_version": false
},
"mongo_url": "",
"mongo_use_ssl": false,
"mongo_ssl_insecure_skip_verify": false,
"mongo_ssl_allow_invalid_hostnames": false,
"mongo_ssl_ca_file": "",
"mongo_ssl_pem_keyfile": "",
"mongo_session_consistency": "",
"mongo_batch_size": 0,
"driver": "mongo-go",
"mongo_direct_connection": false,
"mongo_ignore_aggregations": null,
"mongo_enable_aggregate_self_healing": false
},
"hash_keys": true,
"session_timeout": 0,
"forward_analytics_to_pump": false,
"enable_multiple_analytics_keys": false,
"dont_store_selective": false,
"dont_store_aggregate": false,
"org_session_expiration": 60,
"org_session_cleanup": 60,
"license": "",
"aggregates_ignore_tags": null,
"track_all_paths": false,
"store_analytics_per_minute": false,
"ignore_tag_prefix_list": null,
"threshold_len_tag_list": 1000,
"omit_analytics_index_creation": false,
"enable_separate_analytics_store": false,
"analytics_storage": {
"type": "",
"host": "",
"port": 0,
"master_name": "",
"sentinel_password": "",
"username": "",
"password": "",
"database": 0,
"optimisation_max_idle": 0,
"optimisation_max_active": 0,
"enable_cluster": false,
"hosts": null,
"addrs": null,
"redis_use_ssl": false,
"redis_ssl_insecure_skip_verify": false,
"debug": false,
"timeout": 0,
"use_ssl": false,
"ssl_insecure_skip_verify": false,
"ca_file": "",
"cert_file": "",
"key_file": "",
"max_version": "",
"min_version": ""
},
"log_level": "info",
"enable_key_logging": false,
"sync_worker_config": {
"enabled": true,
"hash_keys": true,
"max_batch_size": 1000,
"time_between_batches": 3,
"max_workers": 1000,
"warmup_time": 0,
"group_key_ttl": 30
},
"enable_ownership": false
}Response
Successful retrieval of the current configuration.
Was this page helpful?