from retab import Retab
client = Retab()
parse = client.parses.cancel("prs_01G34H8J2K")
print(parse.status)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const parse = await client.parses.cancel("prs_01G34H8J2K");
console.log(parse.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)
}
parse, err := client.Parses.Cancel(context.Background(), "prs_01G34H8J2K")
if err != nil {
log.Fatal(err)
}
fmt.Println(parse.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 parse = client.parses().cancel("prs_01G34H8J2K");
System.out.println(parse.getStatus());
}
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
parse = client.parses.cancel(parse_id: 'prs_01G34H8J2K')
puts parse.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 parse = client.parses().cancel("prs_01G34H8J2K").await?;
println!("{:?}", parse.status);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$parse = $client->parses()->cancel('prs_01G34H8J2K');
echo $parse->status?->value . PHP_EOL;
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var parse = await client.Parses.CancelAsync("prs_01G34H8J2K");
Console.WriteLine(parse.Status);
curl -X POST \
'https://api.retab.com/v1/parses/prs_01G34H8J2K/cancel' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"id": "prs_01G34H8J2K",
"status": "cancelled",
"error": null
}
{
"detail": "parse 'prs_01G34H8J2K' not found"
}
Cancel Parse
from retab import Retab
client = Retab()
parse = client.parses.cancel("prs_01G34H8J2K")
print(parse.status)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const parse = await client.parses.cancel("prs_01G34H8J2K");
console.log(parse.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)
}
parse, err := client.Parses.Cancel(context.Background(), "prs_01G34H8J2K")
if err != nil {
log.Fatal(err)
}
fmt.Println(parse.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 parse = client.parses().cancel("prs_01G34H8J2K");
System.out.println(parse.getStatus());
}
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
parse = client.parses.cancel(parse_id: 'prs_01G34H8J2K')
puts parse.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 parse = client.parses().cancel("prs_01G34H8J2K").await?;
println!("{:?}", parse.status);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$parse = $client->parses()->cancel('prs_01G34H8J2K');
echo $parse->status?->value . PHP_EOL;
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var parse = await client.Parses.CancelAsync("prs_01G34H8J2K");
Console.WriteLine(parse.Status);
curl -X POST \
'https://api.retab.com/v1/parses/prs_01G34H8J2K/cancel' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"id": "prs_01G34H8J2K",
"status": "cancelled",
"error": null
}
{
"detail": "parse 'prs_01G34H8J2K' not found"
}
Parse 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()
parse = client.parses.cancel("prs_01G34H8J2K")
print(parse.status)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const parse = await client.parses.cancel("prs_01G34H8J2K");
console.log(parse.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)
}
parse, err := client.Parses.Cancel(context.Background(), "prs_01G34H8J2K")
if err != nil {
log.Fatal(err)
}
fmt.Println(parse.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 parse = client.parses().cancel("prs_01G34H8J2K");
System.out.println(parse.getStatus());
}
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
parse = client.parses.cancel(parse_id: 'prs_01G34H8J2K')
puts parse.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 parse = client.parses().cancel("prs_01G34H8J2K").await?;
println!("{:?}", parse.status);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$parse = $client->parses()->cancel('prs_01G34H8J2K');
echo $parse->status?->value . PHP_EOL;
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var parse = await client.Parses.CancelAsync("prs_01G34H8J2K");
Console.WriteLine(parse.Status);
curl -X POST \
'https://api.retab.com/v1/parses/prs_01G34H8J2K/cancel' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"id": "prs_01G34H8J2K",
"status": "cancelled",
"error": null
}
{
"detail": "parse 'prs_01G34H8J2K' not found"
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
A parse result: the per-page and full-document text extracted from a document.
Unique identifier of the parse
Information about the parsed file
Show child attributes
Show child attributes
Model used for parsing
Format used to render tables extracted from the document
markdown, yaml, html, json DPI used when rasterizing pages for the parser
The parsed document content
Show child attributes
Show child attributes
Free-form instructions supplied with the parse request.
Lifecycle status. The synchronous path returns 'completed'. Background runs progress pending -> queued -> in_progress -> completed | failed | cancelled.
pending, queued, in_progress, completed, failed, cancelled Error details when a background run fails; null otherwise. Always present so consumers can read it without an existence check.
Show child attributes
Show child attributes
Usage information for the parse operation
Show child attributes
Show child attributes