Criar Nova Versão do Agente
curl --request POST \
--url https://api.example.com/agents/{id}/version-controlimport requests
url = "https://api.example.com/agents/{id}/version-control"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/agents/{id}/version-control', 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/agents/{id}/version-control",
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/agents/{id}/version-control"
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/agents/{id}/version-control")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/agents/{id}/version-control")
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_bodyAgentes
Criar Nova Versão do Agente
Cria uma nova versão para um agente.
POST
/
agents
/
{id}
/
version-control
Criar Nova Versão do Agente
curl --request POST \
--url https://api.example.com/agents/{id}/version-controlimport requests
url = "https://api.example.com/agents/{id}/version-control"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/agents/{id}/version-control', 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/agents/{id}/version-control",
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/agents/{id}/version-control"
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/agents/{id}/version-control")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/agents/{id}/version-control")
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/agents/{id}/version-control
Cabeçalhos
authorization: <seu_token>
Content-Type: application/json
Parâmetros de caminho
{
"id": "ID do agente (obrigatório)"
}
Request body
| Campo | tipo | Opcional | Descrição | Exemplo |
|---|---|---|---|---|
| responsible | string | Não | Responsável pela versão | ”Orkeia-dev-team” |
| responsibleId | string | Não | id do responsável | ”12345abc” |
| action | string | Não | o que foi feito | ”Criado novo agente” |
| type | success/ fail/ neutral | Não | classifica o resultado da ação | Success |
| date | Date | Não | data do evento (padrão ISO 8601) | “2025-08-22T18:32:45.000Z” |
| versionControl | string | Sim | nome da versão | 1.0.0 |
{
"notes": "Descrição das mudanças nesta versão."
}
Exemplo (cURL)
curl -X POST "https://gateway.orkeia.ai/agents/agent123/version-control" \
-H "authorization: <seu_token>" \
-H "Content-Type: application/json" \
-d '{ "notes": "Descrição das mudanças nesta versão."}'
Resposta
{
"version": 3,
"timestamp": "2024-07-20T10:00:00Z"
}
Esta página foi útil?
⌘I
