Skip to main content
GET
/
products
/
{product_id}
/
api-details
/
{api-id}
Get description of an API
curl --request GET \
  --url http://localhost:3001/portal-api/products/{product_id}/api-details/{api-id} \
  --header 'Authorization: <api-key>'
import requests

url = "http://localhost:3001/portal-api/products/{product_id}/api-details/{api-id}"

headers = {"Authorization": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: '<api-key>'}};

fetch('http://localhost:3001/portal-api/products/{product_id}/api-details/{api-id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/portal-api/products/{product_id}/api-details/{api-id}",
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: <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 := "http://localhost:3001/portal-api/products/{product_id}/api-details/{api-id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("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("http://localhost:3001/portal-api/products/{product_id}/api-details/{api-id}")
.header("Authorization", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("http://localhost:3001/portal-api/products/{product_id}/api-details/{api-id}")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "APIID": "a0ce49d559ce49d64fe608ea3728082a",
  "APIType": "authToken",
  "Description": "This API provides payment endpoints",
  "ListenPath": "/payments/",
  "Name": "Payment API",
  "OASUrl": "https://petstore.swagger.io/v2/swagger.json",
  "Status": true,
  "TargetURL": "http://httpbin.org/"
}
{
"APIID": "a0ce49d559ce49d64fe608ea3728082a",
"APIType": "authToken",
"Description": "This API provides payment endpoints",
"ListenPath": "/payments/",
"Name": "Payment API",
"OASUrl": "https://petstore.swagger.io/v2/swagger.json",
"Status": true,
"TargetURL": "http://httpbin.org/"
}

Authorizations

Authorization
string
header
required

Path Parameters

api-id
string
required

UID of an API as it comes from the API Provider

Example:

"a0ce49d559ce49d64fe608ea3728082a"

product_id
integer
required

UID of an API Product

Example:

1

Response

OK

APIID
string

API ID from the Tyk Gateway

Example:

"a0ce49d559ce49d64fe608ea3728082a"

APIType
string

Authentication type of an API

Example:

"authToken"

Description
string

Human-readable description of an API added by the portal admins

Example:

"This API provides payment endpoints"

ListenPath
string

Listen path which is defined for this API in the gateway

Example:

"/payments/"

Name
string

Name of an API as it is defined in the gateway

Example:

"Payment API"

OASUrl
string

URL of OpenAPI Specification for this API. The document must be a valid OAS document

Example:

"https://petstore.swagger.io/v2/swagger.json"

Status
boolean

Status of this API: true means the API is up and false identifies that it is down

Example:

true

TargetURL
string

Upstream URL of this API

Example:

"http://httpbin.org/"