Skip to main content
POST
/
fault
Create a fault
curl --request POST \
  --url https://v1.api.altostrat.io/fault \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "resource_id": "dev_2j4k2l2j3k4l2j3k4",
  "microservice_id": "manual-api-entry",
  "type": "wan-degradation",
  "severity": "HIGH",
  "message": "WAN link latency high: Primary link (WAN1) latency is elevated",
  "cause": "Latency probe exceeded 250ms for 5 consecutive checks.",
  "resource_ancestry_path": "site_8a7b6c5d4e3f2g1h|dev_2j4k2l2j3k4l2j3k4"
}
'
import requests

url = "https://v1.api.altostrat.io/fault"

payload = {
"resource_id": "dev_2j4k2l2j3k4l2j3k4",
"microservice_id": "manual-api-entry",
"type": "wan-degradation",
"severity": "HIGH",
"message": "WAN link latency high: Primary link (WAN1) latency is elevated",
"cause": "Latency probe exceeded 250ms for 5 consecutive checks.",
"resource_ancestry_path": "site_8a7b6c5d4e3f2g1h|dev_2j4k2l2j3k4l2j3k4"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
resource_id: 'dev_2j4k2l2j3k4l2j3k4',
microservice_id: 'manual-api-entry',
type: 'wan-degradation',
severity: 'HIGH',
message: 'WAN link latency high: Primary link (WAN1) latency is elevated',
cause: 'Latency probe exceeded 250ms for 5 consecutive checks.',
resource_ancestry_path: 'site_8a7b6c5d4e3f2g1h|dev_2j4k2l2j3k4l2j3k4'
})
};

fetch('https://v1.api.altostrat.io/fault', 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/fault",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'resource_id' => 'dev_2j4k2l2j3k4l2j3k4',
'microservice_id' => 'manual-api-entry',
'type' => 'wan-degradation',
'severity' => 'HIGH',
'message' => 'WAN link latency high: Primary link (WAN1) latency is elevated',
'cause' => 'Latency probe exceeded 250ms for 5 consecutive checks.',
'resource_ancestry_path' => 'site_8a7b6c5d4e3f2g1h|dev_2j4k2l2j3k4l2j3k4'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://v1.api.altostrat.io/fault"

payload := strings.NewReader("{\n \"resource_id\": \"dev_2j4k2l2j3k4l2j3k4\",\n \"microservice_id\": \"manual-api-entry\",\n \"type\": \"wan-degradation\",\n \"severity\": \"HIGH\",\n \"message\": \"WAN link latency high: Primary link (WAN1) latency is elevated\",\n \"cause\": \"Latency probe exceeded 250ms for 5 consecutive checks.\",\n \"resource_ancestry_path\": \"site_8a7b6c5d4e3f2g1h|dev_2j4k2l2j3k4l2j3k4\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://v1.api.altostrat.io/fault")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"resource_id\": \"dev_2j4k2l2j3k4l2j3k4\",\n \"microservice_id\": \"manual-api-entry\",\n \"type\": \"wan-degradation\",\n \"severity\": \"HIGH\",\n \"message\": \"WAN link latency high: Primary link (WAN1) latency is elevated\",\n \"cause\": \"Latency probe exceeded 250ms for 5 consecutive checks.\",\n \"resource_ancestry_path\": \"site_8a7b6c5d4e3f2g1h|dev_2j4k2l2j3k4l2j3k4\"\n}")
.asString();
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"resource_id\": \"dev_2j4k2l2j3k4l2j3k4\",\n \"microservice_id\": \"manual-api-entry\",\n \"type\": \"wan-degradation\",\n \"severity\": \"HIGH\",\n \"message\": \"WAN link latency high: Primary link (WAN1) latency is elevated\",\n \"cause\": \"Latency probe exceeded 250ms for 5 consecutive checks.\",\n \"resource_ancestry_path\": \"site_8a7b6c5d4e3f2g1h|dev_2j4k2l2j3k4l2j3k4\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "flt_31pkd1t8FvW7qZv0jG2a9kH5mB1",
  "resource_id": "dev_2j4k2l2j3k4l2j3k4",
  "customer_id": "cus_1i2j3k4l5m6n7o8p",
  "microservice_id": "wantunnel-monitor",
  "type": "wantunnel",
  "status": "unresolved",
  "severity": "CRITICAL",
  "message": "WAN link failover: Primary link (WAN1) is down",
  "cause": "Probe failed: Latency exceeded 500ms threshold",
  "created_at": "2025-10-21T12:00:00.000000Z",
  "resolved_at": null,
  "resource_ancestry_path": "site_8a7b6c5d4e3f2g1h|dev_2j4k2l2j3k4l2j3k4",
  "ttl": 1797825595,
  "comments": [
    {
      "user_id": "user_a1b2c3d4e5f6g7h8",
      "comment": "Contacted ISP, they are investigating a local outage.",
      "created_at": "2025-10-21T12:05:30.000000Z"
    }
  ]
}
{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'message' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}
{
"type": "authentication_error",
"code": "api_key_invalid",
"message": "The provided API key is invalid.",
"doc_url": "https://docs.altostrat.io/errors/api_key_invalid"
}
{
"type": "permission_error",
"code": "permission_denied",
"message": "You do not have the required scope to perform this action.",
"doc_url": "https://docs.altostrat.io/errors/permission_denied"
}
{
"type": "api_error",
"code": "internal_server_error",
"message": "An internal error occurred. Please try again or contact support if the issue persists.",
"doc_url": "https://docs.altostrat.io/errors/internal_server_error"
}

