Ejecuciones
Consultar ejecución
Obtén el estado y metadatos de una ejecución específica.
GET
/
workflows
/
{workflowId}
/
runs
/
{runId}
Consultar ejecución
curl --request GET \
--url https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId} \
--header 'x-ib-api-key: <api-key>'import requests
url = "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}"
headers = {"x-ib-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-ib-api-key': '<api-key>'}};
fetch('https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET', headers: {'x-ib-api-key': '<api-key>'}};
fetch('https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}';
const options = {method: 'GET', headers: {'x-ib-api-key': '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}")
.header("x-ib-api-key", "<api-key>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-ib-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-ib-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-ib-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}val client = OkHttpClient()
val request = Request.Builder()
.url("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}")
.get()
.addHeader("x-ib-api-key", "<api-key>")
.build()
val response = client.newCall(request).execute()falseimport Foundation
let url = URL(string: "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["x-ib-api-key": "<api-key>"]
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))$headers=@{}
$headers.Add("x-ib-api-key", "<api-key>")
$response = Invoke-WebRequest -Uri 'https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}' -Method GET -Headers $headers{
"id": "<string>",
"tenantId": "<string>",
"workflowId": "<string>",
"versionId": "<string>",
"status": "queued",
"currentStepIndex": 123,
"context": {},
"createdAt": 123,
"lastUpdatedAt": 123,
"workflowName": "<string>",
"versionNumber": 123,
"triggerEvent": {},
"error": {
"message": "<string>",
"code": "<string>",
"stepIndex": 123
},
"stoppedAtStepIndex": 123,
"stopReason": "<string>",
"startedAt": 123,
"finishedAt": 123
}{
"message": "Invalid API key."
}{
"error": "Workflow not found."
}{
"error": "<string>"
}Consulta una ejecución por ID.
Respuesta exitosa (
La forma de
Los pasos posteriores quedan como
Endpoint
GET /workflows/{workflowId}/runs/{runId}
Ejemplo de solicitud
curl "https://api.insuranceboosters.com/api/v1/workflows/<workflow-id>/runs/<run-id>" \
-H "x-ib-api-key: TU_API_KEY"
Respuesta exitosa (200)
{
"id": "<run-id>",
"workflowId": "<workflow-id>",
"versionId": "<version-id>",
"versionNumber": 1,
"status": "succeeded",
"currentStepIndex": 1,
"context": {},
"triggerEvent": {
"body": {
"referencia": "REC-1001"
},
"headers": {},
"query": {},
"receivedAt": 1720000000000
},
"startedAt": 1720000001000,
"finishedAt": 1720000003000,
"createdAt": 1720000000000,
"lastUpdatedAt": 1720000003000
}
triggerEvent.body depende del evento que inició la automatización. Consulta Triggers para ver la estructura de cada tipo.
Esperar el resultado
La ejecución es asíncrona. Después de recibir unrunId, consulta este endpoint periódicamente hasta que status sea succeeded, failed o cancelled.
Los estados queued y running todavía no son finales. Espera unos segundos antes de volver a consultar.
Diagnosticar una ejecución fallida
Cuandostatus es failed, la respuesta incluye:
{
"status": "failed",
"error": {
"code": "STEP_FAILED",
"message": "Descripción del error",
"stepIndex": 0
}
}
error.stepIndex indica qué paso debes revisar. Usa Listar pasos de una ejecución para consultar su entrada, error, logs y metadata.
En la definición de un paso usas rutas como trigger.body.*. Al inspeccionar el run, esos mismos datos aparecen dentro de triggerEvent.body.
Ejecución detenida por un paso
Cuando un paso JavaScript llamaworkflow.stop(motivo), la ejecución termina con status: "succeeded" y
agrega:
| Campo | Descripción |
|---|---|
stoppedAtStepIndex | Índice del paso que detuvo la automatización. |
stopReason | Motivo enviado a workflow.stop, si existe. |
skipped en
Pasos de la ejecución.
Errores frecuentes
| HTTP | Qué significa | Qué hacer |
|---|---|---|
401 | API key inválida o faltante. | Verifica x-ib-api-key. |
404 | La ejecución no existe. | Confirma runId. |
Path Parameters
Response
Ejecución encontrada.
Was this page helpful?
Consultar ejecución
curl --request GET \
--url https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId} \
--header 'x-ib-api-key: <api-key>'import requests
url = "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}"
headers = {"x-ib-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-ib-api-key': '<api-key>'}};
fetch('https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET', headers: {'x-ib-api-key': '<api-key>'}};
fetch('https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}';
const options = {method: 'GET', headers: {'x-ib-api-key': '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}")
.header("x-ib-api-key", "<api-key>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-ib-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-ib-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-ib-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}val client = OkHttpClient()
val request = Request.Builder()
.url("https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}")
.get()
.addHeader("x-ib-api-key", "<api-key>")
.build()
val response = client.newCall(request).execute()falseimport Foundation
let url = URL(string: "https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["x-ib-api-key": "<api-key>"]
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))$headers=@{}
$headers.Add("x-ib-api-key", "<api-key>")
$response = Invoke-WebRequest -Uri 'https://api.insuranceboosters.com/api/v1/workflows/{workflowId}/runs/{runId}' -Method GET -Headers $headers{
"id": "<string>",
"tenantId": "<string>",
"workflowId": "<string>",
"versionId": "<string>",
"status": "queued",
"currentStepIndex": 123,
"context": {},
"createdAt": 123,
"lastUpdatedAt": 123,
"workflowName": "<string>",
"versionNumber": 123,
"triggerEvent": {},
"error": {
"message": "<string>",
"code": "<string>",
"stepIndex": 123
},
"stoppedAtStepIndex": 123,
"stopReason": "<string>",
"startedAt": 123,
"finishedAt": 123
}{
"message": "Invalid API key."
}{
"error": "Workflow not found."
}{
"error": "<string>"
}
