Extract Archive
About this tool
How to use it
- Choose this tool.
- Add the archive file (one file).
- If you like, type patterns to take only some files, or to skip some.
- Press Generate.
- Download the files you want.
What you get back
Try Extract Archive in the Studio
Use it from your code
cURL
curl -X POST "https://app.h2i.davixlabs.io/v1/documents/archive-extract" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'file=@document.pdf' \
-F 'include=["*.png"]' \
-F 'exclude=["__MACOSX/**"]' \
-F 'max_files=200'Node.js
const { DavixH2I } = require('@davixlabs/h2i-sdk');
const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.documents.archiveExtract({
"file": 'document.pdf',
"include": "[\"*.png\"]",
"exclude": "[\"__MACOSX/**\"]",
"max_files": 200
});
console.log(result.data, result.requestId);PHP
<?php
require 'vendor/autoload.php';
$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->documents()->archiveExtract([
'file' => 'document.pdf',
'include' => '["*.png"]',
'exclude' => '["__MACOSX/**"]',
'max_files' => 200,
]);
echo $result->requestId;