Skip to main content
GET
/
search
/
docs
Search Altostrat Documentation
curl --request GET \
  --url https://v1.api.altostrat.io/search/docs \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://v1.api.altostrat.io/search/docs"

headers = {"Authorization": "Bearer <token>"}

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

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

fetch('https://v1.api.altostrat.io/search/docs', 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://v1.api.altostrat.io/search/docs",
  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://v1.api.altostrat.io/search/docs"

	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://v1.api.altostrat.io/search/docs")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://v1.api.altostrat.io/search/docs")

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
[
  {
    "title": "Configuring BGP on MikroTik",
    "description": "A step-by-step guide to setting up BGP peering sessions on MikroTik RouterOS.",
    "type": "doc",
    "href": "https://altostrat.io/docs/networking/bgp-mikrotik",
    "content": "...to establish a BGP session, you must first define a remote peer with the correct ASN..."
  }
]
{
  "type": "invalid_request_error",
  "code": "parameter_missing",
  "message": "The 'q' parameter is required for this request.",
  "doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}
{
  "type": "invalid_request_error",
  "code": "parameter_missing",
  "message": "The 'q' parameter is required for this request.",
  "doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}
{
  "type": "invalid_request_error",
  "code": "parameter_missing",
  "message": "The 'q' parameter is required for this request.",
  "doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}
{
  "type": "invalid_request_error",
  "code": "parameter_missing",
  "message": "The 'q' parameter is required for this request.",
  "doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}

Authorizations

Authorization
string
header
required

Enter your bearer token in the format: Bearer {token}

Query Parameters

q
string
required

The search query string for finding relevant documentation.

Maximum string length: 255
limit
integer
default:10

The maximum number of search results to return.

Required range: 1 <= x <= 20
include_content
boolean
default:false

If true, the response will include a snippet of the matching content from the document.

Response

A list of matching documentation pages.

title
string

The title of the documentation page.

Example:

"Configuring BGP on MikroTik"

description
string

The summary or meta description of the page.

Example:

"A step-by-step guide to setting up BGP peering sessions on MikroTik RouterOS."

type
enum<string>

The type of documentation. api for API reference, doc for guides and articles.

Available options:
api,
doc
Example:

"doc"

href
string<uri>

The full URL to the documentation page.

Example:

"https://altostrat.io/docs/networking/bgp-mikrotik"

content
string

A snippet of the page content that matches the search query. Only included if include_content=true.

Example:

"...to establish a BGP session, you must first define a remote peer with the correct ASN..."