Get an MCP Proxy definition.
curl --request GET \
--url https://{tenant}/api/mcps/{apiId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}/api/mcps/{apiId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant}/api/mcps/{apiId}', 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}/api/mcps/{apiId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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}/api/mcps/{apiId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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}/api/mcps/{apiId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/api/mcps/{apiId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"x-tyk-api-gateway": {
"info": {
"dbId": "<string>",
"expiration": "<string>",
"id": "<string>",
"name": "<string>",
"orgId": "<string>",
"state": {
"active": true,
"internal": true
},
"versioning": {
"default": "<string>",
"enabled": true,
"fallbackToDefault": true,
"key": "<string>",
"location": "<string>",
"name": "<string>",
"stripVersioningData": true,
"urlVersioningPattern": "<string>",
"versions": [
{
"id": "<string>",
"name": "<string>"
}
]
}
},
"middleware": {
"global": {
"cache": {
"cacheAllSafeRequests": true,
"cacheByHeaders": [
"<string>"
],
"cacheResponseCodes": [
123
],
"controlTTLHeaderName": "<string>",
"enableUpstreamCacheControl": true,
"enabled": true,
"timeout": 123
},
"contextVariables": {
"enabled": true
},
"cors": {
"allowCredentials": true,
"allowedHeaders": [
"<string>"
],
"allowedMethods": [
"<string>"
],
"allowedOrigins": [
"<string>"
],
"debug": true,
"enabled": true,
"exposedHeaders": [
"<string>"
],
"maxAge": 123,
"optionsPassthrough": true
},
"pluginConfig": {
"bundle": {
"enabled": true,
"path": "<string>"
},
"data": {
"enabled": true,
"value": {}
},
"driver": "<string>"
},
"postAuthenticationPlugin": {
"plugins": [
{
"enabled": true,
"functionName": "<string>",
"path": "<string>",
"rawBodyOnly": true,
"requireSession": true
}
]
},
"postAuthenticationPlugins": [
{
"enabled": true,
"functionName": "<string>",
"path": "<string>",
"rawBodyOnly": true,
"requireSession": true
}
],
"postPlugin": {
"plugins": [
{
"enabled": true,
"functionName": "<string>",
"path": "<string>",
"rawBodyOnly": true,
"requireSession": true
}
]
},
"postPlugins": [
{
"enabled": true,
"functionName": "<string>",
"path": "<string>",
"rawBodyOnly": true,
"requireSession": true
}
],
"prePlugin": {
"plugins": [
{
"enabled": true,
"functionName": "<string>",
"path": "<string>",
"rawBodyOnly": true,
"requireSession": true
}
]
},
"prePlugins": [
{
"enabled": true,
"functionName": "<string>",
"path": "<string>",
"rawBodyOnly": true,
"requireSession": true
}
],
"responsePlugin": {
"plugins": [
{
"enabled": true,
"functionName": "<string>",
"path": "<string>",
"rawBodyOnly": true,
"requireSession": true
}
]
},
"responsePlugins": [
{
"enabled": true,
"functionName": "<string>",
"path": "<string>",
"rawBodyOnly": true,
"requireSession": true
}
],
"trafficLogs": {
"enabled": true
},
"transformRequestHeaders": {
"add": [
{
"name": "<string>",
"value": "<string>"
}
],
"enabled": true,
"remove": [
"<string>"
]
},
"transformResponseHeaders": {
"add": [
{
"name": "<string>",
"value": "<string>"
}
],
"enabled": true,
"remove": [
"<string>"
]
}
},
"operations": {}
},
"server": {
"authentication": {
"baseIdentityProvider": "<string>",
"custom": {
"AuthSources": {
"cookie": {
"enabled": true,
"name": "<string>"
},
"header": {
"enabled": true,
"name": "<string>"
},
"query": {
"enabled": true,
"name": "<string>"
}
},
"config": {
"enabled": true,
"functionName": "<string>",
"idExtractor": {
"config": {
"formParamName": "<string>",
"headerName": "<string>",
"regexp": "<string>",
"regexpMatchIndex": 123,
"xPathExp": "<string>"
},
"enabled": true,
"source": "<string>",
"with": "<string>"
},
"path": "<string>",
"rawBodyOnly": true
},
"enabled": true
},
"enabled": true,
"hmac": {
"AuthSources": {
"cookie": {
"enabled": true,
"name": "<string>"
},
"header": {
"enabled": true,
"name": "<string>"
},
"query": {
"enabled": true,
"name": "<string>"
}
},
"allowedAlgorithms": [
"<string>"
],
"allowedClockSkew": 123,
"enabled": true
},
"oidc": {
"AuthSources": {
"cookie": {
"enabled": true,
"name": "<string>"
},
"header": {
"enabled": true,
"name": "<string>"
},
"query": {
"enabled": true,
"name": "<string>"
}
},
"enabled": true,
"providers": [
{
"clientToPolicyMapping": [
{
"clientId": "<string>",
"policyId": "<string>"
}
],
"issuer": "<string>"
}
],
"scopes": {
"claimName": "<string>",
"scopeToPolicyMapping": [
{
"policyId": "<string>",
"scope": "<string>"
}
]
},
"segregateByClientId": true
},
"securitySchemes": {},
"stripAuthorizationData": true
},
"clientCertificates": {
"allowlist": [
"<string>"
],
"enabled": true
},
"customDomain": {
"certificates": [
"<string>"
],
"enabled": true,
"name": "<string>"
},
"detailedActivityLogs": {
"enabled": true
},
"detailedTracing": {
"enabled": true
},
"eventHandlers": [
{
"enabled": true,
"id": "<string>",
"name": "<string>",
"trigger": "<string>",
"type": "<string>"
}
],
"gatewayTags": {
"enabled": true,
"tags": [
"<string>"
]
},
"listenPath": {
"strip": true,
"value": "<string>"
}
},
"upstream": {
"certificatePinning": {
"domainToPublicKeysMapping": [
{
"domain": "<string>",
"publicKeys": [
"<string>"
]
}
],
"enabled": true
},
"mutualTLS": {
"domainToCertificateMapping": [
{
"certificate": "<string>",
"domain": "<string>"
}
],
"enabled": true
},
"rateLimit": {
"enabled": true,
"per": "PT2H30M15S",
"rate": 123
},
"serviceDiscovery": {
"cache": {
"enabled": true,
"timeout": 123
},
"cacheTimeout": 123,
"dataPath": "<string>",
"enabled": true,
"endpointReturnsList": true,
"parentDataPath": "<string>",
"portDataPath": "<string>",
"queryEndpoint": "<string>",
"targetPath": "<string>",
"useNestedQuery": true,
"useTargetList": true
},
"test": {
"serviceDiscovery": {
"cache": {
"enabled": true,
"timeout": 123
},
"cacheTimeout": 123,
"dataPath": "<string>",
"enabled": true,
"endpointReturnsList": true,
"parentDataPath": "<string>",
"portDataPath": "<string>",
"queryEndpoint": "<string>",
"targetPath": "<string>",
"useNestedQuery": true,
"useTargetList": true
}
},
"url": "<string>"
}
}
}{
"ID": "<string>",
"Message": "<string>",
"Meta": "<unknown>",
"Status": "<string>"
}{
"ID": "<string>",
"Message": "<string>",
"Meta": "<unknown>",
"Status": "<string>"
}MCP Proxies
Get an MCP Proxy definition.
Retrieve a single MCP Proxy definition by its ID. Returns 400 if the ID refers to a definition that is not an MCP Proxy definition.
GET
/
api
/
mcps
/
{apiId}
Get an MCP Proxy definition.
curl --request GET \
--url https://{tenant}/api/mcps/{apiId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}/api/mcps/{apiId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant}/api/mcps/{apiId}', 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}/api/mcps/{apiId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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}/api/mcps/{apiId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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}/api/mcps/{apiId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/api/mcps/{apiId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"x-tyk-api-gateway": {
"info": {
"dbId": "<string>",
"expiration": "<string>",
"id": "<string>",
"name": "<string>",
"orgId": "<string>",
"state": {
"active": true,
"internal": true
},
"versioning": {
"default": "<string>",
"enabled": true,
"fallbackToDefault": true,
"key": "<string>",
"location": "<string>",
"name": "<string>",
"stripVersioningData": true,
"urlVersioningPattern": "<string>",
"versions": [
{
"id": "<string>",
"name": "<string>"
}
]
}
},
"middleware": {
"global": {
"cache": {
"cacheAllSafeRequests": true,
"cacheByHeaders": [
"<string>"
],
"cacheResponseCodes": [
123
],
"controlTTLHeaderName": "<string>",
"enableUpstreamCacheControl": true,
"enabled": true,
"timeout": 123
},
"contextVariables": {
"enabled": true
},
"cors": {
"allowCredentials": true,
"allowedHeaders": [
"<string>"
],
"allowedMethods": [
"<string>"
],
"allowedOrigins": [
"<string>"
],
"debug": true,
"enabled": true,
"exposedHeaders": [
"<string>"
],
"maxAge": 123,
"optionsPassthrough": true
},
"pluginConfig": {
"bundle": {
"enabled": true,
"path": "<string>"
},
"data": {
"enabled": true,
"value": {}
},
"driver": "<string>"
},
"postAuthenticationPlugin": {
"plugins": [
{
"enabled": true,
"functionName": "<string>",
"path": "<string>",
"rawBodyOnly": true,
"requireSession": true
}
]
},
"postAuthenticationPlugins": [
{
"enabled": true,
"functionName": "<string>",
"path": "<string>",
"rawBodyOnly": true,
"requireSession": true
}
],
"postPlugin": {
"plugins": [
{
"enabled": true,
"functionName": "<string>",
"path": "<string>",
"rawBodyOnly": true,
"requireSession": true
}
]
},
"postPlugins": [
{
"enabled": true,
"functionName": "<string>",
"path": "<string>",
"rawBodyOnly": true,
"requireSession": true
}
],
"prePlugin": {
"plugins": [
{
"enabled": true,
"functionName": "<string>",
"path": "<string>",
"rawBodyOnly": true,
"requireSession": true
}
]
},
"prePlugins": [
{
"enabled": true,
"functionName": "<string>",
"path": "<string>",
"rawBodyOnly": true,
"requireSession": true
}
],
"responsePlugin": {
"plugins": [
{
"enabled": true,
"functionName": "<string>",
"path": "<string>",
"rawBodyOnly": true,
"requireSession": true
}
]
},
"responsePlugins": [
{
"enabled": true,
"functionName": "<string>",
"path": "<string>",
"rawBodyOnly": true,
"requireSession": true
}
],
"trafficLogs": {
"enabled": true
},
"transformRequestHeaders": {
"add": [
{
"name": "<string>",
"value": "<string>"
}
],
"enabled": true,
"remove": [
"<string>"
]
},
"transformResponseHeaders": {
"add": [
{
"name": "<string>",
"value": "<string>"
}
],
"enabled": true,
"remove": [
"<string>"
]
}
},
"operations": {}
},
"server": {
"authentication": {
"baseIdentityProvider": "<string>",
"custom": {
"AuthSources": {
"cookie": {
"enabled": true,
"name": "<string>"
},
"header": {
"enabled": true,
"name": "<string>"
},
"query": {
"enabled": true,
"name": "<string>"
}
},
"config": {
"enabled": true,
"functionName": "<string>",
"idExtractor": {
"config": {
"formParamName": "<string>",
"headerName": "<string>",
"regexp": "<string>",
"regexpMatchIndex": 123,
"xPathExp": "<string>"
},
"enabled": true,
"source": "<string>",
"with": "<string>"
},
"path": "<string>",
"rawBodyOnly": true
},
"enabled": true
},
"enabled": true,
"hmac": {
"AuthSources": {
"cookie": {
"enabled": true,
"name": "<string>"
},
"header": {
"enabled": true,
"name": "<string>"
},
"query": {
"enabled": true,
"name": "<string>"
}
},
"allowedAlgorithms": [
"<string>"
],
"allowedClockSkew": 123,
"enabled": true
},
"oidc": {
"AuthSources": {
"cookie": {
"enabled": true,
"name": "<string>"
},
"header": {
"enabled": true,
"name": "<string>"
},
"query": {
"enabled": true,
"name": "<string>"
}
},
"enabled": true,
"providers": [
{
"clientToPolicyMapping": [
{
"clientId": "<string>",
"policyId": "<string>"
}
],
"issuer": "<string>"
}
],
"scopes": {
"claimName": "<string>",
"scopeToPolicyMapping": [
{
"policyId": "<string>",
"scope": "<string>"
}
]
},
"segregateByClientId": true
},
"securitySchemes": {},
"stripAuthorizationData": true
},
"clientCertificates": {
"allowlist": [
"<string>"
],
"enabled": true
},
"customDomain": {
"certificates": [
"<string>"
],
"enabled": true,
"name": "<string>"
},
"detailedActivityLogs": {
"enabled": true
},
"detailedTracing": {
"enabled": true
},
"eventHandlers": [
{
"enabled": true,
"id": "<string>",
"name": "<string>",
"trigger": "<string>",
"type": "<string>"
}
],
"gatewayTags": {
"enabled": true,
"tags": [
"<string>"
]
},
"listenPath": {
"strip": true,
"value": "<string>"
}
},
"upstream": {
"certificatePinning": {
"domainToPublicKeysMapping": [
{
"domain": "<string>",
"publicKeys": [
"<string>"
]
}
],
"enabled": true
},
"mutualTLS": {
"domainToCertificateMapping": [
{
"certificate": "<string>",
"domain": "<string>"
}
],
"enabled": true
},
"rateLimit": {
"enabled": true,
"per": "PT2H30M15S",
"rate": 123
},
"serviceDiscovery": {
"cache": {
"enabled": true,
"timeout": 123
},
"cacheTimeout": 123,
"dataPath": "<string>",
"enabled": true,
"endpointReturnsList": true,
"parentDataPath": "<string>",
"portDataPath": "<string>",
"queryEndpoint": "<string>",
"targetPath": "<string>",
"useNestedQuery": true,
"useTargetList": true
},
"test": {
"serviceDiscovery": {
"cache": {
"enabled": true,
"timeout": 123
},
"cacheTimeout": 123,
"dataPath": "<string>",
"enabled": true,
"endpointReturnsList": true,
"parentDataPath": "<string>",
"portDataPath": "<string>",
"queryEndpoint": "<string>",
"targetPath": "<string>",
"useNestedQuery": true,
"useTargetList": true
}
},
"url": "<string>"
}
}
}{
"ID": "<string>",
"Message": "<string>",
"Meta": "<unknown>",
"Status": "<string>"
}{
"ID": "<string>",
"Message": "<string>",
"Meta": "<unknown>",
"Status": "<string>"
}Was this page helpful?
⌘I