Get Streams API's Fragments.
curl --request GET \
--url https://{tenant}/api/apis/streams/{apiId}/fragments \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}/api/apis/streams/{apiId}/fragments"
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/apis/streams/{apiId}/fragments', 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/apis/streams/{apiId}/fragments",
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/apis/streams/{apiId}/fragments"
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/apis/streams/{apiId}/fragments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/api/apis/streams/{apiId}/fragments")
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{
"$.info.description": {
"id": "api-description",
"kind": "fragment",
"name": "Shared API description",
"data": "This API is maintained by the platform team.",
"last_updated": "2026-09-11T08:48:36.183Z",
"org_id": "5e9d9544a1dcd60001d0ed20"
},
"$['x-tyk-api-gateway'].upstream.rateLimit": {
"id": "standard-rate-limit",
"kind": "fragment",
"name": "Standard rate limit",
"data": {
"enabled": true,
"per": "60s",
"rate": 100
},
"last_updated": "2026-09-11T08:48:36.183Z",
"org_id": "5e9d9544a1dcd60001d0ed20"
}
}{
"Message": "Can't fetch OAS API for a Tyk Classic API.",
"Meta": null,
"Status": "Error"
}{
"Message": "Not authorised",
"Meta": null,
"Status": "Error"
}{
"Message": "access denied: You do not have permission to access /api/apis/streams/{apiId}/fragments",
"Meta": null,
"Status": "Error"
}{
"Message": "API not found",
"Meta": null,
"Status": "Error"
}{
"Message": "Could not retrieve API fragments",
"Meta": null,
"Status": "Error"
}Streams APIs
Get Streams API's Fragments.
Get every fragment referenced by the specified Streams API, keyed by the JSONPath of the reference node in the API definition. The API definition returned by GET /api/apis/streams/ keeps its “fragment://” references unresolved, so this is how a client finds out what each of them stands for. A key addresses the reference node itself rather than the “$ref” member inside it, so the surrounding block is reachable by trimming the path. A fragment referenced from two places appears under two keys.
GET
/
api
/
apis
/
streams
/
{apiId}
/
fragments
Get Streams API's Fragments.
curl --request GET \
--url https://{tenant}/api/apis/streams/{apiId}/fragments \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}/api/apis/streams/{apiId}/fragments"
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/apis/streams/{apiId}/fragments', 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/apis/streams/{apiId}/fragments",
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/apis/streams/{apiId}/fragments"
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/apis/streams/{apiId}/fragments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/api/apis/streams/{apiId}/fragments")
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{
"$.info.description": {
"id": "api-description",
"kind": "fragment",
"name": "Shared API description",
"data": "This API is maintained by the platform team.",
"last_updated": "2026-09-11T08:48:36.183Z",
"org_id": "5e9d9544a1dcd60001d0ed20"
},
"$['x-tyk-api-gateway'].upstream.rateLimit": {
"id": "standard-rate-limit",
"kind": "fragment",
"name": "Standard rate limit",
"data": {
"enabled": true,
"per": "60s",
"rate": 100
},
"last_updated": "2026-09-11T08:48:36.183Z",
"org_id": "5e9d9544a1dcd60001d0ed20"
}
}{
"Message": "Can't fetch OAS API for a Tyk Classic API.",
"Meta": null,
"Status": "Error"
}{
"Message": "Not authorised",
"Meta": null,
"Status": "Error"
}{
"Message": "access denied: You do not have permission to access /api/apis/streams/{apiId}/fragments",
"Meta": null,
"Status": "Error"
}{
"Message": "API not found",
"Meta": null,
"Status": "Error"
}{
"Message": "Could not retrieve API fragments",
"Meta": null,
"Status": "Error"
}Was this page helpful?