Manage Infrastructure
curl --request POST \
--url https://api.wistx.ai/v1/infrastructure/manage \
--header 'Content-Type: application/json' \
--data '
{
"action": "<string>",
"infrastructure_type": "<string>",
"resource_name": "<string>",
"cloud_provider": [
"<string>"
],
"configuration": {},
"compliance_standards": [
"<string>"
],
"current_version": "<string>",
"target_version": "<string>",
"backup_type": "<string>"
}
'import requests
url = "https://api.wistx.ai/v1/infrastructure/manage"
payload = {
"action": "<string>",
"infrastructure_type": "<string>",
"resource_name": "<string>",
"cloud_provider": ["<string>"],
"configuration": {},
"compliance_standards": ["<string>"],
"current_version": "<string>",
"target_version": "<string>",
"backup_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({
action: '<string>',
infrastructure_type: '<string>',
resource_name: '<string>',
cloud_provider: ['<string>'],
configuration: {},
compliance_standards: ['<string>'],
current_version: '<string>',
target_version: '<string>',
backup_type: '<string>'
})
};
fetch('https://api.wistx.ai/v1/infrastructure/manage', 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/infrastructure/manage",
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([
'action' => '<string>',
'infrastructure_type' => '<string>',
'resource_name' => '<string>',
'cloud_provider' => [
'<string>'
],
'configuration' => [
],
'compliance_standards' => [
'<string>'
],
'current_version' => '<string>',
'target_version' => '<string>',
'backup_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/infrastructure/manage"
payload := strings.NewReader("{\n \"action\": \"<string>\",\n \"infrastructure_type\": \"<string>\",\n \"resource_name\": \"<string>\",\n \"cloud_provider\": [\n \"<string>\"\n ],\n \"configuration\": {},\n \"compliance_standards\": [\n \"<string>\"\n ],\n \"current_version\": \"<string>\",\n \"target_version\": \"<string>\",\n \"backup_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/infrastructure/manage")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"<string>\",\n \"infrastructure_type\": \"<string>\",\n \"resource_name\": \"<string>\",\n \"cloud_provider\": [\n \"<string>\"\n ],\n \"configuration\": {},\n \"compliance_standards\": [\n \"<string>\"\n ],\n \"current_version\": \"<string>\",\n \"target_version\": \"<string>\",\n \"backup_type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wistx.ai/v1/infrastructure/manage")
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 \"action\": \"<string>\",\n \"infrastructure_type\": \"<string>\",\n \"resource_name\": \"<string>\",\n \"cloud_provider\": [\n \"<string>\"\n ],\n \"configuration\": {},\n \"compliance_standards\": [\n \"<string>\"\n ],\n \"current_version\": \"<string>\",\n \"target_version\": \"<string>\",\n \"backup_type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"resource_id": "infra_abc123",
"status": "created",
"endpoints": [
"https://production-cluster.example.com"
],
"compliance_status": {
"PCI-DSS": {
"status": "compliant",
"controls_passed": 45,
"controls_total": 45
}
},
"cost_summary": {
"monthly_estimate": 500.0,
"annual_estimate": 6000.0
},
"recommendations": [
"Enable auto-scaling for cost optimization",
"Use reserved instances for predictable workloads"
],
"action_performed": "create"
},
"metadata": {
"request_id": "req_123",
"timestamp": 1234567890.123,
"query_time_ms": 1500
}
}
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters",
"details": "action, infrastructure_type, and resource_name are required"
},
"metadata": {
"request_id": "req_123",
"timestamp": 1234567890.123
}
}
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or expired token"
},
"metadata": {
"request_id": "req_123",
"timestamp": 1234567890.123
}
}
{
"error": {
"code": "QUOTA_EXCEEDED",
"message": "Query quota exceeded",
"details": {
"limit_type": "queries_per_month",
"current": 1000,
"limit": 1000
}
},
"metadata": {
"request_id": "req_123",
"timestamp": 1234567890.123
}
}
{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
},
"metadata": {
"request_id": "req_123",
"timestamp": 1234567890.123
}
}
{
"error": {
"code": "DATABASE_ERROR",
"message": "Database connection failed"
},
"metadata": {
"request_id": "req_123",
"timestamp": 1234567890.123
}
}
Infrastructure
Manage Infrastructure
Manage infrastructure lifecycle (create, update, upgrade, backup, restore, monitor, optimize)
POST
/
v1
/
infrastructure
/
manage
Manage Infrastructure
curl --request POST \
--url https://api.wistx.ai/v1/infrastructure/manage \
--header 'Content-Type: application/json' \
--data '
{
"action": "<string>",
"infrastructure_type": "<string>",
"resource_name": "<string>",
"cloud_provider": [
"<string>"
],
"configuration": {},
"compliance_standards": [
"<string>"
],
"current_version": "<string>",
"target_version": "<string>",
"backup_type": "<string>"
}
'import requests
url = "https://api.wistx.ai/v1/infrastructure/manage"
payload = {
"action": "<string>",
"infrastructure_type": "<string>",
"resource_name": "<string>",
"cloud_provider": ["<string>"],
"configuration": {},
"compliance_standards": ["<string>"],
"current_version": "<string>",
"target_version": "<string>",
"backup_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({
action: '<string>',
infrastructure_type: '<string>',
resource_name: '<string>',
cloud_provider: ['<string>'],
configuration: {},
compliance_standards: ['<string>'],
current_version: '<string>',
target_version: '<string>',
backup_type: '<string>'
})
};
fetch('https://api.wistx.ai/v1/infrastructure/manage', 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/infrastructure/manage",
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([
'action' => '<string>',
'infrastructure_type' => '<string>',
'resource_name' => '<string>',
'cloud_provider' => [
'<string>'
],
'configuration' => [
],
'compliance_standards' => [
'<string>'
],
'current_version' => '<string>',
'target_version' => '<string>',
'backup_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/infrastructure/manage"
payload := strings.NewReader("{\n \"action\": \"<string>\",\n \"infrastructure_type\": \"<string>\",\n \"resource_name\": \"<string>\",\n \"cloud_provider\": [\n \"<string>\"\n ],\n \"configuration\": {},\n \"compliance_standards\": [\n \"<string>\"\n ],\n \"current_version\": \"<string>\",\n \"target_version\": \"<string>\",\n \"backup_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/infrastructure/manage")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"<string>\",\n \"infrastructure_type\": \"<string>\",\n \"resource_name\": \"<string>\",\n \"cloud_provider\": [\n \"<string>\"\n ],\n \"configuration\": {},\n \"compliance_standards\": [\n \"<string>\"\n ],\n \"current_version\": \"<string>\",\n \"target_version\": \"<string>\",\n \"backup_type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wistx.ai/v1/infrastructure/manage")
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 \"action\": \"<string>\",\n \"infrastructure_type\": \"<string>\",\n \"resource_name\": \"<string>\",\n \"cloud_provider\": [\n \"<string>\"\n ],\n \"configuration\": {},\n \"compliance_standards\": [\n \"<string>\"\n ],\n \"current_version\": \"<string>\",\n \"target_version\": \"<string>\",\n \"backup_type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"resource_id": "infra_abc123",
"status": "created",
"endpoints": [
"https://production-cluster.example.com"
],
"compliance_status": {
"PCI-DSS": {
"status": "compliant",
"controls_passed": 45,
"controls_total": 45
}
},
"cost_summary": {
"monthly_estimate": 500.0,
"annual_estimate": 6000.0
},
"recommendations": [
"Enable auto-scaling for cost optimization",
"Use reserved instances for predictable workloads"
],
"action_performed": "create"
},
"metadata": {
"request_id": "req_123",
"timestamp": 1234567890.123,
"query_time_ms": 1500
}
}
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters",
"details": "action, infrastructure_type, and resource_name are required"
},
"metadata": {
"request_id": "req_123",
"timestamp": 1234567890.123
}
}
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or expired token"
},
"metadata": {
"request_id": "req_123",
"timestamp": 1234567890.123
}
}
{
"error": {
"code": "QUOTA_EXCEEDED",
"message": "Query quota exceeded",
"details": {
"limit_type": "queries_per_month",
"current": 1000,
"limit": 1000
}
},
"metadata": {
"request_id": "req_123",
"timestamp": 1234567890.123
}
}
{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
},
"metadata": {
"request_id": "req_123",
"timestamp": 1234567890.123
}
}
{
"error": {
"code": "DATABASE_ERROR",
"message": "Database connection failed"
},
"metadata": {
"request_id": "req_123",
"timestamp": 1234567890.123
}
}
Manage infrastructure lifecycle operations including create, update, upgrade, backup, restore, monitor, and optimize.
string
required
Action to perform:
create, update, upgrade, backup, restore, monitor, optimizestring
required
Type of infrastructure:
kubernetes, multi_cloud, hybrid_cloudstring
required
Name of the resource/cluster
string | string[]
Cloud provider(s) - single string or array for multi-cloud
object
Infrastructure configuration dictionary
string[]
Compliance standards to enforce
string
Current version (required for upgrade action)
string
Target version (required for upgrade action)
string
default:"full"
Type of backup:
full, incremental (for backup action)Request Example
curl -X POST "https://api.wistx.ai/v1/infrastructure/manage" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"action": "create",
"infrastructure_type": "kubernetes",
"resource_name": "production-cluster",
"cloud_provider": "aws",
"configuration": {
"node_count": 3,
"instance_type": "m5.large"
},
"compliance_standards": ["PCI-DSS"]
}'
import requests
url = "https://api.wistx.ai/v1/infrastructure/manage"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"action": "create",
"infrastructure_type": "kubernetes",
"resource_name": "production-cluster",
"cloud_provider": "aws",
"configuration": {
"node_count": 3,
"instance_type": "m5.large"
},
"compliance_standards": ["PCI-DSS"]
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const response = await fetch("https://api.wistx.ai/v1/infrastructure/manage", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
action: "create",
infrastructure_type: "kubernetes",
resource_name: "production-cluster",
cloud_provider: "aws",
configuration: {
node_count: 3,
instance_type: "m5.large"
},
compliance_standards: ["PCI-DSS"]
})
});
const data = await response.json();
console.log(data);
package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
url := "https://api.wistx.ai/v1/infrastructure/manage"
data := map[string]interface{}{
"action": "create",
"infrastructure_type": "kubernetes",
"resource_name": "production-cluster",
"cloud_provider": "aws",
"configuration": map[string]interface{}{
"node_count": 3,
"instance_type": "m5.large",
},
"compliance_standards": []string{"PCI-DSS"},
}
jsonData, _ := json.Marshal(data)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
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/infrastructure/manage')
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 = {
action: "create",
infrastructure_type: "kubernetes",
resource_name: "production-cluster",
cloud_provider: "aws",
configuration: {
node_count: 3,
instance_type: "m5.large"
},
compliance_standards: ["PCI-DSS"]
}.to_json
response = http.request(request)
puts response.body
<?php
$url = "https://api.wistx.ai/v1/infrastructure/manage";
$data = [
"action" => "create",
"infrastructure_type" => "kubernetes",
"resource_name" => "production-cluster",
"cloud_provider" => "aws",
"configuration" => [
"node_count" => 3,
"instance_type" => "m5.large"
],
"compliance_standards" => ["PCI-DSS"]
];
$ch = curl_init($url);
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 YOUR_API_KEY",
"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 java.nio.charset.StandardCharsets;
HttpClient client = HttpClient.newHttpClient();
String json = "{\"action\":\"create\",\"infrastructure_type\":\"kubernetes\",\"resource_name\":\"production-cluster\",\"cloud_provider\":\"aws\",\"configuration\":{\"node_count\":3,\"instance_type\":\"m5.large\"},\"compliance_standards\":[\"PCI-DSS\"]}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.wistx.ai/v1/infrastructure/manage"))
.header("Authorization", "Bearer YOUR_API_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Response Example
{
"data": {
"resource_id": "infra_abc123",
"status": "created",
"endpoints": [
"https://production-cluster.example.com"
],
"compliance_status": {
"PCI-DSS": {
"status": "compliant",
"controls_passed": 45,
"controls_total": 45
}
},
"cost_summary": {
"monthly_estimate": 500.0,
"annual_estimate": 6000.0
},
"recommendations": [
"Enable auto-scaling for cost optimization",
"Use reserved instances for predictable workloads"
],
"action_performed": "create"
},
"metadata": {
"request_id": "req_123",
"timestamp": 1234567890.123,
"query_time_ms": 1500
}
}
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters",
"details": "action, infrastructure_type, and resource_name are required"
},
"metadata": {
"request_id": "req_123",
"timestamp": 1234567890.123
}
}
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or expired token"
},
"metadata": {
"request_id": "req_123",
"timestamp": 1234567890.123
}
}
{
"error": {
"code": "QUOTA_EXCEEDED",
"message": "Query quota exceeded",
"details": {
"limit_type": "queries_per_month",
"current": 1000,
"limit": 1000
}
},
"metadata": {
"request_id": "req_123",
"timestamp": 1234567890.123
}
}
{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
},
"metadata": {
"request_id": "req_123",
"timestamp": 1234567890.123
}
}
{
"error": {
"code": "DATABASE_ERROR",
"message": "Database connection failed"
},
"metadata": {
"request_id": "req_123",
"timestamp": 1234567890.123
}
}
Rate Limits
- Professional: 2,000 queries/month
- Team: 10,000 queries/month
- Enterprise: Unlimited queries/month