Skip to content

List Spreadsheet Jobs

client.Beta.Sheets.List(ctx, query) (*PaginatedCursor[SheetsJob], error)
GET/api/v1/beta/sheets/jobs

List spreadsheet parsing jobs. Experimental: not production-ready and subject to change.

ParametersExpand Collapse
query BetaSheetListParams
ConfigurationID param.Field[string]optional

Filter by saved configuration ID

CreatedAtOnOrAfter param.Field[Time]optional

Include items created at or after this timestamp (inclusive)

formatdate-time
CreatedAtOnOrBefore param.Field[Time]optional

Include items created at or before this timestamp (inclusive)

formatdate-time
IncludeResults param.Field[bool]optional
JobIDs param.Field[[]string]optional

Filter by specific job IDs

OrganizationID param.Field[string]optional
PageSize param.Field[int64]optional
PageToken param.Field[string]optional
ProjectID param.Field[string]optional
Status param.Field[BetaSheetListParamsStatus]optional

Filter by job status

const BetaSheetListParamsStatusPending BetaSheetListParamsStatus = "PENDING"
const BetaSheetListParamsStatusSuccess BetaSheetListParamsStatus = "SUCCESS"
const BetaSheetListParamsStatusError BetaSheetListParamsStatus = "ERROR"
const BetaSheetListParamsStatusPartialSuccess BetaSheetListParamsStatus = "PARTIAL_SUCCESS"
const BetaSheetListParamsStatusCancelled BetaSheetListParamsStatus = "CANCELLED"
ReturnsExpand Collapse
type SheetsJob struct{…}

A spreadsheet parsing job.

ID string

The ID of the job

Configuration SheetsParsingConfig

Configuration applied to the parsing job (inline or resolved from a saved preset).

ExtractionRange stringoptional

A1 notation of the range to extract a single region from. If None, the entire sheet is used.

FlattenHierarchicalTables booloptional

Return a flattened dataframe when a detected table is recognized as hierarchical.

GenerateAdditionalMetadata booloptional

Whether to generate additional metadata (title, description) for each extracted region.

IncludeHiddenCells booloptional

Whether to include hidden cells when extracting regions from the spreadsheet.

SheetNames []stringoptional

The names of the sheets to extract regions from. If empty, all sheets will be processed.

Specialization stringoptional

Optional specialization mode for domain-specific extraction. Supported values: ‘financial-standard’, ‘financial-enhanced’, ‘financial-precise’. Default None uses the general-purpose pipeline.

TableMergeSensitivity SheetsParsingConfigTableMergeSensitivityoptional

Influences how likely similar-looking regions are merged into a single table. Useful for spreadsheets that either have sparse tables (strong merging) or many distinct tables close together (weak merging).

One of the following:
const SheetsParsingConfigTableMergeSensitivityStrong SheetsParsingConfigTableMergeSensitivity = "strong"
const SheetsParsingConfigTableMergeSensitivityWeak SheetsParsingConfigTableMergeSensitivity = "weak"
UseExperimentalProcessing booloptional

Enables experimental processing. Accuracy may be impacted.

CreatedAt string

When the job was created

FileID string

The ID of the input file

formatuuid
ProjectID string

The ID of the project

formatuuid
Status SheetsJobStatus

The status of the parsing job

One of the following:
const SheetsJobStatusPending SheetsJobStatus = "PENDING"
const SheetsJobStatusSuccess SheetsJobStatus = "SUCCESS"
const SheetsJobStatusError SheetsJobStatus = "ERROR"
const SheetsJobStatusPartialSuccess SheetsJobStatus = "PARTIAL_SUCCESS"
const SheetsJobStatusCancelled SheetsJobStatus = "CANCELLED"
UpdatedAt string

When the job was last updated

UserID string

The ID of the user

DeprecatedConfig SheetsParsingConfigoptional

Configuration for spreadsheet parsing and region extraction

ExtractionRange stringoptional

A1 notation of the range to extract a single region from. If None, the entire sheet is used.

FlattenHierarchicalTables booloptional

Return a flattened dataframe when a detected table is recognized as hierarchical.

GenerateAdditionalMetadata booloptional

Whether to generate additional metadata (title, description) for each extracted region.

IncludeHiddenCells booloptional

Whether to include hidden cells when extracting regions from the spreadsheet.

SheetNames []stringoptional

The names of the sheets to extract regions from. If empty, all sheets will be processed.

Specialization stringoptional

Optional specialization mode for domain-specific extraction. Supported values: ‘financial-standard’, ‘financial-enhanced’, ‘financial-precise’. Default None uses the general-purpose pipeline.

TableMergeSensitivity SheetsParsingConfigTableMergeSensitivityoptional

Influences how likely similar-looking regions are merged into a single table. Useful for spreadsheets that either have sparse tables (strong merging) or many distinct tables close together (weak merging).

One of the following:
const SheetsParsingConfigTableMergeSensitivityStrong SheetsParsingConfigTableMergeSensitivity = "strong"
const SheetsParsingConfigTableMergeSensitivityWeak SheetsParsingConfigTableMergeSensitivity = "weak"
UseExperimentalProcessing booloptional

