Documentation
  • 👋Welcome to Documentation
  • 📖Glossary
  • ❓FAQs
  • General
    • Getting set up
      • Single-user organization
      • Multi-user organization
    • Supported Document Types
  • Platform Walkthrough
    • Dashboard
    • Queue
    • Configuration
    • Supervision
  • User guide How Tos
    • User Management
      • How to invite a new user to the platform?
      • How can I manage existing users?
    • Processes
      • How to create a supervised process or use the template?
      • How to create a custom process?
    • Supervision
      • How to add, assign, and remove annotations?
      • How to edit the value of the extraction?
      • How to open and edit a table mask?
      • How to open, edit, or remove the extracted table?
      • How to export your data via Supervision?
      • How to copy values and tables?
    • Upload
    • Converters
    • Data points definition
    • Data Export
    • Table Data Extraction
    • Enrichment
    • Generating new API key
  • Integrations
    • Zapier Integration
      • Quickstart
      • Alphamoon as a Trigger
      • Alphamoon as an Action
    • Google Sheets - Export
  • Features
    • Continuous Learning (Beta)
    • Document Splitting
  • API
    • Introduction
    • Quickstart
    • Organization API keys (Beta)
    • Process API keys (Beta)
    • Authenticating
    • Versioning
    • Get results
    • Get OCR results
    • Get processes
    • Get process types
    • Get collections
    • Metadata
      • Setting metadata value
    • Upload File
    • Export
    • Download original files
    • Delete collection
    • Reset process configuration
  • Resources
    • 💻Alphamoon Website
Powered by GitBook
On this page
  • Export collection
  • Export Collection
  • Export multiple collections
  • Export Collections
  • Get export by Id
  • Get Export By Id
  1. API

Export

A quick guide on Alphamoon API export endpoints

PreviousUpload FileNextDownload original files

Last updated 1 year ago

Export collection

To export collection via API, get the collection_id of the processed file from:

  • endpoint (Base64 or Binary)

  • Get collections endpoint

  • URL e.g. https://workspace.alphamoon.ai/supervision/223742cc9bca43fd81b2d41b0018e4c7

To export the collection, use the following endpoint:

Export Collection

GET /api/v0.3/collections/{collection_id}/export

Path Parameters

Name
Type
Description

collection-id*

String

The id of the collection for which you want to extract the results.

Query Parameters

Name
Type
Description

Scope

String

Choose between: extraction, ocr_words, ocr_tables

Format

String

Choose between: json, csv, xlsx, pdf, txt

Download file
{
  "detail": [
    {
      "loc": [
        "string",
        0
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

See the example:

curl -X 'GET' \
  'https://workspace.alphamoon.ai/api/v0.3/collections/c0da3bd0798e4549a1eb673887258dd3/export?scope=extraction&format=json' \
  -H 'accept: */*' \
  -H 'Authorization: Basic API_KEY_BASE64_ENCODED'
Download file

Export multiple collections

  • Create process endpoint

  • URL e.g. https://workspace.alphamoon.ai/queue/2080d36bf94c4147b2e543104342fc2f

To export multiple collections, use the following endpoint:

Export Collections

POST /api/v0.3/collections/export

Request Body

Name
Type
Description

collectionIds*

String

The ids of the collections

processId*

String

The process id

scope

String

Extraction / ocr_words/ ocr_tables

format

String

json, csv, xlsx, pdf, or txt

{
  "exportId": "f729dc8333cb4ccc82d36502bf0651f4"
}
{
  "detail": [
    {
      "loc": [
        "string",
        0
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

See the example:

curl -X 'POST' \
  'https://workspace.alphamoon.ai/api/v0.3/collections/export' \
  -H 'accept: application/json' \
  -H 'Authorization: Basic API_KEY_BASE64_ENCODED' \
  -H 'Content-Type: application/json' \
  -d '{
  "collectionIds": [
    "86fc8d905d0e4cefb042e6cd707fb51f"
  ],
  "processId": "93580f176efb48cda64f25cba74d8ca4",
  "mode": "single",
  "scope": "extraction",
  "format": "json"
}'
{
  "exportId": "f729dc8333cb4ccc82d36502bf0651f4"
}

Get export by Id

Next up, use the following endpoint:

Get Export By Id

GET /api/v0.3/collections/exports/{export_id]

Path Parameters

Name
Type
Description

export_id*

String

Download file
{
  "detail": [
    {
      "loc": [
        "string",
        0
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

See the example:

curl -X 'GET' \
  'https://workspace.alphamoon.ai/api/v0.3/collections/exports/f729dc8333cb4ccc82d36502bf0651f4' \
  -H 'accept: application/json' \
  -H 'Authorization: Basic API_KEY_BASE64_ENCODED'
Download file

See next:

To export collections via API, get the as well as process_id from one of the following sources:

endpoint

This endpoint creates an export process with the returned export_id. You can refer to its results using the further described endpoint - .

To export collections via API, get theexport_id from the following source:

Upload a file
Get process
es
collection_ids
Get export by id
Export collections endpoint