Restaurar versión anterior
curl --request POST \
--url https://app.famulor.de/api/user/automate/flows/{id}/restoreimport requests
url = "https://app.famulor.de/api/user/automate/flows/{id}/restore"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://app.famulor.de/api/user/automate/flows/{id}/restore', 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://app.famulor.de/api/user/automate/flows/{id}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://app.famulor.de/api/user/automate/flows/{id}/restore"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.famulor.de/api/user/automate/flows/{id}/restore")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.famulor.de/api/user/automate/flows/{id}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"automation_id": "f4EaLhOW2zoEsXXSOJP2r",
"name": "Order lookup",
"status": "enabled",
"restored_version_id": "8auMJQtqBnE1X8ZP7WVnI",
"note": "Rolled back to the previous published version and re-published it live."
}
{
"message": "There is no earlier version of this automation to roll back to.",
"error": "no_previous_version"
}
{
"message": "Automation not found, or it does not belong to your account.",
"error": "not_found"
}
Automatizaciones
Restaurar versión anterior
Revierte una automatización de Famulor a su versión publicada anterior.
POST
/
api
/
user
/
automate
/
flows
/
{id}
/
restore
Restaurar versión anterior
curl --request POST \
--url https://app.famulor.de/api/user/automate/flows/{id}/restoreimport requests
url = "https://app.famulor.de/api/user/automate/flows/{id}/restore"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://app.famulor.de/api/user/automate/flows/{id}/restore', 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://app.famulor.de/api/user/automate/flows/{id}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://app.famulor.de/api/user/automate/flows/{id}/restore"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.famulor.de/api/user/automate/flows/{id}/restore")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.famulor.de/api/user/automate/flows/{id}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"automation_id": "f4EaLhOW2zoEsXXSOJP2r",
"name": "Order lookup",
"status": "enabled",
"restored_version_id": "8auMJQtqBnE1X8ZP7WVnI",
"note": "Rolled back to the previous published version and re-published it live."
}
{
"message": "There is no earlier version of this automation to roll back to.",
"error": "no_previous_version"
}
{
"message": "Automation not found, or it does not belong to your account.",
"error": "not_found"
}
API de Famulor 1.0 (legado). Esta página se aplica únicamente a Famulor 1.0 (
app.famulor.de) y se conserva por compatibilidad. Para la plataforma actual, usa la referencia de la API de Famulor 2.0.Parámetros de ruta
string
requerido
El ID de la automatización (de Listar automatizaciones)
Respuesta
string
El ID de la automatización
string
El nombre de la automatización tras la restauración
string
enabled o disabled — se conserva el estado de activación que tenía la automatización antes de la restauraciónstring
El ID de la versión que ahora está activa
string
Confirmación de que la versión anterior se restauró y se volvió a publicar
404.
Códigos de error (422)
| error | Significado |
|---|---|
no_previous_version | No existe una versión anterior de esta automatización a la que revertir. |
rollback_failed | No se pudo restaurar la versión anterior — no cambió nada. |
publish_failed | La versión anterior se restauró como borrador pero no se pudo publicar, por lo que todavía no está activa — publícala en la app de Famulor o vuelve a intentarlo. |
{
"automation_id": "f4EaLhOW2zoEsXXSOJP2r",
"name": "Order lookup",
"status": "enabled",
"restored_version_id": "8auMJQtqBnE1X8ZP7WVnI",
"note": "Rolled back to the previous published version and re-published it live."
}
{
"message": "There is no earlier version of this automation to roll back to.",
"error": "no_previous_version"
}
{
"message": "Automation not found, or it does not belong to your account.",
"error": "not_found"
}
Páginas relacionadas: Actualizar automatización, Obtener automatización, y Autenticación.