Recuperar um fluxo
Recupera informações detalhadas sobre um fluxo específico, incluindo configuração, lógica de execução, condições, destinos e métricas de execução. Retorna os dados completos do fluxo no idioma solicitado.
curl --request GET \
--url https://api.flexxible.net/v1/organizations/{organization_id}/flows/{flow_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flexxible.net/v1/organizations/{organization_id}/flows/{flow_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.flexxible.net/v1/organizations/{organization_id}/flows/{flow_id}', 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.flexxible.net/v1/organizations/{organization_id}/flows/{flow_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://api.flexxible.net/v1/organizations/{organization_id}/flows/{flow_id}"
req, _ := http.NewRequest("GET", 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.get("https://api.flexxible.net/v1/organizations/{organization_id}/flows/{flow_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexxible.net/v1/organizations/{organization_id}/flows/{flow_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>",
"type": "session",
"version": 123,
"detection_only": true,
"cooldown_minutes": 123,
"enabled": true,
"target": {
"type": "all_workspaces",
"ids": [
"<string>"
]
},
"conditions": [
{
"condition_type_id": "<string>",
"metric": "<string>",
"operator": "<string>",
"compare_to": "<string>",
"check_every": 123,
"period": 123
}
],
"trigger": "<string>",
"microservice_id": "<string>",
"init_text": "<string>",
"ok_text": "<string>",
"ko_text": "<string>",
"execution_metrics": {
"targeted_workspaces": 123,
"evaluations_per_day": 123,
"possible_executions_per_day": 123,
"total_possible_executions_per_day": 123
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}Autorizações
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Cabeçalhos
Código de idioma para campos de texto que suportam vários idiomas. Ao criar ou atualizar recursos, isso especifica o idioma dos valores de texto fornecidos. Ao recuperar recursos, isso determina qual variante de idioma dos campos de texto multilíngues será retornada. Valores aceitos: 'en-EN' (inglês), 'es-ES' (espanhol), 'pt-BR' (português), 'ca-ES' (catalão), 'eu-ES' (basco). O valor padrão é 'es-ES' se não for fornecido.
en-EN, es-ES, pt-BR, ca-ES, eu-ES Parâmetros de caminho
O identificador único da organização
24^[0-9a-f]{24}$O identificador único do fluxo
24^[0-9a-f]{24}$Resposta
Detalhes do fluxo recuperados com sucesso. A resposta inclui a configuração completa do fluxo, condições, destinos e métricas de execução.
Detalhe do fluxo como retornado por GET flow por id. A organização é implícita pelo caminho /v1/organizations/{organization_id}/flows/{flow_id}. Os workspaces/grupos alvo são normalizados em target.ids (cadenas hexadecimais de ObjectId de MongoDB).
24^[0-9a-f]{24}$Resolvido para Accept-Language quando é multilíngue
Resolvido para Accept-Language quando é multilíngue
session, workspace Tempo de espera em minutos
Destino de execução: type seleciona o escopo; ids lista valores de _id de Workspace, _id de grupo de Workspace ou _id de Grupo de relatório (vazio quando type é ALL_WORKSPACES)
Show child attributes
Show child attributes
Omitido ou vazio quando o fluxo não tem condições
Show child attributes
Show child attributes
ID do microserviço vinculado quando presente
Resolvido para Accept-Language quando é multilíngue
Resolvido para Accept-Language quando é multilíngue
Resolvido para Accept-Language quando é multilíngue
Presente quando métricas foram calculadas para este fluxo
Show child attributes
Show child attributes
curl --request GET \
--url https://api.flexxible.net/v1/organizations/{organization_id}/flows/{flow_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flexxible.net/v1/organizations/{organization_id}/flows/{flow_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.flexxible.net/v1/organizations/{organization_id}/flows/{flow_id}', 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.flexxible.net/v1/organizations/{organization_id}/flows/{flow_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://api.flexxible.net/v1/organizations/{organization_id}/flows/{flow_id}"
req, _ := http.NewRequest("GET", 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.get("https://api.flexxible.net/v1/organizations/{organization_id}/flows/{flow_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexxible.net/v1/organizations/{organization_id}/flows/{flow_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>",
"type": "session",
"version": 123,
"detection_only": true,
"cooldown_minutes": 123,
"enabled": true,
"target": {
"type": "all_workspaces",
"ids": [
"<string>"
]
},
"conditions": [
{
"condition_type_id": "<string>",
"metric": "<string>",
"operator": "<string>",
"compare_to": "<string>",
"check_every": 123,
"period": 123
}
],
"trigger": "<string>",
"microservice_id": "<string>",
"init_text": "<string>",
"ok_text": "<string>",
"ko_text": "<string>",
"execution_metrics": {
"targeted_workspaces": 123,
"evaluations_per_day": 123,
"possible_executions_per_day": 123,
"total_possible_executions_per_day": 123
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}