Atualizar Status da Investigação
curl --request PATCH \
--url http://api.gu1.ai/intelligence/investigations/{id}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "<string>",
"closureReason": "<string>"
}
'import requests
url = "http://api.gu1.ai/intelligence/investigations/{id}/status"
payload = {
"status": "<string>",
"closureReason": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: '<string>', closureReason: '<string>'})
};
fetch('http://api.gu1.ai/intelligence/investigations/{id}/status', 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 => "http://api.gu1.ai/intelligence/investigations/{id}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => '<string>',
'closureReason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "http://api.gu1.ai/intelligence/investigations/{id}/status"
payload := strings.NewReader("{\n \"status\": \"<string>\",\n \"closureReason\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("http://api.gu1.ai/intelligence/investigations/{id}/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"<string>\",\n \"closureReason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/intelligence/investigations/{id}/status")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"<string>\",\n \"closureReason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyReferência API
Atualizar Status da Investigação
Altera o status de uma investigação no fluxo de gestão de casos gu1 — atualiza para aberta, em andamento, escalada ou encerrada com trilha de auditoria.
PATCH
/
intelligence
/
investigations
/
{id}
/
status
Atualizar Status da Investigação
curl --request PATCH \
--url http://api.gu1.ai/intelligence/investigations/{id}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "<string>",
"closureReason": "<string>"
}
'import requests
url = "http://api.gu1.ai/intelligence/investigations/{id}/status"
payload = {
"status": "<string>",
"closureReason": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: '<string>', closureReason: '<string>'})
};
fetch('http://api.gu1.ai/intelligence/investigations/{id}/status', 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 => "http://api.gu1.ai/intelligence/investigations/{id}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => '<string>',
'closureReason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "http://api.gu1.ai/intelligence/investigations/{id}/status"
payload := strings.NewReader("{\n \"status\": \"<string>\",\n \"closureReason\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("http://api.gu1.ai/intelligence/investigations/{id}/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"<string>\",\n \"closureReason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/intelligence/investigations/{id}/status")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"<string>\",\n \"closureReason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyVisão Geral
Atualiza o status de uma investigação.Parâmetros de Rota
string
required
ID da Investigação
Corpo da Requisição
string
required
Novo status: OPEN, IN_PROGRESS, PENDING_REVIEW, CLOSED
string
Necessário se o status for CLOSED
Exemplo
curl -X PATCH http://api.gu1.ai/intelligence/investigations/inv-123/status \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "CLOSED",
"closureReason": "Nenhum risco identificado - falso positivo"
}'
Resposta
{
"success": true,
"investigationId": "inv-123",
"status": "CLOSED",
"message": "Status da investigação atualizado para CLOSED"
}
Was this page helpful?
⌘I