Validate Profile
curl --request POST \
--url https://agentgate.mynewapi.com/api/v1/profiles/{name}/validate \
--header 'Authorization: Bearer <token>'import requests
url = "https://agentgate.mynewapi.com/api/v1/profiles/{name}/validate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agentgate.mynewapi.com/api/v1/profiles/{name}/validate', 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://agentgate.mynewapi.com/api/v1/profiles/{name}/validate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://agentgate.mynewapi.com/api/v1/profiles/{name}/validate"
req, _ := http.NewRequest("POST", 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.post("https://agentgate.mynewapi.com/api/v1/profiles/{name}/validate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agentgate.mynewapi.com/api/v1/profiles/{name}/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"valid": true,
"errors": [
{
"path": "<string>",
"message": "<string>"
}
],
"warnings": [
{
"path": "<string>",
"message": "<string>"
}
],
"resolved": {}
}
}Profiles
Validate Profile
Validate a profile configuration
POST
/
api
/
v1
/
profiles
/
{name}
/
validate
Validate Profile
curl --request POST \
--url https://agentgate.mynewapi.com/api/v1/profiles/{name}/validate \
--header 'Authorization: Bearer <token>'import requests
url = "https://agentgate.mynewapi.com/api/v1/profiles/{name}/validate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agentgate.mynewapi.com/api/v1/profiles/{name}/validate', 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://agentgate.mynewapi.com/api/v1/profiles/{name}/validate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://agentgate.mynewapi.com/api/v1/profiles/{name}/validate"
req, _ := http.NewRequest("POST", 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.post("https://agentgate.mynewapi.com/api/v1/profiles/{name}/validate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agentgate.mynewapi.com/api/v1/profiles/{name}/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"valid": true,
"errors": [
{
"path": "<string>",
"message": "<string>"
}
],
"warnings": [
{
"path": "<string>",
"message": "<string>"
}
],
"resolved": {}
}
}Validate Profile
Validates a profile configuration, checking for errors like circular inheritance and missing parent profiles.Request
string
required
The profile name to validate
curl -X POST https://agentgate.mynewapi.com/api/v1/profiles/my-profile/validate \
-H "Authorization: Bearer YOUR_API_KEY"
Response
boolean
required
Indicates if the request was successful
object
required
Validation result
Show properties
Show properties
boolean
required
Whether the profile is valid
array
required
object
Resolved profile detail (if validation passed)
Example Response
Valid Profile
{
"success": true,
"data": {
"valid": true,
"errors": [],
"warnings": [],
"resolved": {
"name": "my-profile",
"description": "My custom profile",
"extends": "default",
"isBuiltIn": false,
"loopStrategy": { "type": "hybrid" },
"resolved": {
"inheritanceChain": ["default", "my-profile"],
"configHash": "sha256:abc123..."
}
}
},
"requestId": "req_abc123"
}
Invalid Profile
{
"success": true,
"data": {
"valid": false,
"errors": [
{
"path": "extends",
"message": "Circular inheritance detected: my-profile -> parent-profile -> my-profile"
}
],
"warnings": []
},
"requestId": "req_abc123"
}
Profile with Warnings
{
"success": true,
"data": {
"valid": true,
"errors": [],
"warnings": [
{
"path": "extends",
"message": "Parent profile 'deprecated-profile' is deprecated"
}
],
"resolved": {
"name": "my-profile",
"resolved": {
"inheritanceChain": ["deprecated-profile", "my-profile"],
"configHash": "sha256:def456..."
}
}
},
"requestId": "req_abc123"
}
Validation Checks
| Check | Description |
|---|---|
| Self-extension | Profile cannot extend itself |
| Circular inheritance | No cycles in inheritance chain |
| Missing parent | Parent profiles must exist |
| Schema validation | Configuration must match schema |