Saltar al contenido principal
GET
/
v1
/
organizations
/
{organization_id}
/
flows
/
{flow_id}
Recuperar un flujo
curl --request GET \
  --url https://api.staging.flxwvdexternal.com/v1/organizations/{organization_id}/flows/{flow_id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.staging.flxwvdexternal.com/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.staging.flxwvdexternal.com/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.staging.flxwvdexternal.com/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.staging.flxwvdexternal.com/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.staging.flxwvdexternal.com/v1/organizations/{organization_id}/flows/{flow_id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.staging.flxwvdexternal.com/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>",
  "version": 123,
  "detection_only": true,
  "cooldown_minutes": 123,
  "enabled": true,
  "target": {
    "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>"
}
}

Autorizaciones

Authorization
string
header
requerido

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Encabezados

Accept-Language
enum<string>
predeterminado:es-ES

Código de idioma para campos de texto que admiten varios idiomas. Al crear o actualizar recursos, esto especifica el idioma de los valores de texto proporcionados. Al recuperar recursos, esto determina qué variante de idioma de los campos de texto multilingües se devuelve. Valores aceptados: 'en-EN' (inglés), 'es-ES' (español), 'pt-BR' (portugués), 'ca-ES' (catalán), 'eu-ES' (euskera). El valor predeterminado es 'es-ES' si no se proporciona.

Opciones disponibles:
en-EN,
es-ES,
pt-BR,
ca-ES,
eu-ES

Parámetros de ruta

organization_id
string
requerido

El identificador único de la organización

Maximum string length: 24
Pattern: ^[0-9a-f]{24}$
flow_id
string
requerido

El identificador único del flujo

Maximum string length: 24
Pattern: ^[0-9a-f]{24}$

Respuesta

Detalles del flujo recuperados correctamente. La respuesta incluye la configuración completa del flujo, condiciones, destinos y métricas de ejecución.

Detalle del flujo tal como lo devuelve GET flow by id. La organización está implícita por la ruta /v1/organizations/{organization_id}/flows/{flow_id}. Los workspaces/grupos de destino se normalizan en target.ids (cadenas hexadecimales de ObjectId de MongoDB).

id
string
requerido
Maximum string length: 24
Pattern: ^[0-9a-f]{24}$
created_at
string<date-time>
requerido
name
string
requerido

Resuelto para Accept-Language cuando es multilingüe

description
string
requerido

Resuelto para Accept-Language cuando es multilingüe

type
enum<string>
requerido
Opciones disponibles:
session,
workspace
version
number
requerido
detection_only
boolean
requerido
cooldown_minutes
number
requerido

Tiempo de espera en minutos

enabled
boolean
requerido
target
object
requerido

Destino de ejecución: type selecciona el alcance; ids enumera valores de _id de Workspace, _id de grupo de Workspace o _id de Grupo de reporte (vacío cuando type es ALL_WORKSPACES)

conditions
object[]

Omitido o vacío cuando el flujo no tiene condiciones

trigger
string | null
microservice_id
string | null

ID del microservicio vinculado cuando está presente

init_text
string | null

Resuelto para Accept-Language cuando es multilingüe

ok_text
string | null

Resuelto para Accept-Language cuando es multilingüe

ko_text
string | null

Resuelto para Accept-Language cuando es multilingüe

execution_metrics
object | null

Presente cuando se calcularon métricas para este flujo