Criar Squad
curl --request POST \
--url https://api.example.com/squadsimport requests
url = "https://api.example.com/squads"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/squads', 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.example.com/squads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://api.example.com/squads"
req, _ := http.NewRequest("POST", url, nil)
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.example.com/squads")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/squads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyEquipes
Criar Squad
Cria um novo squad no ambiente.
POST
/
squads
Criar Squad
curl --request POST \
--url https://api.example.com/squadsimport requests
url = "https://api.example.com/squads"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/squads', 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.example.com/squads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://api.example.com/squads"
req, _ := http.NewRequest("POST", url, nil)
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.example.com/squads")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/squads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyEndpoint
POST https://gateway.orkeia.ai/squads
AutenticaçãoRequer cabeçalho
authorization: <seu_token>.
Corpo da Requisição (JSON)
O serviço espera um wrapper com a propriedade squad.
{
"squad": {
"name": "Equipe Alpha",
"tasks": [
{
"id": "TASK_INGEST",
"agent": "AGENT_INGEST",
"name": "Ingestão de Dados",
"objective": "Coletar e normalizar dados de origem externa",
"dependsOn": [],
"coordinates": { "x": 80, "y": 40, "width": 320, "height": 160 }
}
],
"order": "sequential",
"enabled": true,
"do_plan": false,
"sectors": ["engineering"],
"publisher": "Orkeia",
"planningAgent": { "id": "AGENT_PLANNER" },
"supervisor": { "id": "AGENT_SUPERVISOR" }
}
}
Campos principais doSquad
Campo Tipo Obrigatório Descrição name string Sim Nome amigável do squad. tasks Task[]Sim Lista de tarefas orquestradas pelo squad. order "sequential"|"hierarchical"Sim Estratégia de execução das tarefas. enabled boolean Sim Ativa/desativa o squad. do_plan boolean Sim Se há etapa de planejamento antes da execução. sectors string[] Sim Setores com permissão para usar o squad. publisher string Sim Publicador/organização responsável. planningAgent { id: string, coordinates? }Não (Opcional) Agente dedicado ao planejamento. supervisor { id: string, coordinates? }Não (Opcional) Agente supervisor/validador.
Exemplo (cURL)
curl -X POST "https://gateway.orkeia.ai/squads" -H "authorization: <seu_token>" -H "Content-Type: application/json" -d '{
"squad": {
"name": "Equipe Alpha",
"tasks": [
{
"id": "TASK_INGEST",
"agent": "AGENT_INGEST",
"name": "Ingestão de Dados",
"objective": "Coletar e normalizar dados de origem externa",
"dependsOn": [],
"coordinates": { "x": 80, "y": 40, "width": 320, "height": 160 }
}
],
"order": "sequential",
"enabled": true,
"do_plan": false,
"sectors": ["engineering"],
"publisher": "Orkeia",
"planningAgent": { "id": "AGENT_PLANNER" },
"supervisor": { "id": "AGENT_SUPERVISOR" }
}
}'
Respostas
Response - Success
response
{
"status": "OK",
"data": { "id": "SQUAD_123456" }
}
500 — Server Error
{
"status": "ERROR",
"code": "server/error",
"data": null
}
400 — Client Error
{
"status": "ERROR",
"code": "client/error",
"data": null
}
Esta página foi útil?
⌘I
