Datasets from PDF

Create datasets from Selected Tables of PDF

Takes a file ID and a list of table indices and creates a corresponding dataset in the project

post/workspaces/{workspace_id}/projects/{project_id}/datasets-from-pdf

Request

  • Base URL: https://app.mammoth.io/api/v2
  • URL: https://app.mammoth.io/api/v2/workspaces/{workspace_id}/projects/{project_id}/datasets-from-pdf
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-KEY and API key in header X-API-SECRET and API key in header X-WORKSPACE-ID

Path parameters

workspace_idinteger required

Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace.

Example:4
project_idinteger required

Project ID of the workspace

Example:4

Request body

file_object_idinteger required

Internal ID of the file object

file_idstring nullable

Unique identifier for the uploaded PDF file in pdf2csv

file_namestring required

Original name of the uploaded PDF file

table_listinteger[] nullable

Indices of the tables to extract and convert into datasets

delete_file_after_extractboolean

Whether to delete the file from storage after table extraction is complete

is_preview_neededboolean nullable

Flag indicating whether a preview is required before dataset creation

user_instructionstring nullable

User-provided instruction for custom extraction logic.

Example request

{
  "file_object_id": 123,
  "file_id": "abc12345xyz",
  "file_name": "sample_document.pdf",
  "table_list": [
    0,
    2,
    4
  ],
  "delete_file_after_extract": false,
  "is_preview_needed": null,
  "user_instruction": null
}

Response

Datasets will be successfully created from the table list

object required

Changes

No recorded changes to this operation across all 3 revisions of this API.