Skip to main content
GET
/
control-plane
/
policies
/
{policyId}
Retrieve a policy
curl --request GET \
  --url https://v1.api.altostrat.io/control-plane/policies/{policyId} \
  --header 'Authorization: Bearer <token>'
import requests

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

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/policies/{policyId}', 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/policies/{policyId}",
  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/policies/{policyId}"

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

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

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": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
  "name": "Default Corporate Policy",
  "slug": "default-corporate-policy-a1b2c3d4e5",
  "default": true,
  "custom_input_rules": true,
  "trusted_networks": [
    "10.0.0.0/8"
  ],
  "winbox": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "ssh": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "http": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "https": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "telnet": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "ftp": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "api": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "api_ssl": {
    "enabled": true,
    "port": 8291,
    "networks": [
      "198.51.100.0/24"
    ]
  },
  "sites": [
    "d290f1ee-6c54-4b01-90e6-d701748f0851"
  ],
  "created_at": "2025-10-29T01:00:00Z",
  "updated_at": "2025-10-29T02:30: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

policyId
string<uuid>
required

The unique identifier for the policy.

Example:

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

Response

The policy object.

id
string<uuid>

The unique identifier for the policy.

Example:

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

name
string

A human-readable name for the policy.

Example:

"Default Corporate Policy"

slug
string

A unique, URL-friendly identifier for the policy.

Example:

"default-corporate-policy-a1b2c3d4e5"

default
boolean

Whether this is the default policy for the workspace.

Example:

true

custom_input_rules
boolean

Whether custom input rules are being used.

Example:

true

trusted_networks
string[]

A list of CIDR networks that are considered trusted across all services in this policy.

winbox
object
ssh
object
http
object
https
object
telnet
object
ftp
object
api
object
api_ssl
object
sites
string<uuid>[]

A list of Site UUIDs that this policy is applied to.

Example:
["d290f1ee-6c54-4b01-90e6-d701748f0851"]
created_at
string<date-time>

The timestamp when the policy was created.

Example:

"2025-10-29T01:00:00Z"

updated_at
string<date-time>

The timestamp when the policy was last updated.

Example:

"2025-10-29T02:30:00Z"