Skip to main content
GET
/
control-plane
/
{siteId}
/
credentials
Get API credentials for a site
curl --request GET \
  --url https://v1.api.altostrat.io/control-plane/{siteId}/credentials \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://v1.api.altostrat.io/control-plane/{siteId}/credentials"

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/control-plane/{siteId}/credentials', 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/control-plane/{siteId}/credentials",
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/control-plane/{siteId}/credentials"

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

url = URI("https://v1.api.altostrat.io/control-plane/{siteId}/credentials")

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
[
  {
    "id": "b7a6c5d4-e3f2-1098-7654-3210abcdef98",
    "site_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "username": "altostrat-api",
    "password": "Extr3m3lyS3cur3P@ssw0rdG3n3r@t3d",
    "ip_address": "100.64.1.23",
    "api_port": 8728,
    "server_ip": "edge-us-east-1a.ostrat.io",
    "created_at": "2025-10-28T05:00:00Z",
    "updated_at": "2025-10-28T05:00:00Z"
  }
]
{
"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

Enter your JWT bearer token.

Path Parameters

siteId
string<uuid>
required

The unique identifier for the site.

Example:

"d290f1ee-6c54-4b01-90e6-d701748f0851"

Response

An array containing the site's API credential object.

id
string<uuid>

The unique identifier for the credential set.

Example:

"b7a6c5d4-e3f2-1098-7654-3210abcdef98"

site_id
string<uuid>

The ID of the site these credentials belong to.

Example:

"d290f1ee-6c54-4b01-90e6-d701748f0851"

username
string

The username for API access to the device.

Example:

"altostrat-api"

password
string

The password for API access to the device.

Example:

"Extr3m3lyS3cur3P@ssw0rdG3n3r@t3d"

ip_address
string<ipv4>

The private IP address of the device within the management tunnel.

Example:

"100.64.1.23"

api_port
integer

The API port configured on the device, as per its policy.

Example:

8728

server_ip
string

The hostname of the Altostrat management server managing the device's tunnel.

Example:

"edge-us-east-1a.ostrat.io"

created_at
string<date-time>

The timestamp when these credentials were created.

Example:

"2025-10-28T05:00:00Z"

updated_at
string<date-time>

The timestamp when these credentials were last updated.

Example:

"2025-10-28T05:00:00Z"