Skip to content
Docs menu

Show a job

The job with all its tasks and their results.

GEThttps://api.switchfile.io/v2/jobs/{id}

Needs an API key: Authorization: Bearer YOUR_API_KEY. See Authentication.

Example

curl "https://api.switchfile.io/v2/jobs/6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10" \
  -H "Authorization: Bearer $SWITCHFILE_API_KEY"

Parameters

Path parameters

  • idstring (uuid)required

    ID of the job

Query parameters

  • redirectboolean | string (boolean)

    Sync requests only: answer with 302 to the URL of the first exported file

Responses

  • 200OK
    • dataJobrequired
    • data.created_atstringrequired

      ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00

    • data.ended_atstring | nullrequired

      ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00

    • data.idstring (uuid)required
    • data.linksobjectrequired
    • data.links.selfstringrequired
    • data.started_atstring | nullrequired

      ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00

    • data.statusstringrequired

      one of "waiting", "processing", "finished", "error"

    • data.tagstring | nullrequired
    • data.tasksTask[]
    • data.tasks[].codestring | nullrequired
    • data.tasks[].copy_of_task_idstring (uuid) | nullrequired
    • data.tasks[].created_atstringrequired

      ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00

    • data.tasks[].creditsstring (integer) | integerrequired
    • data.tasks[].depends_on_task_idsstring (uuid)[]required
    • data.tasks[].ended_atstring | nullrequired

      ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00

    • data.tasks[].enginestring | nullrequired

      Internal identifier, may change. Do not rely on its value

    • data.tasks[].engine_versionstring | nullrequired

      Internal identifier, may change. Do not rely on its value

    • data.tasks[].host_namestring | nullrequired
    • data.tasks[].idstring (uuid)required
    • data.tasks[].job_idstring (uuid)required
    • data.tasks[].linksobjectrequired
    • data.tasks[].links.selfstringrequired
    • data.tasks[].messagestring | nullrequired
    • data.tasks[].namestringrequired
    • data.tasks[].operationstringrequired
    • data.tasks[].percentstring (integer) | integerrequired

      Progress as in CloudConvert: 100 when finished, otherwise 0

      0 to 100

    • data.tasks[].prioritystring (integer) | integerrequired
    • data.tasks[].regionstringrequired

      Region the task runs in (eu-central)

    • data.tasks[].resultTaskResultrequired
    • data.tasks[].result.filesResultFile[]
    • data.tasks[].result.formUploadForm
    • data.tasks[].result.uploadDirectUpload

      import/upload only: a signed URL for large files, without the 100 MB limit of result.form. The task finishes on its own a few seconds after the PUT. Call POST /v2/tasks/{id}/upload-complete to finish it right away.

    • data.tasks[].retry_of_task_idstring (uuid) | nullrequired
    • data.tasks[].started_atstring | nullrequired

      ISO 8601 timestamp, for example 2026-11-06T18:00:00+00:00

    • data.tasks[].statusstringrequired

      one of "waiting", "processing", "finished", "error"

    • data.tasks[].storagestring | nullrequired
    • data.tasks[].user_idstring | nullrequired

      Account of the job (opaque ID, the same as data.id in /v2/users/me)

    • data.tasks[].waiting_forstring

      What a waiting task waits for, one of "upload", "inputs", "queued". Only set while status is waiting

    200 application/json
    {
      "data": {
        "id": "6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10",
        "tag": "invoice-4711",
        "status": "finished",
        "created_at": "2026-11-06T18:00:00+00:00",
        "started_at": "2026-11-06T18:00:00+00:00",
        "ended_at": "2026-11-06T18:00:02+00:00",
        "tasks": [
          {
            "id": "c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31",
            "job_id": "6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10",
            "name": "import-1",
            "operation": "import/url",
            "status": "finished",
            "message": null,
            "code": null,
            "credits": 0,
            "created_at": "2026-11-06T18:00:00+00:00",
            "started_at": "2026-11-06T18:00:00+00:00",
            "ended_at": "2026-11-06T18:00:01+00:00",
            "depends_on_task_ids": [],
            "retry_of_task_id": null,
            "copy_of_task_id": null,
            "priority": 0,
            "host_name": null,
            "storage": null,
            "engine": null,
            "engine_version": null,
            "percent": 100,
            "region": "eu-central",
            "user_id": "4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18",
            "result": {
              "files": [
                {
                  "filename": "report.docx",
                  "size": 48213
                }
              ]
            },
            "links": {
              "self": "https://api.switchfile.io/v2/tasks/c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31"
            }
          },
          {
            "id": "5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52",
            "job_id": "6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10",
            "name": "convert-1",
            "operation": "convert",
            "status": "finished",
            "message": null,
            "code": null,
            "credits": 2,
            "created_at": "2026-11-06T18:00:00+00:00",
            "started_at": "2026-11-06T18:00:01+00:00",
            "ended_at": "2026-11-06T18:00:02+00:00",
            "depends_on_task_ids": [
              "c1f3a9d2-7e44-4b0a-a1b5-2f0e8c9d6a31"
            ],
            "retry_of_task_id": null,
            "copy_of_task_id": null,
            "priority": 0,
            "host_name": null,
            "storage": null,
            "engine": null,
            "engine_version": null,
            "percent": 100,
            "region": "eu-central",
            "user_id": "4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18",
            "result": {
              "files": [
                {
                  "filename": "report.pdf",
                  "size": 61544
                }
              ]
            },
            "links": {
              "self": "https://api.switchfile.io/v2/tasks/5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52"
            }
          },
          {
            "id": "e8a4c6b1-2d3f-4a5e-9b7c-1d0f3e5a7c93",
            "job_id": "6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10",
            "name": "export-1",
            "operation": "export/url",
            "status": "finished",
            "message": null,
            "code": null,
            "credits": 0,
            "created_at": "2026-11-06T18:00:00+00:00",
            "started_at": "2026-11-06T18:00:02+00:00",
            "ended_at": "2026-11-06T18:00:02+00:00",
            "depends_on_task_ids": [
              "5b7d2e90-1a3c-4f6e-8d2b-9c0a4e7f1b52"
            ],
            "retry_of_task_id": null,
            "copy_of_task_id": null,
            "priority": 0,
            "host_name": null,
            "storage": null,
            "engine": null,
            "engine_version": null,
            "percent": 100,
            "region": "eu-central",
            "user_id": "4f8a2c6e-1b3d-4e5f-8a7c-9d0b2e4f6a18",
            "result": {
              "files": [
                {
                  "filename": "report.pdf",
                  "size": 61544,
                  "url": "https://api.switchfile.io/files/2a6f8e1c-4b3d-4e7a-9c5f-8d1b0e2a4c67/report.pdf?expires=1762538401&signature=3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8"
                }
              ]
            },
            "links": {
              "self": "https://api.switchfile.io/v2/tasks/e8a4c6b1-2d3f-4a5e-9b7c-1d0f3e5a7c93"
            }
          }
        ],
        "links": {
          "self": "https://api.switchfile.io/v2/jobs/6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10"
        }
      }
    }
  • 302Sync requests with redirect=true. Location holds the URL of the first exported file
  • 401The API key is missing or not valid
    401 application/json
    {
      "message": "Missing or invalid API key.",
      "code": "UNAUTHENTICATED"
    }
  • 404Does not exist for this account
    404 application/json
    {
      "message": "Job not found.",
      "code": "NOT_FOUND"
    }
  • 422Invalid data. errors names the fields
    422 application/json
    {
      "message": "id: Expected string to match 'uuid' format",
      "code": "INVALID_DATA",
      "errors": {
        "id": [
          "Expected string to match 'uuid' format"
        ]
      }
    }
  • 429Too many requests or a daily quota is used up. See Retry-After
    429 application/json
    {
      "message": "Too many requests. Try again in 12 seconds.",
      "code": "RATE_LIMIT_EXCEEDED"
    }

Error bodies and codes are explained in Errors.