Enables experimental processing. Accuracy may be impacted.

ConfigurationID stringoptional

The saved product configuration ID used at create time, if any.

Errors []stringoptional

Any errors encountered

DeprecatedFile Fileoptional

Schema for a file.

ID string

Unique identifier

formatuuid
Name string
ProjectID string

The ID of the project that the file belongs to

formatuuid
CreatedAt Timeoptional

Creation datetime

formatdate-time
DataSourceID stringoptional

The ID of the data source that the file belongs to

formatuuid
ExpiresAt Timeoptional

The expiration date for the file. Files past this date can be deleted.

formatdate-time
ExternalFileID stringoptional

The ID of the file in the external system

FileSize int64optional

Size of the file in bytes

minimum0
FileType stringoptional

File type (e.g. pdf, docx, etc.)

maxLength3000
minLength1
LastModifiedAt Timeoptional

The last modified time of the file

formatdate-time
PermissionInfo map[string, FilePermissionInfoUnion]optional

Permission information for the file

One of the following:
type FilePermissionInfoMap map[string, any]
type FilePermissionInfoArray []any
string
float64
bool
Purpose stringoptional

The intended purpose of the file (e.g., ‘user_data’, ‘parse’, ‘extract’, ‘split’, ‘classify’)

ResourceInfo map[string, FileResourceInfoUnion]optional

Resource information for the file

One of the following:
type FileResourceInfoMap map[string, any]
type FileResourceInfoArray []any
string
float64
bool
UpdatedAt Timeoptional

Update datetime

formatdate-time
MetadataStateTransitions map[string, any]optional

Per-status entry timestamps. Returned only when requested via ?expand=metadata_state_transitions.

Parameters SheetsJobParametersoptional

Job-time parameters such as webhook configurations.

WebhookConfigurations []SheetsJobParametersWebhookConfigurationoptional

Webhook configurations for job status notifications.

WebhookEvents []stringoptional

Events to subscribe to (e.g. ‘parse.success’, ‘extract.error’). If null, all events are delivered.

One of the following:
const SheetsJobParametersWebhookConfigurationWebhookEventExtractPending SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.pending"
const SheetsJobParametersWebhookConfigurationWebhookEventExtractSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.success"
const SheetsJobParametersWebhookConfigurationWebhookEventExtractError SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.error"
const SheetsJobParametersWebhookConfigurationWebhookEventExtractPartialSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.partial_success"
const SheetsJobParametersWebhookConfigurationWebhookEventExtractCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.cancelled"
const SheetsJobParametersWebhookConfigurationWebhookEventParsePending SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.pending"
const SheetsJobParametersWebhookConfigurationWebhookEventParseRunning SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.running"
const SheetsJobParametersWebhookConfigurationWebhookEventParseSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.success"
const SheetsJobParametersWebhookConfigurationWebhookEventParseError SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.error"
const SheetsJobParametersWebhookConfigurationWebhookEventParsePartialSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.partial_success"
const SheetsJobParametersWebhookConfigurationWebhookEventParseCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.cancelled"
const SheetsJobParametersWebhookConfigurationWebhookEventClassifyPending SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.pending"
const SheetsJobParametersWebhookConfigurationWebhookEventClassifyRunning SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.running"
const SheetsJobParametersWebhookConfigurationWebhookEventClassifySuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.success"
const SheetsJobParametersWebhookConfigurationWebhookEventClassifyError SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.error"
const SheetsJobParametersWebhookConfigurationWebhookEventClassifyPartialSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.partial_success"
const SheetsJobParametersWebhookConfigurationWebhookEventClassifyCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.cancelled"
const SheetsJobParametersWebhookConfigurationWebhookEventSheetsPending SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.pending"
const SheetsJobParametersWebhookConfigurationWebhookEventSheetsSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.success"
const SheetsJobParametersWebhookConfigurationWebhookEventSheetsError SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.error"
const SheetsJobParametersWebhookConfigurationWebhookEventSheetsPartialSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.partial_success"
const SheetsJobParametersWebhookConfigurationWebhookEventSheetsCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.cancelled"
const SheetsJobParametersWebhookConfigurationWebhookEventUnmappedEvent SheetsJobParametersWebhookConfigurationWebhookEvent = "unmapped_event"
WebhookHeaders map[string, string]optional

Custom HTTP headers sent with each webhook request (e.g. auth tokens)

WebhookOutputFormat stringoptional

Response format sent to the webhook: ‘string’ (default) or ‘json’

WebhookURL stringoptional

URL to receive webhook POST notifications

Regions []SheetsJobRegionoptional

All extracted regions (populated when job is complete)

Location string

Location of the region in the spreadsheet

RegionType string

Type of the extracted region

SheetName string

Worksheet name where region was found

Description stringoptional

Generated description for the region

RegionID stringoptional

Unique identifier for this region within the file

Title stringoptional

Generated title for the region

Success booloptional

Whether the job completed successfully

WorksheetMetadata []SheetsJobWorksheetMetadataoptional

Metadata for each processed worksheet (populated when job is complete)

