from retab import Retab
client = Retab()
workflow = client.workflows.create_version_restore(
workflow_version_id="wfv_abc123",
workflow_id="wf_abc123",
)
print(workflow)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const workflow = await client.workflows.create_version_restore("wfv_abc123", {
workflowId: "wf_abc123",
});
console.log(workflow);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
workflow, err := client.Workflows.CreateVersionRestore(ctx, "wfv_abc123", &retab.WorkflowsCreateVersionRestoreParams{
WorkflowID: "wf_abc123",
})
if err != nil {
log.Fatal(err)
}
fmt.Println(*workflow)
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
workflow = client.workflows.create_version_restore(
workflow_version_id: 'wfv_abc123',
workflow_id: 'wf_abc123',
)
puts workflow
use retab::Retab;
use retab::resources::workflows::CreateVersionRestoreParams;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let workflow = client
.workflows()
.create_version_restore("wfv_abc123", CreateVersionRestoreParams::new("wf_abc123"))
.await?;
println!("{:?}", workflow);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$workflow = $client->workflows()->createVersionRestore(
workflowVersionId: 'wfv_abc123',
workflowId: 'wf_abc123',
);
print_r($workflow);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var workflow = await client.Workflows.CreateVersionRestoreAsync("wfv_abc123", new WorkflowsCreateVersionRestoreOptions
{
WorkflowId = "wf_abc123",
});
Console.WriteLine(workflow);
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var workflow = client.workflows().createVersionRestore("wfv_abc123", "wf_abc123");
System.out.println(workflow);
}
}
curl -X POST "https://api.retab.com/v1/workflows/versions/wfv_abc123/restore?workflow_id=wf_abc123" \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "Untitled Workflow",
"description": "",
"project_id": "<string>",
"published": {
"version_id": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"description": ""
}
}{
"detail": []
}Versions
Restore Workflow Version
POST
/
v1
/
workflows
/
versions
/
{workflow_version_id}
/
restore
from retab import Retab
client = Retab()
workflow = client.workflows.create_version_restore(
workflow_version_id="wfv_abc123",
workflow_id="wf_abc123",
)
print(workflow)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const workflow = await client.workflows.create_version_restore("wfv_abc123", {
workflowId: "wf_abc123",
});
console.log(workflow);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
workflow, err := client.Workflows.CreateVersionRestore(ctx, "wfv_abc123", &retab.WorkflowsCreateVersionRestoreParams{
WorkflowID: "wf_abc123",
})
if err != nil {
log.Fatal(err)
}
fmt.Println(*workflow)
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
workflow = client.workflows.create_version_restore(
workflow_version_id: 'wfv_abc123',
workflow_id: 'wf_abc123',
)
puts workflow
use retab::Retab;
use retab::resources::workflows::CreateVersionRestoreParams;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let workflow = client
.workflows()
.create_version_restore("wfv_abc123", CreateVersionRestoreParams::new("wf_abc123"))
.await?;
println!("{:?}", workflow);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$workflow = $client->workflows()->createVersionRestore(
workflowVersionId: 'wfv_abc123',
workflowId: 'wf_abc123',
);
print_r($workflow);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var workflow = await client.Workflows.CreateVersionRestoreAsync("wfv_abc123", new WorkflowsCreateVersionRestoreOptions
{
WorkflowId = "wf_abc123",
});
Console.WriteLine(workflow);
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var workflow = client.workflows().createVersionRestore("wfv_abc123", "wf_abc123");
System.out.println(workflow);
}
}
curl -X POST "https://api.retab.com/v1/workflows/versions/wfv_abc123/restore?workflow_id=wf_abc123" \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "Untitled Workflow",
"description": "",
"project_id": "<string>",
"published": {
"version_id": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"description": ""
}
}{
"detail": []
}Restore a workflow graph version into a new workflow draft.
from retab import Retab
client = Retab()
workflow = client.workflows.create_version_restore(
workflow_version_id="wfv_abc123",
workflow_id="wf_abc123",
)
print(workflow)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const workflow = await client.workflows.create_version_restore("wfv_abc123", {
workflowId: "wf_abc123",
});
console.log(workflow);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
workflow, err := client.Workflows.CreateVersionRestore(ctx, "wfv_abc123", &retab.WorkflowsCreateVersionRestoreParams{
WorkflowID: "wf_abc123",
})
if err != nil {
log.Fatal(err)
}
fmt.Println(*workflow)
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
workflow = client.workflows.create_version_restore(
workflow_version_id: 'wfv_abc123',
workflow_id: 'wf_abc123',
)
puts workflow
use retab::Retab;
use retab::resources::workflows::CreateVersionRestoreParams;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let workflow = client
.workflows()
.create_version_restore("wfv_abc123", CreateVersionRestoreParams::new("wf_abc123"))
.await?;
println!("{:?}", workflow);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$workflow = $client->workflows()->createVersionRestore(
workflowVersionId: 'wfv_abc123',
workflowId: 'wf_abc123',
);
print_r($workflow);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var workflow = await client.Workflows.CreateVersionRestoreAsync("wfv_abc123", new WorkflowsCreateVersionRestoreOptions
{
WorkflowId = "wf_abc123",
});
Console.WriteLine(workflow);
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var workflow = client.workflows().createVersionRestore("wfv_abc123", "wf_abc123");
System.out.println(workflow);
}
}
curl -X POST "https://api.retab.com/v1/workflows/versions/wfv_abc123/restore?workflow_id=wf_abc123" \
-H "Authorization: Bearer $RETAB_API_KEY"
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Workflow to restore into a new draft
Response
Successful Response
A workflow and its current configuration.
Unique ID for this workflow
The name of the workflow
Description of the workflow
Project that owns this workflow. Null only on legacy rows that predate the project backfill.
Published workflow metadata when a published version exists
Show child attributes
Show child attributes
⌘I