from retab import Retab
client = Retab()
edit = client.edits.create_edit_cancel("edt_01G34H8J2K")
print(edit.status)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const edit = await client.edits.create_edit_cancel("edt_01G34H8J2K");
console.log(edit.status);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func main() {
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
edit, err := client.Edits.CreateCancel(context.Background(), "edt_01G34H8J2K")
if err != nil {
log.Fatal(err)
}
fmt.Println(edit.Status)
}
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 edit = client.edits().createCancel("edt_01G34H8J2K");
System.out.println(edit.getStatus());
}
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
edit = client.edits.create_edit_cancel(edit_id: 'edt_01G34H8J2K')
puts edit.status
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let edit = client.edits().create_edit_cancel("edt_01G34H8J2K").await?;
println!("{:?}", edit.status);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$edit = $client->edits()->createEditCancel('edt_01G34H8J2K');
echo $edit->status?->value . PHP_EOL;
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var edit = await client.Edits.CreateCancelAsync("edt_01G34H8J2K");
Console.WriteLine(edit.Status);
curl -X POST \
'https://api.retab.com/v1/edits/edt_01G34H8J2K/cancel' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"id": "edt_01G34H8J2K",
"status": "cancelled",
"error": null
}
{
"detail": "edit 'edt_01G34H8J2K' not found"
}
Edits
Cancel Edit
POST
/
v1
/
edits
/
{edit_id}
/
cancel
from retab import Retab
client = Retab()
edit = client.edits.create_edit_cancel("edt_01G34H8J2K")
print(edit.status)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const edit = await client.edits.create_edit_cancel("edt_01G34H8J2K");
console.log(edit.status);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func main() {
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
edit, err := client.Edits.CreateCancel(context.Background(), "edt_01G34H8J2K")
if err != nil {
log.Fatal(err)
}
fmt.Println(edit.Status)
}
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 edit = client.edits().createCancel("edt_01G34H8J2K");
System.out.println(edit.getStatus());
}
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
edit = client.edits.create_edit_cancel(edit_id: 'edt_01G34H8J2K')
puts edit.status
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let edit = client.edits().create_edit_cancel("edt_01G34H8J2K").await?;
println!("{:?}", edit.status);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$edit = $client->edits()->createEditCancel('edt_01G34H8J2K');
echo $edit->status?->value . PHP_EOL;
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var edit = await client.Edits.CreateCancelAsync("edt_01G34H8J2K");
Console.WriteLine(edit.Status);
curl -X POST \
'https://api.retab.com/v1/edits/edt_01G34H8J2K/cancel' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"id": "edt_01G34H8J2K",
"status": "cancelled",
"error": null
}
{
"detail": "edit 'edt_01G34H8J2K' not found"
}
Cancel an in-flight background
Edit run (one created with background: true). Cancellation is idempotent: a run that has already reached a terminal state (completed, failed, or cancelled) is returned unchanged rather than erroring.
from retab import Retab
client = Retab()
edit = client.edits.create_edit_cancel("edt_01G34H8J2K")
print(edit.status)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const edit = await client.edits.create_edit_cancel("edt_01G34H8J2K");
console.log(edit.status);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func main() {
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
edit, err := client.Edits.CreateCancel(context.Background(), "edt_01G34H8J2K")
if err != nil {
log.Fatal(err)
}
fmt.Println(edit.Status)
}
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 edit = client.edits().createCancel("edt_01G34H8J2K");
System.out.println(edit.getStatus());
}
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
edit = client.edits.create_edit_cancel(edit_id: 'edt_01G34H8J2K')
puts edit.status
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let edit = client.edits().create_edit_cancel("edt_01G34H8J2K").await?;
println!("{:?}", edit.status);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$edit = $client->edits()->createEditCancel('edt_01G34H8J2K');
echo $edit->status?->value . PHP_EOL;
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var edit = await client.Edits.CreateCancelAsync("edt_01G34H8J2K");
Console.WriteLine(edit.Status);
curl -X POST \
'https://api.retab.com/v1/edits/edt_01G34H8J2K/cancel' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"id": "edt_01G34H8J2K",
"status": "cancelled",
"error": null
}
{
"detail": "edit 'edt_01G34H8J2K' not found"
}
Authorizations
Response
Successful Response
An edit result: form-field values written onto a document or template PDF.