Operations

Create Archives

Create a task to create a ZIP, RAR, 7Z, TAR, TAR.GZ or TAR.BZ2 archive.

To create an archive, create a job with a archive task.

Task Parameters

operation
string required
Value is archive.
input
string or array of task names required

The input task name(s) for this task.

output_format
string required

The archive format.

engine
string

Use a specific engine for the conversion.

engine_version
string

Use a specific engine version for the conversion.

filename
string

Choose a filename (including extension) for the output file.

timeout
integer

Timeout in seconds after the task will be cancelled. By default, tasks time out after 5 hours.

Example Job

Using the parameters from above, you can create a job:

POSThttps://api.cloudconvert.com/v2/jobs
{
    "tasks": {
        "import-frist-file": {
            "operation": "import/url",
            "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf"
        },
        "import-second-file": {
            "operation": "import/url",
            "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/logo.png"
        },
        "archive-my-files": {
            "operation": "archive",
            "input": [
                "import-frist-file",
                "import-second-file"
            ],
            "output_format": "zip"
        },
        "export-my-file": {
            "operation": "export/url",
            "input": "archive-my-files"
        }
    }
}
Use the Job Builder to generate and try out archive jobs.