Export

A quick guide on Alphamoon API export endpoints

Export collection

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

  • Upload a file 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

Query Parameters

Download file

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'

Export multiple collections

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

  • Get processes endpoint

  • 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

{
  "exportId": "f729dc8333cb4ccc82d36502bf0651f4"
}

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

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"
}'

Get export by Id

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

Next up, use the following endpoint:

Get Export By Id

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

Path Parameters

Download file

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'

See next:

Last updated