Troubleshoot Issue
curl --request POST \
--url https://api.wistx.ai/v1/troubleshoot/issue \
--header 'Content-Type: application/json' \
--data '
{
"issue_description": "<string>",
"infrastructure_type": "<string>",
"cloud_provider": "<string>",
"error_messages": [
{}
],
"configuration_code": "<string>",
"logs": "<string>",
"resource_type": "<string>"
}
'import requests
url = "https://api.wistx.ai/v1/troubleshoot/issue"
payload = {
"issue_description": "<string>",
"infrastructure_type": "<string>",
"cloud_provider": "<string>",
"error_messages": [{}],
"configuration_code": "<string>",
"logs": "<string>",
"resource_type": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
issue_description: '<string>',
infrastructure_type: '<string>',
cloud_provider: '<string>',
error_messages: [{}],
configuration_code: '<string>',
logs: '<string>',
resource_type: '<string>'
})
};
fetch('https://api.wistx.ai/v1/troubleshoot/issue', 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://api.wistx.ai/v1/troubleshoot/issue",
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([
'issue_description' => '<string>',
'infrastructure_type' => '<string>',
'cloud_provider' => '<string>',
'error_messages' => [
[
]
],
'configuration_code' => '<string>',
'logs' => '<string>',
'resource_type' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://api.wistx.ai/v1/troubleshoot/issue"
payload := strings.NewReader("{\n \"issue_description\": \"<string>\",\n \"infrastructure_type\": \"<string>\",\n \"cloud_provider\": \"<string>\",\n \"error_messages\": [\n {}\n ],\n \"configuration_code\": \"<string>\",\n \"logs\": \"<string>\",\n \"resource_type\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.wistx.ai/v1/troubleshoot/issue")
.header("Content-Type", "application/json")
.body("{\n \"issue_description\": \"<string>\",\n \"infrastructure_type\": \"<string>\",\n \"cloud_provider\": \"<string>\",\n \"error_messages\": [\n {}\n ],\n \"configuration_code\": \"<string>\",\n \"logs\": \"<string>\",\n \"resource_type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wistx.ai/v1/troubleshoot/issue")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"issue_description\": \"<string>\",\n \"infrastructure_type\": \"<string>\",\n \"cloud_provider\": \"<string>\",\n \"error_messages\": [\n {}\n ],\n \"configuration_code\": \"<string>\",\n \"logs\": \"<string>\",\n \"resource_type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"incident_id": "inc_abc123",
"diagnosis": {
"root_cause": "Image repository not found or inaccessible",
"confidence": "high",
"issues": [
"Image repository not found or inaccessible",
"Missing image pull secrets",
"Incorrect image tag"
],
"error_patterns": ["ImagePullBackOff", "repository not found"],
"log_analysis": {
"error_count": 2,
"error_lines": ["Error: ImagePullBackOff", "Failed to pull image"]
},
"configuration_issues": [
"Image tag 'latest' is not recommended for production",
"No imagePullSecrets specified"
]
},
"issues": [
"Image repository not found or inaccessible",
"Missing image pull secrets",
"Incorrect image tag"
],
"fixes": [
{
"title": "Fix Image Pull Error",
"description": "Update the image reference to use a valid repository and tag",
"code_example": "apiVersion: v1\nkind: Pod\nspec:\n containers:\n - name: app\n image: myregistry.com/myapp:v1.0.0",
"steps": [
"Verify image exists in registry",
"Update image reference with correct tag",
"Add imagePullSecrets if using private registry"
],
"source": "ai_analysis",
"confidence": "high"
}
],
"prevention": [
"Use specific image tags instead of 'latest'",
"Configure imagePullSecrets for private registries",
"Implement image scanning and validation",
"Use image pull policies appropriately",
"Monitor pod startup failures"
],
"related_knowledge": [
{
"article_id": "kb_123",
"title": "Kubernetes Image Pull Errors",
"summary": "Common causes and solutions for image pull errors..."
}
],
"similar_issues": [],
"similar_incidents": [
{
"incident_id": "inc_xyz789",
"issue_description": "Pod failing to start",
"status": "resolved",
"solution_applied": "Updated image reference"
}
],
"similar_solutions": [],
"web_sources": []
},
"metadata": {
"request_id": "req_abc123",
"timestamp": 1704067200.0,
"query_time_ms": 3456
}
}
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters",
"details": "issue_description is required"
},
"metadata": {
"request_id": "req_abc123",
"timestamp": 1704067200.0
}
}
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key",
"details": null
},
"metadata": {
"request_id": "req_abc123",
"timestamp": 1704067200.0
}
}
{
"error": {
"code": "QUOTA_EXCEEDED",
"message": "Query quota exceeded. Limit: 50 queries/month, Current: 50",
"details": {
"limit_type": "queries_per_month",
"current": 50,
"limit": 50
}
},
"metadata": {
"request_id": "req_abc123",
"timestamp": 1704067200.0
}
}
{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred",
"details": "Troubleshooting service unavailable"
},
"metadata": {
"request_id": "req_abc123",
"timestamp": 1704067200.0
}
}
{
"error": {
"code": "DATABASE_ERROR",
"message": "Database connection failed",
"details": "MongoDB connection timeout"
},
"metadata": {
"request_id": "req_abc123",
"timestamp": 1704067200.0
}
}
API Reference
Troubleshoot Issue
Diagnose and fix infrastructure/code issues
POST
/
v1
/
troubleshoot
/
issue
Troubleshoot Issue
curl --request POST \
--url https://api.wistx.ai/v1/troubleshoot/issue \
--header 'Content-Type: application/json' \
--data '
{
"issue_description": "<string>",
"infrastructure_type": "<string>",
"cloud_provider": "<string>",
"error_messages": [
{}
],
"configuration_code": "<string>",
"logs": "<string>",
"resource_type": "<string>"
}
'import requests
url = "https://api.wistx.ai/v1/troubleshoot/issue"
payload = {
"issue_description": "<string>",
"infrastructure_type": "<string>",
"cloud_provider": "<string>",
"error_messages": [{}],
"configuration_code": "<string>",
"logs": "<string>",
"resource_type": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
issue_description: '<string>',
infrastructure_type: '<string>',
cloud_provider: '<string>',
error_messages: [{}],
configuration_code: '<string>',
logs: '<string>',
resource_type: '<string>'
})
};
fetch('https://api.wistx.ai/v1/troubleshoot/issue', 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://api.wistx.ai/v1/troubleshoot/issue",
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([
'issue_description' => '<string>',
'infrastructure_type' => '<string>',
'cloud_provider' => '<string>',
'error_messages' => [
[
]
],
'configuration_code' => '<string>',
'logs' => '<string>',
'resource_type' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://api.wistx.ai/v1/troubleshoot/issue"
payload := strings.NewReader("{\n \"issue_description\": \"<string>\",\n \"infrastructure_type\": \"<string>\",\n \"cloud_provider\": \"<string>\",\n \"error_messages\": [\n {}\n ],\n \"configuration_code\": \"<string>\",\n \"logs\": \"<string>\",\n \"resource_type\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.wistx.ai/v1/troubleshoot/issue")
.header("Content-Type", "application/json")
.body("{\n \"issue_description\": \"<string>\",\n \"infrastructure_type\": \"<string>\",\n \"cloud_provider\": \"<string>\",\n \"error_messages\": [\n {}\n ],\n \"configuration_code\": \"<string>\",\n \"logs\": \"<string>\",\n \"resource_type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wistx.ai/v1/troubleshoot/issue")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"issue_description\": \"<string>\",\n \"infrastructure_type\": \"<string>\",\n \"cloud_provider\": \"<string>\",\n \"error_messages\": [\n {}\n ],\n \"configuration_code\": \"<string>\",\n \"logs\": \"<string>\",\n \"resource_type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"incident_id": "inc_abc123",
"diagnosis": {
"root_cause": "Image repository not found or inaccessible",
"confidence": "high",
"issues": [
"Image repository not found or inaccessible",
"Missing image pull secrets",
"Incorrect image tag"
],
"error_patterns": ["ImagePullBackOff", "repository not found"],
"log_analysis": {
"error_count": 2,
"error_lines": ["Error: ImagePullBackOff", "Failed to pull image"]
},
"configuration_issues": [
"Image tag 'latest' is not recommended for production",
"No imagePullSecrets specified"
]
},
"issues": [
"Image repository not found or inaccessible",
"Missing image pull secrets",
"Incorrect image tag"
],
"fixes": [
{
"title": "Fix Image Pull Error",
"description": "Update the image reference to use a valid repository and tag",
"code_example": "apiVersion: v1\nkind: Pod\nspec:\n containers:\n - name: app\n image: myregistry.com/myapp:v1.0.0",
"steps": [
"Verify image exists in registry",
"Update image reference with correct tag",
"Add imagePullSecrets if using private registry"
],
"source": "ai_analysis",
"confidence": "high"
}
],
"prevention": [
"Use specific image tags instead of 'latest'",
"Configure imagePullSecrets for private registries",
"Implement image scanning and validation",
"Use image pull policies appropriately",
"Monitor pod startup failures"
],
"related_knowledge": [
{
"article_id": "kb_123",
"title": "Kubernetes Image Pull Errors",
"summary": "Common causes and solutions for image pull errors..."
}
],
"similar_issues": [],
"similar_incidents": [
{
"incident_id": "inc_xyz789",
"issue_description": "Pod failing to start",
"status": "resolved",
"solution_applied": "Updated image reference"
}
],
"similar_solutions": [],
"web_sources": []
},
"metadata": {
"request_id": "req_abc123",
"timestamp": 1704067200.0,
"query_time_ms": 3456
}
}
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters",
"details": "issue_description is required"
},
"metadata": {
"request_id": "req_abc123",
"timestamp": 1704067200.0
}
}
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key",
"details": null
},
"metadata": {
"request_id": "req_abc123",
"timestamp": 1704067200.0
}
}
{
"error": {
"code": "QUOTA_EXCEEDED",
"message": "Query quota exceeded. Limit: 50 queries/month, Current: 50",
"details": {
"limit_type": "queries_per_month",
"current": 50,
"limit": 50
}
},
"metadata": {
"request_id": "req_abc123",
"timestamp": 1704067200.0
}
}
{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred",
"details": "Troubleshooting service unavailable"
},
"metadata": {
"request_id": "req_abc123",
"timestamp": 1704067200.0
}
}
{
"error": {
"code": "DATABASE_ERROR",
"message": "Database connection failed",
"details": "MongoDB connection timeout"
},
"metadata": {
"request_id": "req_abc123",
"timestamp": 1704067200.0
}
}
Diagnose and fix infrastructure and code issues. Analyzes errors, logs, and code to identify root causes, provides fix recommendations, and prevention strategies.
Endpoint
POST /v1/troubleshoot/issue
Request Body
Request Example
curl --request POST \
--url https://api.wistx.ai/v1/troubleshoot/issue \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"issue_description": "Kubernetes pod failing to start with image pull error",
"infrastructure_type": "kubernetes",
"cloud_provider": "aws",
"error_messages": [
"Error: ImagePullBackOff",
"Failed to pull image: repository not found"
],
"configuration_code": "apiVersion: v1\nkind: Pod\nspec:\n containers:\n - name: app\n image: myapp:latest",
"resource_type": "EKS"
}'
import requests
api_key = "YOUR_API_KEY"
response = requests.post(
"https://api.wistx.ai/v1/troubleshoot/issue",
headers={
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
},
json={
"issue_description": "Kubernetes pod failing to start with image pull error",
"infrastructure_type": "kubernetes",
"cloud_provider": "aws",
"error_messages": [
"Error: ImagePullBackOff",
"Failed to pull image: repository not found"
],
"configuration_code": "apiVersion: v1\nkind: Pod\nspec:\n containers:\n - name: app\n image: myapp:latest",
"resource_type": "EKS"
}
)
print(response.json())
const apiKey = "YOUR_API_KEY";
const response = await fetch("https://api.wistx.ai/v1/troubleshoot/issue", {
method: "POST",
headers: {
"Authorization": `Bearer ${apiKey}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
issue_description: "Kubernetes pod failing to start with image pull error",
infrastructure_type: "kubernetes",
cloud_provider: "aws",
error_messages: [
"Error: ImagePullBackOff",
"Failed to pull image: repository not found"
],
configuration_code: "apiVersion: v1\nkind: Pod\nspec:\n containers:\n - name: app\n image: myapp:latest",
resource_type: "EKS"
})
});
const data = await response.json();
console.log(data);
package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
apiKey := "YOUR_API_KEY"
payload := map[string]interface{}{
"issue_description": "Kubernetes pod failing to start with image pull error",
"infrastructure_type": "kubernetes",
"cloud_provider": "aws",
"error_messages": []string{
"Error: ImagePullBackOff",
"Failed to pull image: repository not found",
},
"configuration_code": "apiVersion: v1\nkind: Pod\nspec:\n containers:\n - name: app\n image: myapp:latest",
"resource_type": "EKS",
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", "https://api.wistx.ai/v1/troubleshoot/issue", bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer "+apiKey)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
}
require 'net/http'
require 'json'
uri = URI('https://api.wistx.ai/v1/troubleshoot/issue')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.path)
request['Authorization'] = "Bearer YOUR_API_KEY"
request['Content-Type'] = 'application/json'
request.body = {
issue_description: "Kubernetes pod failing to start with image pull error",
infrastructure_type: "kubernetes",
cloud_provider: "aws",
error_messages: [
"Error: ImagePullBackOff",
"Failed to pull image: repository not found"
],
configuration_code: "apiVersion: v1\nkind: Pod\nspec:\n containers:\n - name: app\n image: myapp:latest",
resource_type: "EKS"
}.to_json
response = http.request(request)
puts response.body
<?php
$apiKey = "YOUR_API_KEY";
$data = [
"issue_description" => "Kubernetes pod failing to start with image pull error",
"infrastructure_type" => "kubernetes",
"cloud_provider" => "aws",
"error_messages" => [
"Error: ImagePullBackOff",
"Failed to pull image: repository not found"
],
"configuration_code" => "apiVersion: v1\nkind: Pod\nspec:\n containers:\n - name: app\n image: myapp:latest",
"resource_type" => "EKS"
];
$ch = curl_init("https://api.wistx.ai/v1/troubleshoot/issue");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer " . $apiKey,
"Content-Type: application/json"
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
import com.fasterxml.jackson.databind.ObjectMapper;
String apiKey = "YOUR_API_KEY";
Map<String, Object> payload = Map.of(
"issue_description", "Kubernetes pod failing to start with image pull error",
"infrastructure_type", "kubernetes",
"cloud_provider", "aws",
"error_messages", List.of(
"Error: ImagePullBackOff",
"Failed to pull image: repository not found"
),
"configuration_code", "apiVersion: v1\nkind: Pod\nspec:\n containers:\n - name: app\n image: myapp:latest",
"resource_type", "EKS"
);
ObjectMapper mapper = new ObjectMapper();
String json = mapper.writeValueAsString(payload);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.wistx.ai/v1/troubleshoot/issue"))
.header("Authorization", "Bearer " + apiKey)
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpClient client = HttpClient.newHttpClient();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Response Example
{
"data": {
"incident_id": "inc_abc123",
"diagnosis": {
"root_cause": "Image repository not found or inaccessible",
"confidence": "high",
"issues": [
"Image repository not found or inaccessible",
"Missing image pull secrets",
"Incorrect image tag"
],
"error_patterns": ["ImagePullBackOff", "repository not found"],
"log_analysis": {
"error_count": 2,
"error_lines": ["Error: ImagePullBackOff", "Failed to pull image"]
},
"configuration_issues": [
"Image tag 'latest' is not recommended for production",
"No imagePullSecrets specified"
]
},
"issues": [
"Image repository not found or inaccessible",
"Missing image pull secrets",
"Incorrect image tag"
],
"fixes": [
{
"title": "Fix Image Pull Error",
"description": "Update the image reference to use a valid repository and tag",
"code_example": "apiVersion: v1\nkind: Pod\nspec:\n containers:\n - name: app\n image: myregistry.com/myapp:v1.0.0",
"steps": [
"Verify image exists in registry",
"Update image reference with correct tag",
"Add imagePullSecrets if using private registry"
],
"source": "ai_analysis",
"confidence": "high"
}
],
"prevention": [
"Use specific image tags instead of 'latest'",
"Configure imagePullSecrets for private registries",
"Implement image scanning and validation",
"Use image pull policies appropriately",
"Monitor pod startup failures"
],
"related_knowledge": [
{
"article_id": "kb_123",
"title": "Kubernetes Image Pull Errors",
"summary": "Common causes and solutions for image pull errors..."
}
],
"similar_issues": [],
"similar_incidents": [
{
"incident_id": "inc_xyz789",
"issue_description": "Pod failing to start",
"status": "resolved",
"solution_applied": "Updated image reference"
}
],
"similar_solutions": [],
"web_sources": []
},
"metadata": {
"request_id": "req_abc123",
"timestamp": 1704067200.0,
"query_time_ms": 3456
}
}
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters",
"details": "issue_description is required"
},
"metadata": {
"request_id": "req_abc123",
"timestamp": 1704067200.0
}
}
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key",
"details": null
},
"metadata": {
"request_id": "req_abc123",
"timestamp": 1704067200.0
}
}
{
"error": {
"code": "QUOTA_EXCEEDED",
"message": "Query quota exceeded. Limit: 50 queries/month, Current: 50",
"details": {
"limit_type": "queries_per_month",
"current": 50,
"limit": 50
}
},
"metadata": {
"request_id": "req_abc123",
"timestamp": 1704067200.0
}
}
{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred",
"details": "Troubleshooting service unavailable"
},
"metadata": {
"request_id": "req_abc123",
"timestamp": 1704067200.0
}
}
{
"error": {
"code": "DATABASE_ERROR",
"message": "Database connection failed",
"details": "MongoDB connection timeout"
},
"metadata": {
"request_id": "req_abc123",
"timestamp": 1704067200.0
}
}
Rate Limits
| Plan | Queries/Month |
|---|---|
| Professional | 2,000 |
| Team | 10,000 |
| Enterprise | Unlimited |