Skip to main content
GET
/
backup
/
{siteId}
/
{filename}
Retrieve a Specific Backup
curl --request GET \
  --url https://v1.api.altostrat.io/backup/{siteId}/{filename} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://v1.api.altostrat.io/backup/{siteId}/{filename}"

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/backup/{siteId}/{filename}', 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/backup/{siteId}/{filename}",
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/backup/{siteId}/{filename}"

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/backup/{siteId}/{filename}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://v1.api.altostrat.io/backup/{siteId}/{filename}")

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
{
  "filename": "1732567800.rsc",
  "size": "12.3KB",
  "date": "29/10/2025",
  "time": "12:50:00",
  "created_at": "2025-10-29T12:50:00.000000Z",
  "content": "/ip address\nadd address=192.168.88.1/24 interface=bridge network=192.168.88.0\n..."
}
{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}
{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}
{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}

Authorizations

Authorization
string
header
required

A bearer token is required for all API requests. Obtain a token via the Altostrat Authentication API.

Headers

X-View
boolean

Set to true to receive the backup content as raw plain text (text/plain).

X-Highlight
boolean

Set to true to receive the backup content with syntax highlighting as an HTML fragment (text/html).

X-Download
boolean

Set to true to trigger a file download with appropriate Content-Disposition headers (application/octet-stream).

Path Parameters

siteId
string<uuid>
required

The unique identifier for the site.

Example:

"a1b2c3d4-e5f6-7890-1234-567890abcdef"

filename
string
required

The filename of the backup, typically a UNIX timestamp with an .rsc extension.

Example:

"1732567800.rsc"

Response

The requested backup file content, formatted based on request headers.

The full content and metadata of a specific backup file.

filename
string

The unique filename of the backup file.

Example:

"1732567800.rsc"

size
string

The human-readable size of the backup file.

Example:

"12.3KB"

date
string

The date the backup was created, formatted according to the user's preferences.

Example:

"29/10/2025"

time
string

The time the backup was created, formatted according to the user's preferences and timezone.

Example:

"12:50:00"

created_at
string<date-time>

The full ISO 8601 timestamp of when the backup was created.

Example:

"2025-10-29T12:50:00.000000Z"

content
string

The full text content of the RouterOS configuration script.

Example:

"/ip address\nadd address=192.168.88.1/24 interface=bridge network=192.168.88.0\n..."