Download file
Download a URL straight to a file (any file type, including large binaries), with the same headers and authentication as Send request.
Command in the REST Web Service toolkit · id ooa.rest/download_file · 34 inputs (2 required), 4 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Address (URL) | String | Yes | Absolute URL of the file, or a path when base_url (or a connection) gives the address. It may come from the vault; then only its scheme and host are logged (G6). | |
| Path | File | Yes | File to save to, or a folder to keep the server's file name. | |
| Query | Dictionary | No | Query parameters, URL-encoded automatically. | |
| Headers | Dictionary | No | Request headers. | |
| Basic user | String | No | Basic auth user name. | |
| Basic password | Credential | No | Basic auth password from the vault. | |
| Bearer token | Credential | No | Bearer token from the vault. | |
| Overwrite | Boolean | No | true | Replace an existing file; off for new steps, so a file already there is not lost (G6). |
| Timeout (seconds) | Number | No | 600 | Time allowed for the whole download. |
| Allow untrusted certificates | Boolean | No | false | Accept any server certificate (self-signed or expired); for test systems only. |
| Proxy | String | No | Proxy server as host:port; the runner's settings when empty. | |
| Proxy user | String | No | Proxy user name, when the proxy needs a sign-in. | |
| Proxy password | Credential | No | Proxy password from the vault. | |
| Client certificate | File | No | Client certificate (.p12 or .pfx) for servers that require mutual TLS. | |
| Client certificate password | Credential | No | Password of the client certificate file. | |
| Windows sign-in | String | No | Windows sign-in (NTLM or Kerberos) for intranet sites, SharePoint on premises, IIS and Exchange: current_user signs in as the runner's Windows account (Windows runners); user_password uses basic_user (DOMAIN\user) and basic_password. | |
| OAuth token address (URL) | String | No | OAuth 2.0 token endpoint; the request is sent with a token fetched there (kept for the run and renewed before it expires). | |
| OAuth client ID | String | No | OAuth 2.0 client (application) id. | |
| OAuth client secret | Credential | No | OAuth 2.0 client secret from the vault; needed for client credentials, optional with a refresh token. | |
| OAuth refresh token | Credential | No | Refresh token from the vault: signs in with the refresh-token grant instead of client credentials. A new refresh token from the server is used for the rest of the run and returned as refresh_token. | |
| OAuth scope | String | No | Scopes to ask for, separated by spaces. | |
| OAuth audience | String | No | Audience sent to the token endpoint (some providers, e.g. Auth0, need it). | |
| OAuth resource | String | No | Resource sent to the token endpoint (e.g. Microsoft Entra v1 and AD FS). | |
| OAuth client sign-in | String | No | basic | How the client id and secret reach the token endpoint: basic (HTTP Basic header, the OAuth standard) or body (form fields client_id and client_secret). |
| OAuth 1.0a consumer key | String | No | OAuth 1.0a consumer key: the request is signed (RFC 5849). | |
| OAuth 1.0a consumer secret | Credential | No | OAuth 1.0a consumer secret from the vault. | |
| OAuth 1.0a token | Credential | No | OAuth 1.0a access token from the vault; empty for a consumer-only (two-legged) request. | |
| OAuth 1.0a token secret | Credential | No | OAuth 1.0a token secret from the vault. | |
| OAuth 1.0a signature method | String | No | HMAC-SHA1 | OAuth 1.0a signature method. |
| Windows user name | String | No | Windows (NTLM) user name for intranet sites, IIS, SharePoint on premises and Exchange. | |
| Windows domain | String | No | Windows domain of the NTLM user; empty when the user name already has it (DOMAIN\user or user@domain). | |
| Windows password | Credential | No | Windows password of the NTLM user, from the vault. | |
| Endpoint address | String | No | Address the URL is relative to, so the URL can be a path such as /invoices/42; a saved connection usually gives it. | |
| Trust certificate | File | No | Certificate of a private certificate authority (.cer, .crt or .pem) to trust as well as the usual ones, so a company server's certificate is still checked without insecure_tls (G6). |
Outputs
| Output | Type | What it is |
|---|---|---|
| path | File | Saved file. |
| status | Number | HTTP status code. |
| size_bytes | Number | File size in bytes. |
| content_type | String | Content-Type reported by the server, or empty. |