SheetName string

Name of the worksheet

Description stringoptional

Generated description of the worksheet

Title stringoptional

Generated title for the worksheet

List Spreadsheet Jobs

package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/llamacloud-prod-go"
  "github.com/stainless-sdks/llamacloud-prod-go/option"
)

func main() {
  client := llamacloudprod.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Beta.Sheets.List(context.TODO(), llamacloudprod.BetaSheetListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "items": [
    {
      "id": "id",
      "configuration": {
        "extraction_range": "extraction_range",
        "flatten_hierarchical_tables": true,
        "generate_additional_metadata": true,
        "include_hidden_cells": true,
        "sheet_names": [
          "string"
        ],
        "specialization": "specialization",
        "table_merge_sensitivity": "strong",
        "use_experimental_processing": true
      },
      "created_at": "created_at",
      "file_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "status": "PENDING",
      "updated_at": "updated_at",
      "user_id": "user_id",
      "config": {
        "extraction_range": "extraction_range",
        "flatten_hierarchical_tables": true,
        "generate_additional_metadata": true,
        "include_hidden_cells": true,
        "sheet_names": [
          "string"
        ],
        "specialization": "specialization",
        "table_merge_sensitivity": "strong",
        "use_experimental_processing": true
      },
      "configuration_id": "configuration_id",
      "errors": [
        "string"
      ],
      "file": {
        "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "name": "x",
        "project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "created_at": "2019-12-27T18:11:19.117Z",
        "data_source_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "expires_at": "2019-12-27T18:11:19.117Z",
        "external_file_id": "external_file_id",
        "file_size": 0,
        "file_type": "x",
        "last_modified_at": "2019-12-27T18:11:19.117Z",
        "permission_info": {
          "foo": {
            "foo": "bar"
          }
        },
        "purpose": "purpose",
        "resource_info": {
          "foo": {
            "foo": "bar"
          }
        },
        "updated_at": "2019-12-27T18:11:19.117Z"
      },
      "metadata_state_transitions": {
        "foo": "bar"
      },
      "parameters": {
        "webhook_configurations": [
          {
            "webhook_events": [
              "parse.success",
              "parse.error"
            ],
            "webhook_headers": {
              "Authorization": "Bearer sk-..."
            },
            "webhook_output_format": "json",
            "webhook_url": "https://example.com/webhooks/llamacloud"
          }
        ]
      },
      "regions": [
        {
          "location": "location",
          "region_type": "region_type",
          "sheet_name": "sheet_name",
          "description": "description",
          "region_id": "region_id",
          "title": "title"
        }
      ],
      "success": true,
      "worksheet_metadata": [
        {
          "sheet_name": "sheet_name",
          "description": "description",
          "title": "title"
        }
      ]
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
Returns Examples
{
  "items": [
    {
      "id": "id",
      "configuration": {
        "extraction_range": "extraction_range",
        "flatten_hierarchical_tables": true,
        "generate_additional_metadata": true,
        "include_hidden_cells": true,
        "sheet_names": [
          "string"
        ],
        "specialization": "specialization",
        "table_merge_sensitivity": "strong",
        "use_experimental_processing": true
      },
      "created_at": "created_at",
      "file_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "status": "PENDING",
      "updated_at": "updated_at",
      "user_id": "user_id",
      "config": {
        "extraction_range": "extraction_range",
        "flatten_hierarchical_tables": true,
        "generate_additional_metadata": true,
        "include_hidden_cells": true,
        "sheet_names": [
          "string"
        ],
        "specialization": "specialization",
        "table_merge_sensitivity": "strong",
        "use_experimental_processing": true
      },
      "configuration_id": "configuration_id",
      "errors": [
        "string"
      ],
      "file": {
        "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "name": "x",
        "project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "created_at": "2019-12-27T18:11:19.117Z",
        "data_source_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "expires_at": "2019-12-27T18:11:19.117Z",
        "external_file_id": "external_file_id",
        "file_size": 0,
        "file_type": "x",
        "last_modified_at": "2019-12-27T18:11:19.117Z",
        "permission_info": {
          "foo": {
            "foo": "bar"
          }
        },
        "purpose": "purpose",
        "resource_info": {
          "foo": {
            "foo": "bar"
          }
        },
        "updated_at": "2019-12-27T18:11:19.117Z"
      },
      "metadata_state_transitions": {
        "foo": "bar"
      },
      "parameters": {
        "webhook_configurations": [
          {
            "webhook_events": [
              "parse.success",
              "parse.error"
            ],
            "webhook_headers": {
              "Authorization": "Bearer sk-..."
            },
            "webhook_output_format": "json",
            "webhook_url": "https://example.com/webhooks/llamacloud"
          }
        ]
      },
      "regions": [
        {
          "location": "location",
          "region_type": "region_type",
          "sheet_name": "sheet_name",
          "description": "description",
          "region_id": "region_id",
          "title": "title"
        }
      ],
      "success": true,
      "worksheet_metadata": [
        {
          "sheet_name": "sheet_name",
          "description": "description",
          "title": "title"
        }
      ]
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}