Get Streams API details.
curl --request GET \
--url https://{tenant}/api/apis/streams/{apiId} \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}/api/apis/streams/{apiId}"
headers = {
"Accept": "<accept>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Accept: '<accept>', Authorization: 'Bearer <token>'}};
fetch('https://{tenant}/api/apis/streams/{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/apis/streams/{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 => [
"Accept: <accept>",
"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}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "<accept>")
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}")
.header("Accept", "<accept>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/api/apis/streams/{apiId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = '<accept>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"components": {
"securitySchemes": {
"bearerAuth": {
"description": "The API Access Credentials",
"scheme": "bearer",
"type": "http"
}
}
},
"info": {
"description": "This is a sample Streams API.",
"title": "Streams Sample",
"version": "1.0.0"
},
"openapi": "3.0.3",
"paths": {
"/api/sample/users": {
"get": {
"operationId": "getUsersSample",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"items": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
}
},
"description": "fetched users"
}
},
"summary": "Get users",
"tags": [
"users"
]
}
}
},
"security": [
{
"bearerAuth": []
}
],
"servers": [
{
"url": "https://localhost:8080"
}
],
"x-tyk-api-gateway": {
"info": {
"name": "user",
"state": {
"active": true
}
},
"server": {
"listenPath": {
"strip": true,
"value": "/user-test-six/"
}
},
"upstream": {
"url": "https://localhost:8080"
}
},
"x-tyk-streaming": {
"streams": {
"stream1": {
"input": {
"kafka": {
"addresses": [
"localhost:9093"
],
"auto_replay_nacks": true,
"checkpoint_limit": 1024,
"consumer_group": "group1",
"target_version": "3.3.0",
"topics": [
"instrument.json.AMZN",
"instrument.json.GOOG"
]
}
},
"output": {
"broker": {
"outputs": [
{
"stdout": {
"codec": "lines"
}
},
{
"http_server": {
"allowed_verbs": [
"GET"
],
"path": "/one",
"stream_path": "/sse",
"ws_path": "/ws"
}
}
],
"pattern": "fan_out"
}
}
}
}
}
}{
"Message": "Could not retrieve API detail.",
"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}",
"Meta": null,
"Status": "Error"
}{
"Message": "Failed to marshal data for API detail.",
"Meta": null,
"Status": "Error"
}Streams APIs
Get Streams API details.
Get a single Streams API definition.
GET
/
api
/
apis
/
streams
/
{apiId}
Get Streams API details.
curl --request GET \
--url https://{tenant}/api/apis/streams/{apiId} \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}/api/apis/streams/{apiId}"
headers = {
"Accept": "<accept>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Accept: '<accept>', Authorization: 'Bearer <token>'}};
fetch('https://{tenant}/api/apis/streams/{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/apis/streams/{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 => [
"Accept: <accept>",
"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}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "<accept>")
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}")
.header("Accept", "<accept>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/api/apis/streams/{apiId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = '<accept>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"components": {
"securitySchemes": {
"bearerAuth": {
"description": "The API Access Credentials",
"scheme": "bearer",
"type": "http"
}
}
},
"info": {
"description": "This is a sample Streams API.",
"title": "Streams Sample",
"version": "1.0.0"
},
"openapi": "3.0.3",
"paths": {
"/api/sample/users": {
"get": {
"operationId": "getUsersSample",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"items": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
}
},
"description": "fetched users"
}
},
"summary": "Get users",
"tags": [
"users"
]
}
}
},
"security": [
{
"bearerAuth": []
}
],
"servers": [
{
"url": "https://localhost:8080"
}
],
"x-tyk-api-gateway": {
"info": {
"name": "user",
"state": {
"active": true
}
},
"server": {
"listenPath": {
"strip": true,
"value": "/user-test-six/"
}
},
"upstream": {
"url": "https://localhost:8080"
}
},
"x-tyk-streaming": {
"streams": {
"stream1": {
"input": {
"kafka": {
"addresses": [
"localhost:9093"
],
"auto_replay_nacks": true,
"checkpoint_limit": 1024,
"consumer_group": "group1",
"target_version": "3.3.0",
"topics": [
"instrument.json.AMZN",
"instrument.json.GOOG"
]
}
},
"output": {
"broker": {
"outputs": [
{
"stdout": {
"codec": "lines"
}
},
{
"http_server": {
"allowed_verbs": [
"GET"
],
"path": "/one",
"stream_path": "/sse",
"ws_path": "/ws"
}
}
],
"pattern": "fan_out"
}
}
}
}
}
}{
"Message": "Could not retrieve API detail.",
"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}",
"Meta": null,
"Status": "Error"
}{
"Message": "Failed to marshal data for API detail.",
"Meta": null,
"Status": "Error"
}Authorizations
The Tyk Dashboard API Access Credentials
Headers
Accept type for streams endpoints should be application/vnd.tyk.streams.oas
Available options:
application/vnd.tyk.streams.oas Path Parameters
ID of the API you want to fetch.
Response
Fetched API.
The description of OpenAPI v3.0.x documents, as defined by https://spec.openapis.org/oas/v3.0.3
Pattern:
^3\.0\.\d(-.+)?$Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?