Shortcuts

Export Shortcut Runs

Starts a CSV export of one batch's runs and returns immediately with an export_id. The file is built in the background — poll Get Shortcut Runs Export until status is completed, then download file_url.

batch_id is the one returned by Run Shortcut Batch or Import CSV for Shortcuts, and the same id List Shortcut Runs filters by.

Columns are one per input field, then one per output field, then status — the same public field names the run endpoints return. They are fixed when the export starts, so a batch whose later runs failed still produces a rectangular file, and editing the shortcut afterwards cannot reshape an export already under way.

One export at a time. While an export of this shortcut is building for you, starting another returns the in-flight job with created: false instead of queueing a second build, so a retry is safe.

Exports are private to the API key's creator, and so are the runs themselves — you can only export a batch you ran. A batch with no runs is a 400 rather than an empty file.

Requires the shortcuts:read scope.

post/api/v1/shortcuts/{id}/runs/export

Request

  • Base URL
    http://localhost:3009
  • Auth
    HTTP bearer

Path parameters

idstring required

App ID

Request body

batch_idstring required

The batch to export, as returned by Run Shortcut Batch or Import CSV for Shortcuts. The same id List Shortcut Runs filters by. You can only export a batch you ran.

file_namestring

Base name for the downloaded file, without extension. Defaults to shortcut-runs. Non-alphanumeric characters are replaced and the name is capped at 100 characters.

Response

Default Response

statusinteger required

Changes

No recorded changes to this operation across all 1 revision of this API.