Recuperar un flux
Recupera informació detallada sobre un flux específic, inclosa la seva configuració, lògica d’execució, condicions, destinacions i mètriques d’execució. Retorna les dades completes del flux en el idioma sol·licitat.
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>"
}
}Autoritzacions
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Capçaleres
Codi de idioma per a camps de text que admeten diversos idiomes. Al crear o actualitzar recursos, això especifica el idioma dels valors de text proporcionats. Al recuperar recursos, això determina quina variant de idioma dels camps de text multilingües es retorna. Valors acceptats: 'en-EN' (anglès), 'es-ES' (espanyol), 'pt-BR' (portuguès), 'ca-ES' (català), 'eu-ES' (euskera). El valor predeterminat és 'es-ES' si no es proporciona.
en-EN, es-ES, pt-BR, ca-ES, eu-ES Paràmetres de ruta
El identificador únic de l'organització
24^[0-9a-f]{24}$L'identificador únic del flux
24^[0-9a-f]{24}$Resposta
Detalls del flux recuperats correctament. La resposta inclou la configuració completa del flux, condicions, destinacions i mètriques d'execució.
Detall del flux tal com el retorna GET flow by id. L'organització està implícita per la ruta /v1/organizations/{organization_id}/flows/{flow_id}. Els workspaces/grups de destinació es normalitzen en target.ids (cadenes hexadecimals de ObjectId de MongoDB).
24^[0-9a-f]{24}$Resol per Accept-Language quan és multilingüe
Resol per Accept-Language quan és multilingüe
session, workspace Temps d'espera en minuts
Destí d'execució: el tipus selecciona l'abast; ids enumera valors de _id de Workspace, _id de grup de Workspace o _id de Grup de reporte (buit quan el tipus és ALL_WORKSPACES)
Show child attributes
Show child attributes
Omitit o buit quan el flux no té condicions
Show child attributes
Show child attributes
ID del microservei vinculat quan està present
Resol per Accept-Language quan és multilingüe
Resol per Accept-Language quan és multilingüe
Resol per Accept-Language quan és multilingüe
Present quan es van calcular mètriques per a aquest flux
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>"
}
}