Restaurer la version précédente
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"
}
Automatisations
Restaurer la version précédente
Revient à la version précédemment publiée d’une automatisation Famulor.
POST
/
api
/
user
/
automate
/
flows
/
{id}
/
restore
Restaurer la version précédente
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 Famulor 1.0 (héritée). Cette page concerne uniquement Famulor 1.0 (
app.famulor.de) et est conservée pour la compatibilité. Pour la plateforme actuelle, consultez la référence API Famulor 2.0.Paramètres de chemin
string
requis
L’ID de l’automatisation (voir Lister les automatisations)
Réponse
string
L’ID de l’automatisation
string
Le nom de l’automatisation après la restauration
string
enabled ou disabled — l’état d’activation de l’automatisation avant la restauration est conservéstring
L’ID de la version désormais active
string
Confirmation que la version précédente a été restaurée et republiée
404.
Codes d’erreur (422)
| error | Signification |
|---|---|
no_previous_version | Il n’existe aucune version antérieure de cette automatisation vers laquelle revenir. |
rollback_failed | La version précédente n’a pas pu être restaurée — rien n’a changé. |
publish_failed | La version précédente a été restaurée comme brouillon mais n’a pas pu être publiée, elle n’est donc pas encore active — publiez-la dans l’application Famulor ou réessayez. |
{
"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"
}
Pages associées : Mettre à jour une automatisation, Obtenir une automatisation et Authentification.