Authorizations

Authorization
string
header
required

API requests are authenticated using a JSON Web Token (JWT) provided in the Authorization header.

Body

application/json

The details of the fault to create.

resource_id
string
required

The unique identifier of the resource experiencing the fault.

Example:

"dev_2j4k2l2j3k4l2j3k4"

microservice_id
string
required

The identifier of the microservice reporting the fault.

Example:

"manual-api-entry"

type
string
required

A slug-style category for the fault.

Example:

"wan-degradation"

severity
enum<string>
required

The severity level of the fault.

Available options:
LOW,
MEDIUM,
HIGH,
CRITICAL,
WARNING
Example:

"HIGH"

message
string
required

A concise, human-readable summary of the fault.

Example:

"WAN link latency high: Primary link (WAN1) latency is elevated"

cause
string
required

A detailed explanation of the probable cause.

Example:

"Latency probe exceeded 250ms for 5 consecutive checks."

resource_ancestry_path
string

Optional. A pipe-delimited | string for hierarchical context.

Example:

"site_8a7b6c5d4e3f2g1h|dev_2j4k2l2j3k4l2j3k4"

Response

The newly created fault object.

The Fault object represents a detected issue or event within the network.

id
string

A unique identifier for the fault object, prefixed with flt_.

Example:

"flt_31pkd1t8FvW7qZv0jG2a9kH5mB1"

resource_id
string

The unique identifier of the resource that experienced the fault.

Example:

"dev_2j4k2l2j3k4l2j3k4"

customer_id
string

The unique identifier of the customer account this fault belongs to.

Example:

"cus_1i2j3k4l5m6n7o8p"

microservice_id
string

The identifier of the microservice that reported the fault.

Example:

"wantunnel-monitor"

type
string

The category or type of the fault.

Example:

"wantunnel"

status
enum<string>

The current status of the fault.

Available options:
unresolved,
resolved
Example:

"unresolved"

severity
enum<string>

The severity level of the fault.

Available options:
LOW,
MEDIUM,
HIGH,
CRITICAL,
WARNING
Example:

"CRITICAL"

message
string

A concise, human-readable summary of the fault.

Example:

"WAN link failover: Primary link (WAN1) is down"

cause
string

A detailed explanation of the probable cause of the fault.

Example:

"Probe failed: Latency exceeded 500ms threshold"

created_at
string<date-time>

The timestamp when the fault was first detected and created.

Example:

"2025-10-21T12:00:00.000000Z"

resolved_at
string<date-time> | null

The timestamp when the fault was resolved. Null if the fault is still active.

Example:

null

resource_ancestry_path
string | null

A pipe-delimited | string representing the hierarchical location of the resource, used for filtering faults by a parent resource (e.g., a specific site).

Example:

"site_8a7b6c5d4e3f2g1h|dev_2j4k2l2j3k4l2j3k4"

ttl
integer | null

A Unix timestamp indicating when the fault record will automatically expire from the database.

Example:

1797825595

comments
object[]

A list of comments associated with the fault, ordered from oldest to newest.